jsf - How to reference p:commandLink in p:dataTable from p:blockUI trigger? -
this not working me:
<h:form id="wfmgtform"> . . . <p:datatable id="wftable" ..." var="item"> <p:column> . . . </p:column> <p:column> <p:commandlink id="editwatchfolderbuttonid" oncomplete="dlgeditwf.show()" update=":editwfform" process="@none"> <f:param value="#{item.value.id}" name="editid"/> <h:graphicimage alt="edit image" style="border: none" value="./images/edit.png" /> </p:commandlink> </p:column> . . . <p:blockui block=":wfmgtform" trigger="editwatchfolderbuttonid"> loading...<br/> <p:graphicimage alt="loader image" value="/images/loader.gif"/> </p:blockui> </h:form>
the error getting is:
cannot find component identifier "editwatchfolderbuttonid"
.
when used firebug id, discovered every row has different id:
wfmgtform:wftable:0:editwatchfolderbuttonid
wfmgtform:wftable:1:editwatchfolderbuttonid
wfmgtform:wftable:2:editwatchfolderbuttonid
wfmgtform:wftable:3:editwatchfolderbuttonid
etc.
how should reference auto created ids <p:blockui>
?
the <p:datatable>
namingcontainer
. include id well.
<p:blockui ... trigger="wftable:editwatchfolderbuttonid">
the row index nowadays in client side, not in server side, that's not relevant.
update: tested locally, indeed fixes exception, didn't trigger block ui @ (primefaces 3.5). bug in primefaces.
in meanwhile, best bet manually trigger suggested aksel, different:
<p:commandlink ... onclick="bui.show()" oncomplete="bui.hide()"> ... <p:blockui widgetvar="bui" />
jsf jsf-2 primefaces blockui
No comments:
Post a Comment