0

I'm experiencing some weird issue with JSF.

class MyBean{

     String path = "pages/includes/popup.xhtml";

    // Getters & Setters
}

Then I have my custom component

<cc:implementation>
  <ui:repeat var="tab" value="#{cc.tabs}">
     <div class="tab-pane fade show #{tab.active ? 'active' : ''}" id="#{tab.id}" role="tabpanel" aria-labelledby="#{tab.id}-tab">
         <ui:include src="#{tab.contentPath}" />
     </div>
  </ui:repeat>
</cc:implementation>

And my index.xhtml

<!-- It doesn't work -->
<ctm:tab contentPath="#{mybean.path}" />

...

<!-- It does work -->
<ui:include src="#{mybean.path}" />

Using #{mybean.path} on the custom component it renders nothing, blank page.

Dorin Brage
  • 158
  • 1
  • 5
  • 14
  • I´ve found the solution posted by another guy [Here the solution](https://stackoverflow.com/questions/20111010/jsf-dynamically-include-src-in-uiinclude-src-bean-pagepath) – Dorin Brage Mar 05 '18 at 15:37
  • Then either remove this question or Mark it as a duplicate – Kukeltje Mar 05 '18 at 18:34

0 Answers0