2 Replies Latest reply on Apr 30, 2013 9:29 PM by rafael nunes

    a4j:commandLink -> a4j:param assignTo always 0

    Patrick Huber Newbie

      Hi, i have a rich:dataTable with some columns, and one column with a a4j:commandLink. I want to get one parameter ( which is shown correctly in the dataTable outputText ), to the a a4j:param to to something. No matter what the param's value is, i always get 0 in the producing function. Here is what I did :



      <rich:dataTable id="table" iterationStatusVar="it" value="#{myBean.list}" var="myvar">


           <h:outputText value="#{myvar.id}"/>



      <a4j:commandLink execute="@this" render="@none" oncomplete="#{rich:component('confirm')}.show()">

      <h:graphicImage value="/images/delete.gif" style="border:none;"/>

      <a4j:param value="#{myvar.id}" assignTo="#{myBean.currentItem}" />









      <rich:popupPanel id="confirm" autosized="true">

      Delete ?

      <a4j:commandButton id="a" value="Cancel" onclick="#{rich:component('confirm')}.hide(); return false;" /> <tr/>

      <a4j:commandButton id="b" value="Delete" onclick="remove(); return false;" />




      <a4j:jsFunction name="remove" action="#{myBean.delete}" render="table" execute="@this" oncomplete="#{rich:component('confirm')}.hide();" />





      So the Function myBean.delete always shows me that currentItem is 0. It is so strange, because when I change the javax.faces.PARTIAL_STATE_SAVING to true, it is working in this example, but then I got other Problems like, a bounded dataTable isn't working anymore an stuff like this. So I am am little bit depending on using it on false. Is there a way of getting the popup window to work without javax.faces.PARTIAL_STATE_SAVING true, or does anyone how to make a popup window work in a bounded dataTable ?