5 Replies Latest reply on Aug 29, 2008 4:05 AM by Ilya Shaikovsky

    a4j:supprt actionListener not getting invoked

    Akansha jain Newbie

      Hi,
      I have a jsp page which contains a datatable. Each row of that datatable should be associated with a radio button. I want to call a listener method with selection of any radio button.
      Code is :

      <t:dataTable id="abc" var="tablevar" value="#{testBean.selectList}" >
       <t:column>
       <f:facet name="header">
       <t:selectOneRadio id="radioBttn" layout="spread" value="#{testBean.radioBttnVal}">
       <a4j:support event="onclick" actionListener="#{testBean.activateRow}" reRender="tableTest" immediate="true"/>
       <f:selectItem itemValue="Y" itemLabel="Y"/>
       <f:selectItem itemValue="A" itemLabel="A"/>
       <f:selectItem itemValue="B" itemLabel="B"/>
       </t:selectOneRadio>
       </f:facet>
       <t:radio for="radioBttn" index="0"/>
       </t:column>
      </t:dataTable>

      actionListener="#{testBean.activateRow}" -- This is not getting invoked.
      However if I remove datatable and put selectOneRadio in just <f:facet>, its working.
      Kindly give pointers regarding this issue. Thanks in advance.

        • 1. Re: a4j:supprt actionListener not getting invoked
          Ilya Shaikovsky Master

          please add rich:messages to your page.

          • 2. Re: a4j:supprt actionListener not getting invoked
            Akansha jain Newbie

            I have added <rich:messages/> but nothing is coming up. Plus how would it help in my problem. Lisneter is still not getting invoked.

            • 3. Re: a4j:supprt actionListener not getting invoked
              Ilya Shaikovsky Master

              Ok.. add please phasetracker to you libraries and paste the console output generated with it.

              • 4. Re: a4j:supprt actionListener not getting invoked
                Akansha jain Newbie

                o/p on console after clicking radio button in table is
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE RESTORE_VIEW(1)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE RESTORE_VIEW(1)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER RESTORE_VIEW(1)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER RESTORE_VIEW(1)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE APPLY_REQUEST_VALUES(2)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE APPLY_REQUEST_VALUES(2)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER APPLY_REQUEST_VALUES(2)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER APPLY_REQUEST_VALUES(2)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE PROCESS_VALIDATIONS(3)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE PROCESS_VALIDATIONS(3)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER PROCESS_VALIDATIONS(3)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER PROCESS_VALIDATIONS(3)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE UPDATE_MODEL_VALUES(4)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE UPDATE_MODEL_VALUES(4)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER UPDATE_MODEL_VALUES(4)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER UPDATE_MODEL_VALUES(4)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE INVOKE_APPLICATION(5)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE INVOKE_APPLICATION(5)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER INVOKE_APPLICATION(5)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER INVOKE_APPLICATION(5)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE RENDER_RESPONSE(6)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker beforePhase
                INFO: BEFORE RENDER_RESPONSE(6)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER RENDER_RESPONSE(6)
                Aug 29, 2008 1:11:16 PM org.exadel.jsf.PhaseTracker afterPhase
                INFO: AFTER RENDER_RESPONSE(6)

                • 5. Re: a4j:supprt actionListener not getting invoked
                  Ilya Shaikovsky Master

                  could you works with rich:dataTable instead of t:dataTable?