5 Replies Latest reply on Apr 14, 2011 10:24 AM by Job Mathew Kollamana

    Nested component not fireing the event

    Job Mathew Kollamana Newbie

      i have table insdie a table.

       

      and the inner table has some combo box.

       

      and on change of value i wanted to fire some event but its not firing any event.

       

      red colored lines are problem makers

       

       

                                                   <rich:comboBox var="tes" value="#{expense.role}" enableManualInput="false" defaultLabel="Role" suggestionValues="#{bean.flags}" >

                                                     <a4j:actionparam  value="#{tes}" assignTo="#{expense.role}" action="#{bean.ruler}" />

                                                  </rich:comboBox>

                                           </rich:column>       

                                            <rich:column  breakBefore="true" rendered="#{(row+1) eq bean.steps.size()}" colspan="3">

                                               <a4j:commandButton value="Conclude">   

                                                   <a4j:support event="onclick" action="#{bean.save}" reRender="table"/>

                                               </a4j:commandButton>                                

                                               <a4j:commandButton value="Cancel">

                                                   <a4j:support event="onclick" action="#{bean.cancel}" reRender="table"/>

                                               </a4j:commandButton>   

                                           </rich:column>       

        • 1. Nested component not fireing the event
          Ilya Shaikovsky Master

          1) addition of a4j:param will not add any ajax to combobox. need a4j:support.

          2) do not nest supports to commands. them already ajax'ified. just define attributes from support at buttons.

          • 2. Nested component not fireing the event
            Job Mathew Kollamana Newbie

            I have updated the code like below, but still am not getting call to any funcation in backend or getting the value setted in the backing bean.

             

            No event is getting fired

             

              <rich:column width="10px">

                                                         <rich:comboBox var="tes" value="#{expense.role}" enableManualInput="false" defaultLabel="Role" suggestionValues="#{bean.flags}" >

                                                            <a4j:support value="#{tes}" event="onselect" assignTo="#{expense.role}" action="#{bean.saveRole}" />

                                                        </rich:comboBox>

                                                 </rich:column>       

                                                  <rich:column style="text-align:right"  breakBefore="true" rendered="#{(row+1) eq bean.steps.size()}" colspan="3">

                                                     <a4j:commandButton value="Conclude" action="#{bean.saveStepResult()}" reRender="table"/>                            

                                                     <a4j:commandButton value="Cancel" action="#{bean.cancel()}" reRender="table" />   

                                                 </rich:column>       

            • 3. Nested component not fireing the event
              Job Mathew Kollamana Newbie

              I kept my bean  in keepalive state.

               

              so now from combo box the event is firing, but still for the button there is no event generated and not getting the control on the backend

              • 4. Nested component not fireing the event
                Nick Belaevski Master

                Please post complete page code.

                • 5. Nested component not fireing the event
                  Job Mathew Kollamana Newbie

                  Thank you so much i have fixed the issue by keeping the first table which holds the nested table into a <a4j:form>