2 Replies Latest reply on Mar 6, 2008 2:23 AM by Sergey Smirnov

    a4j:actionparam  is always null in method ??????????????

    Phil Wilson Apprentice

      Can anyone help...

      the a4j:actionparam is always null when I check it in method.

      Thanks
      Phil

      --------------------------------------------------------------
      <h:panelGroup>
      <a4j:commandLink action="go_testParmPage" actionListener="#{memberViewForm.getMemberInfoAttrib}" immediate="true">
      <h:outputText value="Test passing parm " />
      <a4j:actionparam id="memberId_str" name="memberId_str" value="#{welcomeMembersZip.memberId_str}"
      assignTo="#{welcomeMembersZip.memberId_str}" />
      </a4j:commandLink>
      </h:panelGroup>

      ------------------------------------------------------------------------------
      memberViewForm {
      ...

      public void getMemberInfoAttrib(ActionEvent event) {

      Object resultMEMBER_ID_str_obj = event.getComponent().getAttributes().get("memberId_str");
      String resultMEMBER_ID_str = FacesUtil.getActionAttribute(event, "memberId_str");
      Object resultMEMBER_ID_str_obj = event.getComponent().getAttributes().get("memberId_str");

      // tried several ways to get the a4j:actionparam in method...all null

      ------------------------------------------------------------------------------
      package testA4j
      import javax.faces.event.ActionEvent;

      public class FacesUtil {
      public static String getActionAttribute(ActionEvent event, String name) {
      return (String) event.getComponent().getAttributes().get(name);
      }
      }