This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 127187 - Portlet library isn't added to the project after creating JSF Portlet
Summary: Portlet library isn't added to the project after creating JSF Portlet
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Portalpack (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P4 blocker (vote)
Assignee: _ chetansanth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-12 12:08 UTC by Dan Kolar
Modified: 2009-03-17 07:25 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kolar 2008-02-12 12:08:45 UTC
1) Create web app w/o framework
2) Create JSF portlet page in it
3) Create JSR-168 portlet in it

Portlet 1.0(JSR-168) library isn't added to the project, so JSR-168 portlet class is uncompilable due to missing
javax.portlet packages.
Comment 1 Petr Blaha 2008-02-12 12:36:47 UTC
Is it really just P3? What's about usability and first user's impression when IDE generates some code that is uncompilable? 
Comment 2 Satyaranjan D 2008-02-12 12:48:46 UTC
IMO it's P3 as user will select Porlet support framework and then try to build JSF Portlet which works fine.

It is quite rare to me that user creates a JSF Portlet Page and then try to create a normal JSR168 portlet without
selecting "Portlet Support" framework.

You need to select "Portlet Support" framework to add portlet libraries automatically.
Ideally if somebody is creating JSF Portlet application then he is not expected to use portlet api inside his jsf
portlet java class. The idea is, you develop a JSF application without using any portlet apis and plugin will help you
to deploy it as portlet on portal server/portlet container. 

But the use case mentioned in the description is also valid. Somebody may want to mix both JSF Portlet and JSR168
portlet in one application. Workaround: User can manually add Portlet Libraries through "Add Library" option.

FYI, currently if a web application has "Portlet Support" framework or not is decided with the existence of portlet.xml
. If portlet.xml is present then system thinks "Portlet Support" framework has already been added. As in the above
mentioned test case, portlet.xml is created by Visual Portlet Page and Portal pack assumes "Portlet Support" framework
is already added by seeing the portlet.xml in the project. Instead I think it should also check if the Portlet 1.0/2.0
are also present in the project classpath. 

As this is not a beta stopper and has a workaround, we will fix this issue for the final release.




Comment 3 Dan Kolar 2008-02-12 13:43:00 UTC
Well, maybe not so usual choice to create Visual JSF portlet and JSR168 portlet in one application, but it shoul still
create valid project. User can add many different file types to all projects, and some of them are uncommon, but still
gets valid result. This is the same.
Comment 4 Satyaranjan D 2009-01-06 07:16:32 UTC
Changing the priority to P4.