Announcement Announcement Module
Collapse
No announcement yet.
SWF 2.3.1: Implementing JSF Composite Component Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWF 2.3.1: Implementing JSF Composite Component

    Hi,

    It seems people are able to implement composite components in SWF 2.3.1, but I cannot find a clear reference for how this is done. I have followed the basic structure for a JSF composite component, but my SWF application does not seem to recognize the taglib namespace.

    Code:
    Warning: This page calls for XML namespace http://java.sun.com/jsf/composite/myjsf declared with prefix mj but no taglibrary exists for that namespace.
    Component definition:

    src/main/resources/myjsf/testComponent.xhtml :

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:composite="http://java.sun.com/jsf/composite">
    	
    <composite:interface>
    	<composite:attribute name="attr" />
    </composite:interface>
    <composite:implementation>
    
    #{cc.attrs.attr});     		
    
    </composite:implementation>
    </html>
    Referenced in a given xhtml:

    Code:
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:p="http://primefaces.org/ui"
    	xmlns:mj="http://java.sun.com/jsf/composite/myjsf">
    
      <!-- snip -->
    
      <mj:testComponent attr="x" />
    
    </ui:composition>
Working...
X