jsf 2 - change the components of one panel when an event occurs in another people -


suppose have left hand side panel , want change forms in panel based on event of components on left panel. how can in jsf?

i searched little bit , found tabview in primefaces can this. know whether there way of changing contents of panel event of 1 panel.

i understand question not quite specific searched on google , couldn't find satisfactory answer asking here.

thanks :)

1. have context in center:

left:

<p:commandbutton update="pncenter" actionlistener="#{bean.update}"/> 

center:

<p:outputpanel id="pncenter"> <p:outputpanel id="pn1" rendered="#{bean.render eq '1'}">   // content here </p:outputpanel> <p:outputpanel id="pn2" rendered="#{bean.render eq '2'}">   // content here </p:outputpanel> ///.... </p:outputpanel> 

2. have dynamic center:(each center context stored in xhtml file)

left:

<p:commandbutton update="pncenter" actionlistener="#{bean.update}"/> 

center:

<p:outputpanel id="pncenter">   <ui:include src="#{centerbean.link}"/> </p:outputpanel> 

bean.update method

centerbean.link = "/module/test1.xhtml"; // /module/test2.xhtml  /module/test3.xhtml 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -