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.
Product Version: NetBeans IDE 6.0.1 (Build 200801231200) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) PortalPack installed 1) Create new Web application with portlet framework 2) Create new Visual JSF portlet Page on this project Portlet support for Visual JSF is broken:no portlet entry addet to portlet.xml, project can't be deployed (and ide throws an exception), setting page mode doesn't work... Creator 2 imported projects work as they should.
Please follow the following steps to create a JSF Portlet - Create a Web application without selecting "Portlet Support" or "Visual Server Faces" framework. - Then create a Visual Portlet Page and deploy The problem occurs when 'Portlet Support' framework is selected. Cause: When Portlet Support framework is selected, it creates a portlet.xml file with a default portlet(if create portlet checkbox is checked). Now when user tries to create a Visual Portlet Page, it should add a new portlet entry for the visual portlet inside portlet.xml . But currently it doesn't add a portlet entry for a Visual Portlet Page, if portlet.xml is already there with some other portlets. IMO, during visual portlet page creation, plugin should check if there is any visual portlet entry present inside portlet.xml, if no, add a new one for newly created visual portlet page. if yes, update the existing portlet element if required.
Yes, it's a known issue that interaction between Portal-Pack and VW-Portlet is not fully implemented. I think they are all minor UI issues that all have workarounds. We may just fix them in 6.1 or later. If the portlet.xml has any valid <application>, then you can use the context menu of the newly created Visual Web Portlet page to set as the Initial View/Edit/Help Mode Page. The deployment will work. Here is what we should do: - When add Visual Web Portlet Page, currently it checks if there is portlet.xml file. If not, then add it. If yes, then do nothing; it should add a new valid <application> if there is no any and add itself as the initial page. - When deploy the project, we may also need to check whether there is a valid <application> and a valid initial page set.
Sorry, but suggested workaround (don't choose Portlet support framework and then add portlet further) isn't very intuitive. The issue is considered as stopper.
Anyone who is at all interested in creating a portlet (visual or non visual) will be naturally drawn to the Portlet Framework option in the project wizard. If the user selects this framework, it must do the right thing with respect to Visual Portlets otherwise the feature appears broken out of the box. I agree that this bug should be fixed before considering this feature beta-ready.
This issue is fixed. Code diff can be found at http://hg.netbeans.org/main/contrib/rev/f78f575569c9 Summary of Fix: - JSF Portlet Page can only be supported in Portlet 1.0 (JSR 168) project. - When JSF Portlet page is created, before updating portlet.xml, check if portlet.xml is present - If not present, create a portlet entry for the new JSF Portlet - If present, then check if there is any VisualJSFPortlet exists inside portlet.xml(It checks <portlet-class> tag to find out if it's a portlet tag for JSF Portlet or not) - If no VisualJSFPortlet exists, create a new one for the newly created jsf portlet page - If a Visual JSFPortlet exists, then do nothing.
Dan, please verify the bug ASAP. Thanks
It works, as it should, BUT: 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.
Dane, this is different issue, please track this in new one.
Works as desired.
v.