4 Replies Latest reply on Nov 13, 2008 10:18 AM by Flavio Henrique

    How to reRender only specific component with a4j:actionparam

    Flavio Henrique Newbie

      Hi there!
      I'm not sure if this is fully related with a4j:actionparam, but...

      I have a modalPanel with a r:dataTable.

      Each row has a h:commandLink to select the record row, hide the modalPanel and update two h:inputTexts in the main form (panel caller) with data from the row selected.

      Its working, except that all other components in the main form are reRendering too, leaving them all empty.

      Please, how to update only the two components assigned to the a4j:actionparam ??

      I'm using:
      RichFaces 3.2.2
      Facelets 1.1.14
      JSF 1.2

      thank you in advance!

      the h:commandLink (inside modalPanel - template.jspx):

      <h:commandLink
       onclick="Richfaces.hideModalPanel('mymodal');"
       style="text-decoration: none; border: none">
       <a4j:actionparam
       name="paramSigla"
       value="#{item.sigla}"
       assignTo="#{ManterPessoa.pessoa.localizacao.sigla}" />
       <a4j:actionparam
       name="paramDesc"
       value="#{item.descricao}"
       assignTo="#{ManterPessoa.pessoa.localizacao.descricao}" />
       <h:graphicImage
       value="/imagens/selecionar.gif"
       style="text-decoration: none; border: none"
       title="selecionar registro" />
      </h:commandLink>


      the code the call my modalPanel (from main form):
      <a4j:commandButton
       value="..."
       immediate="false"
       onclick="Richfaces.showModalPanel('mymodal'); return false;" />