Note that there are some explanatory texts on larger screens.

plurals
  1. PONested JSF composite components not fully compatible with Primefaces
    text
    copied!<p>I'm trying to create a nested JSF composite control wrapped in a Primefaces Accordion control. However when the tab components are placed within the nested component they are not rendered at all. </p> <p>outerComponent.xhtml</p> <pre><code>&lt;composite:interface/&gt; &lt;composite:implementation&gt; &lt;p:accordionPanel&gt; &lt;composite:insertChildren/&gt; &lt;/p:accordionPanel&gt; &lt;/composite:implementation&gt; </code></pre> <p>innerComponent.xhtml</p> <pre><code>&lt;composite:interface&gt; &lt;composite:attribute name="title" type="java.lang.String"/&gt; &lt;/composite:interface&gt; &lt;composite:implementation&gt; &lt;p:tab id="#{cc.attrs.title}" title="#{cc.attrs.title}"&gt; Some content &lt;/p:tab&gt; &lt;/composite:implementation&gt; </code></pre> <p>testPage.xhtml</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:w="http://java.sun.com/jsf/composite/wizard" xmlns:p="http://primefaces.org/ui"&gt; &lt;h:head&gt; &lt;/h:head&gt; &lt;h:body&gt; &lt;w:outerComponent&gt; &lt;w:innerComponent title="tab1"/&gt; &lt;/w:outerComponent&gt; &lt;/h:body&gt; &lt;/html&gt; </code></pre> <p>HTML output:</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;head&gt;&lt;link type="text/css" rel="stylesheet" href="/iip/javax.faces.resource/theme.css.xhtml?ln=primefaces- aristo-custom" /&gt;&lt;link type="text/css" rel="stylesheet" href="/iip/ javax.faces.resource/primefaces.css.xhtml?ln=primefaces" /&gt;&lt;script type="text/ javascript" src="/iip/javax.faces.resource/jquery/jquery.js.xhtml? ln=primefaces"&gt;&lt;/script&gt;&lt;script type="text/javascript" src="/iip/ javax.faces.resource/primefaces.js.xhtml?ln=primefaces"&gt;&lt;/script&gt;&lt;/head&gt; &lt;body&gt; &lt;div id="j_idt7:j_idt10" class="ui-accordion ui-widget ui-helper-reset ui-hidden- container" role="tablist"&gt;&lt;input type="hidden" id="j_idt7:j_idt10_active" name="j_idt7:j_idt10_active" value="0" /&gt;&lt;/div&gt; &lt;script id="j_idt7:j_idt10_s" type="text/ javascript"&gt;PrimeFaces.cw('AccordionPanel','widget_j_idt7_j_idt10', {id:'j_idt7:j_idt10'});&lt;/script&gt; &lt;/body&lt;/html&gt; </code></pre> <p>When it runs there are no errors and while the Accordion divs are rendered, the tabs are not. However if I move the <code>&lt;p:tab&gt;</code> tags into the <code>outerComponent.xhtml</code> file then they are rendered correctly, but that is not what I require.</p> <p>Any suggestions?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload