Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318478 - [JSF 2.0] Primefaces Integration
Summary: [JSF 2.0] Primefaces Integration
Status: RESOLVED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: JSF Tools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Cameron Bateman CLA
QA Contact:
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-30 10:40 EDT by Thomas Kernstock CLA
Modified: 2017-12-19 13:26 EST (History)
2 users (show)

See Also:
raghunathan.srinivasan: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved? (naci.dai)
raghunathan.srinivasan: pmc_approved? (deboer)
raghunathan.srinivasan: pmc_approved? (neil.hauge)
raghunathan.srinivasan: pmc_approved? (kaloyan)
raghunathan.srinivasan: pmc_approved+
raghunathan.srinivasan: review+


Attachments
Handles bad ids more robustly (10.82 KB, patch)
2010-08-24 13:00 EDT, Cameron Bateman CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kernstock CLA 2010-06-30 10:40:43 EDT
Build Identifier: Build id: 20100617-1415

When I drag the Primefaces.jar into a Webprojects \WEB-INF\lib and open the webpageeditor the palette view shows only two new entries (wich is fine). But when I restart eclipse, I get entries for each component which is very annoying. When I look in the "Customize Palette" view all entries have the Description: http://java.sun.com/jsf/composite/.....

Additionally I find a lot of these entries in the eclipse errorlog:
- Error initializing facelet registry entry
org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory$InvalidIdentifierException
	at org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory.createLibraryResource(ResourceIdentifierFactory.java:56)
	at org.eclipse.jst.jsf.designtime.internal.resources.JarBasedJSFResourceLocator.processJar(JarBasedJSFResourceLocator.java:138)
	at org.eclipse.jst.jsf.designtime.internal.resources.JarBasedJSFResourceLocator.doLocate(JarBasedJSFResourceLocator.java:103)
	at org.eclipse.jst.jsf.designtime.internal.resources.AbstractJSFResourceLocator.doLocate(AbstractJSFResourceLocator.java:1)
	at org.eclipse.jst.jsf.common.internal.locator.AbstractLocator.locate(AbstractLocator.java:96)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.CompositeComponentTaglibLocator.start(CompositeComponentTaglibLocator.java:177)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.CompositeComponentTaglibLocator.start(CompositeComponentTaglibLocator.java:1)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.ProjectTaglibDescriptor$1.run(ProjectTaglibDescriptor.java:82)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.ProjectTaglibDescriptor.initialize(ProjectTaglibDescriptor.java:71)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.ProjectTaglibDescriptor.getTagLibraries(ProjectTaglibDescriptor.java:117)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.FaceletTagRegistry.initialize(FaceletTagRegistry.java:155)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.FaceletTagRegistry.getAllTagLibraries(FaceletTagRegistry.java:110)
	at org.eclipse.jst.jsf.facelet.core.internal.registry.FaceletTagRegistry.getTagLibrary(FaceletTagRegistry.java:201)
	at org.eclipse.jst.jsf.facelet.core.internal.metadata.FaceletNamespaceMetaDataLocator.locateMetaDataModelProviders(FaceletNamespaceMetaDataLocator.java:45)
	at org.eclipse.jst.jsf.common.metadata.internal.DomainLoadingStrategy.locateMetaDataSourceInstances(DomainLoadingStrategy.java:143)
	at org.eclipse.jst.jsf.common.metadata.internal.DomainLoadingStrategy.load(DomainLoadingStrategy.java:55)
	at org.eclipse.jst.jsf.common.metadata.internal.MetaDataModel.load(MetaDataModel.java:93)
	at org.eclipse.jst.jsf.common.metadata.internal.MetaDataModelManager.loadMetadata(MetaDataModelManager.java:147)
	at org.eclipse.jst.jsf.common.metadata.internal.MetaDataModelManager.getModel(MetaDataModelManager.java:90)
	at org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper.getMDModel(TaglibDomainMetaDataQueryHelper.java:205)
	at org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper.getModel(TaglibDomainMetaDataQueryHelper.java:90)
	at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.getOrCreateTaglibPaletteDrawer(PaletteHelper.java:131)
	at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.registerHTMLCategory(PaletteItemManager.java:343)
	at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.initTagRegistry(PaletteItemManager.java:307)
	at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.init(PaletteItemManager.java:272)
	at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.getInstance(PaletteItemManager.java:114)
	at org.eclipse.jst.pagedesigner.editors.palette.DesignerPaletteRoot.<init>(DesignerPaletteRoot.java:46)
	at org.eclipse.jst.pagedesigner.editors.palette.DesignerPaletteRootFactory.createPaletteRoot(DesignerPaletteRootFactory.java:112)
	at org.eclipse.jst.pagedesigner.editors.SimpleGraphicalEditor.getPaletteRoot(SimpleGraphicalEditor.java:483)
	at org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.setEditDomain(GraphicalEditorWithFlyoutPalette.java:145)
	at org.eclipse.jst.pagedesigner.editors.SimpleGraphicalEditor.<init>(SimpleGraphicalEditor.java:164)
	at org.eclipse.jst.pagedesigner.editors.HTMLEditor.sash_createAndAddDesignSourcePage(HTMLEditor.java:259)
	at org.eclipse.jst.pagedesigner.editors.HTMLEditor.createPages(HTMLEditor.java:439)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)

Reproducible: Always

Steps to Reproduce:
1. Create new Webproject
2. Drag and Drop primefaces-2.0.2.jar into \WEB_INF\lib
3. Create or open a .xhtml file with the webpage editor (just two entries for primefaces)
4. Restart eclipse and reopen .xhtml
5. Check paletteview and errorlog.
Comment 1 Cameron Bateman CLA 2010-08-23 20:01:10 EDT
The InvalidIdentifierException is being logged because PrimeFaces uses a non-standard identifier path for resources.  According to their docs:

"Although PrimeFaces 2.x uses JSF2 resource APIs to place resources on page, due to limitations of JSF2 resource loading mechanism, PrimeFaces Resource Servlet is required to stream the resources from the bundle".

I will change the factory to suppress errors and ignore identifiers in this case. 

As to all the empty drawers in the palette, I will follow-up with Gerry.  We have debated having an "auto-hide empty libraries" preference.
Comment 2 Cameron Bateman CLA 2010-08-24 13:00:36 EDT
Created attachment 177346 [details]
Handles bad ids more robustly
Comment 3 Cameron Bateman CLA 2010-08-24 13:10:29 EDT
Changes committed to 3.2.2 and 3.3.
Comment 4 Cameron Bateman CLA 2010-08-24 13:11:47 EDT
We have broken off the issue empty tag libraries in the palette to 323505.
Comment 5 Raghunathan Srinivasan CLA 2010-08-27 14:27:01 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 
Failure in WPE when using the PrimeFaces JSF 2.0 tag library
* Is there a work-around? If so, why do you believe the work-around is insufficient? 
None
* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
Manual
* Give a brief technical overview. Who has reviewed this fix? 
See comment 1
* What is the risk associated with this fix? 
none-low
Comment 6 Raghunathan Srinivasan CLA 2010-08-27 14:28:22 EDT
This failed to make this week's build because of spurious junit failures in local testing
Comment 7 Eclipse Genie CLA 2017-12-18 20:16:19 EST
New Gerrit change created: https://git.eclipse.org/r/114244