When the Save button in the popup(pp1) clicked the projects list gets updated.
But when press the update button in the projects list, the render ID :form1:pp1 is not there error comes when its being rendered. If do render="@all" it works, but its not good.
( error : <f:ajax>
contains an unknown id ':form1:pp1')
<h:form id="form1" prependid=false>
<h:panelGroup id="projects">
<ui:repeat var="action" value="#{dadadada}" varStatus="status">
<h:commandButton value="Save">
//gives id not found error
<f:ajax event="click" execute="@form" render=":form1:pp1" listener="#{fsfsfsfsfs}" />
</h:commandButton>
</ui:repeat>
</h:panelGroup> // project panel group
//popup
<h:panelGroup id="pp1">
<div id="popup2" class="popup_block">
//save button in the popup
<div class="popupBody_save2">
<h:commandButton image="resources/images/saveBtn.gif" value="Save">
<f:ajax event="click" execute="@form" render="projects" listener="#{dfsfssfs}" />
</h:commandButton>
</div>
</div>
</h:panelGroup>
</h:form>
If you use
prependId=false
your panelGroup's id ispp1
instead ofform1:pp1
. (Assume there is a typo in your attribute "prependID" instead of "prependid")The
:form1:pp1
won't work since you haveprependId="false"
on the form. Thepp1
won't work since it's then looking for the component in the same scope as<ui:repeat>
which is by itself anUINamingContainer
component.Open the JSF page in webbrowser, rightclick and View Source to get the generated HTML. Locate the HTML element which is generated by
<h:panelGroup id="pp1">
. It should look something like thisYou need to use exactly this ID prefixed with
:
in therender
attribute.If there's an autogenerated ID part such as
j_id0
, then you need to give the parent component in question an fixed ID.