java - Include different file with primefaces -


i'm trying include different file according type of java object.

i'm doing :

<p:panelgrid rendered="#{adapter.habitation}" >     <ui:include src="./habitation.xhtml" /> </p:panelgrid>  <p:panelgrid rendered="#{adapter.animas}">     <ui:include src="./animals.xhtml" /> </p:panelgrid> 

but cases throw exception because it's trying resolve xhtml files.

any idea what's wrong?

thanks

you need boolean expression in rendered attribute.

try this:

<p:panelgrid rendered="#{adapter.habitation != null}" >     <ui:include src="./habitation.xhtml" /> </p:panelgrid>  <p:panelgrid rendered="#{adapter.animas != null}">     <ui:include src="./animals.xhtml" /> </p:panelgrid> 

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -