1 Reply Latest reply on Jun 4, 2008 2:02 PM by Marcelo Leiras

    Create actionparam dynamically

    Marcelo Leiras Newbie

      Hi,

      i have to convert the code above to java.

      <a4j:support event="onclick" reRender="imgGrafico" oncomplete="javascript:Richfaces.showModalPanel('mpGrafico')" actionListener="#{auditoria.gerarGraficoAuditoria}">
       <a4j:actionparam name="xxx" value="#{item.id}" assignTo="#{auditoria.idAuditoriaSelecionada}" />
      </a4j:support>
      


      I have no problem with the a4j:support. But i don't know how to pass the a4j:actionparam to java. I tried the following code, but it did not work:

      HtmlActionParameter actionparam = new HtmlActionParameter();
      actionparam.setName("xxx");
      actionparam.setValueBinding("vb", application.createValueBinding("#{item.id}"));
      actionparam.setAssignToBinding(application.createValueBinding("#{auditoria.idAuditoriaSelecionada}"));
      supportClick.addActionListener(actionparam);
      


      Any suggestion? Thanks a lot!