Community
Participate
Working Groups
Content Model (CM) for Facelets is contributed in such a way that it's only being used for content assist (CA). Any general queries for CM for a given Node in a Facelets document comes back empty. Our adopter product has a number of places where a list of Wlement's attributes is requested via CM, using the following SSE APIs: ModelQuery modelQuery = ModelQueryUtil.getModelQuery(node.getOwnerDocument()); CMElementDeclaration elementDeclaration = modelQuery.getCMElementDeclaration((Element) node); In case of facelets, elementDeclaration comes back as null. This appears to be due to the fact that CM information is not contributed to SSE by means of a Model Query (ext-point org.eclipse.wst.xml.core.modelQueryExtensions). I see this ext point present in plugin.xml for o.e.jst.jsf.facelets.ui, but commented out.
Our experience with model query in the past is that it is too limited to be useful for our purposes. What feature is missing or disabled because of the lack of content model objects?
What limits were you alluding to?
I would need to go back through our attempts to do Facelet support, but as I recall, it was only really useful for narrow content assist use cases. Two open bugs that illustrate some of the limitations are: 153563 and 311957.
(In reply to comment #1) > What feature is missing or disabled because of the lack of content model objects? Our adopter product uses generic Content Model API in many places, usually (but not limited) to get a list of attributes of a given node. Therefore all CM-based features of the product work fine on a JSP, but fail on a Facelet page, due to lack of the Content Model. The typical generic code to get attributes of a node looks like this: ModelQuery modelQuery = ModelQueryUtil.getModelQuery(node.getOwnerDocument()); CMElementDeclaration elementDeclaration = modelQuery.getCMElementDeclaration((Element) node); CMNamedNodeMap nodeMap = elementDeclaration.getAttributes();
Deferring this to 3.3 due to lack of resources.
Fix submitted at 2011/03/31 05:12PM PDT.