jsf 2 - preRenderView and ajax -



jsf 2 - preRenderView and ajax -

i have prerenderview attached component a. there component b has ajax. ajax render hidden component has text fields in it. problem ajax not rendering inputtext field

<h:form....> <ui:composition...> <f:event type="prerenderview" listener="#{bean.action}"> ........... <ui:composition/> <ui:composition...> <h:selectoneradio....> <f:ajax render="inputtextid"../> <h:selectoneradio/> <ui:fragment rendered="#{condition}"> <h:inputtext id="inputtextid" ...../> <ui:fragment/> <ui:composition/> <h:form/>

the re-rendering takes place @ client side help of javascript after receiving ajax response. requires generated html output of to-be-updated component already in client side. in case, it's never there in generated html output. need swap rendered , id attributes.

<h:selectoneradio ...> <f:ajax render="inputtextwrapperid" /> </h:selectoneradio> <h:panelgroup id="inputtextwrapperid" > <h:inputtext id="inputtextid" rendered="#{condition}" /> </h:panelgroup>

this issue unrelated pre render view event. have same problem when removed it.

see also: communication in jsf 2 - ajax rendering of content conditionally rendered

ajax jsf-2

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -