3 Replies Latest reply on Feb 27, 2009 12:28 PM by giomiano

    a4j:commandLink not working on rich:modelPanel

    janakiram
      Hi All,

      I am displaying dataTable on model panel('searchPanel') as each row in Data Table has a4j:link ,when I click a link it has to show another model panel named 'addressPanel' with data.

      searchpanel is:-

      <rich:modelPanlel id="searchPanel">
      ..........
      ........
      <a4j:form ajaxSingle="true">
      <a4j:region>
      <rich:dataTable  var="accounts" value="#{accountDetails}">
      ..............

      .......
           <rich:column align="center">
                                                   <f:facet name="header">
                                                        <h:outputText value="Billing Address" />
                                                   </f:facet>
                                                   <a4j:commandLink id="billingAddressType333"
                                                        reRender="addressPanel" value="#{accounts.billingAddressType}"
                                                        ajaxSingle="true"
                                                        oncomplete="#{rich:component('addressPanel')}.show()">
                                                        <h:graphicImage value="/img/view.png" style="border:0"/>
                                                        <f:setPropertyActionListener
                                                             value="#{accounts.residenceAddress}"
                                                             target="#{customerHome.agile_ResidenceAddress}" />
                                                        <f:setPropertyActionListener
                                                             value="#{accounts.businessAddress}"
                                                             target="#{customerHome.agile_BusinessAddress}" />
                                                        <f:param value="#{accounts.billingAddressType}"
                                                             name="addressType" />
                                                        <s:conversationPropagation type="join" />
                                                   </a4j:commandLink>
                                                   <rich:toolTip for="billingAddressType333" value="View Address" />
                                              </rich:column>

      ..........
      ........

      </rich:dataTable>
      </a4j:region>
      </a4j:form>
      </rich:modelPanlel>


      But, when i click  link, target beans are not populating with data. But, 'addressPanel' is being displayed with empty data.I have not placed any of the modelPanel inside a form.
         It is working fine when we are mounting dataTable on normal panel instead of model pane.

      Can any one suggest me to solve this.

        • 1. Re: a4j:commandLink not working on rich:modelPanel
          giomiano

          I do not really see what entity is on your modalpanel,
          however try to use a @datamodelselection or instead an action setSelectedItem(accounts) on your a4j:commandLink


          Hope it helps

          • 2. Re: a4j:commandLink not working on rich:modelPanel
            janakiram
            even i use action method on a4j.commanadLink it is not firing.



            Account Entity:
            ---------
            @Name("account")
            @Entity
            @Scope(ScopeType.CONVERSATION)
            public class Agile_Account implements Serializable {

            @OneToOne
            private Agile_BusinessAddress businessAddress;
            @OneToOne
            private Agile_ResidenceAddress residenceAddress;

            }


            customerHome:-


            @Name("customerHome")
            public class CustomerHome extends EntityHome<Agile_Customer> implements
                      Serializable {

            @DataModel
            private List<Agile_Account> accountDetails = new ArrayList<Agile_Account>();

            Agile_BusinessAddress agile_BusinessAddress;

            Agile_ResidenceAddress agile_ResidenceAddress;

            @RequestParameter("addressType")
            String addressType;

            ....
            ..
            .




            }

            I am using RF 3.3.0 and Mozilla5.0
            • 3. Re: a4j:commandLink not working on rich:modelPanel
              giomiano

              janakiram,
              you did not try what i suggested, is it ?


              post all code.. we cannot help you with a segment of code