jsf 2 - JSF 2.0 h:panelgroup render by h:commandButton through f:ajax, which is inside ui:repeat -


<h:panelgroup id="userpanel" >    <ui:repeat value="#{searchview.userlist}" var="user" rowkeyvar="index" >      //other code         <h:commandbutton value="test" action="#{searchaction.dofindusers}"   >         <f:ajax execute="@this" event="action" render="userpanel" />     </h:commandbutton>    </ui:repeat> 

when use render inside ui:repeat tag showing following error

<f:ajax> contains unknown id 'userpanel' - cannot locate in context of component j_idt870

when specify client id without : prefix, it's searched relative parent namingcontainer component. in code, <ui:repeat> closest parent namingcontainer. however, component you're targeting not inside <ui:repeat>, instead it's outside <ui:repeat>. explains why cannot found using relative client id.

you need specify absolute client id instead. starters, easy way figure out locating html representation of jsf component in generated html output, grabbing id , prefixing :. prefixing : makes absolute client id resolved relative uiviewroot instead of closest parent namingcontainer.

see also:


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -