7 Replies Latest reply on Dec 3, 2010 7:22 AM by heapifyman heapifyman

    a4j:actionparam and h:commandButton

    heapifyman heapifyman Newbie

      Hello everyone,

       

      I'm trying to use the a4j:actionparam with a h:commanButton.

      According to:

      http://livedemo.exadel.com/richfaces-demo/richfaces/actionparam.jsf

       

      it should work "with non-ajax command component also" but in my case it doesn't.

       

      Basically, what I tried to do is combine the two examples on above mentioned page:

      The "Change Demo Appplication Skin To:" example and the "Show Screen Size" example by using

       

                 <h:commandButton id="submit" value="Login" action="#{identity.login}">
                      <a:actionparam name="w" value="screen.width"
                           assignTo="#{environmentBean.screenWidth}" noEscape="true" />
                      <a:actionparam name="h" value="screen.height"
                           assignTo="#{environmentBean.screenHeight}" noEscape="true" />
                 </h:commandButton>
      <h:commandButton id="submit" value="Login" action="#{identity.login}">
           <a:actionparam name="w" value="screen.width" 
                assignTo="#{environmentBean.screenWidth}" noEscape="true" />
           <a:actionparam name="h" value="screen.height" 
                assignTo="#{environmentBean.screenHeight}" noEscape="true" />
      </h:commandButton>
      

       

      But the bean properties are not set when clicking the commandButton.

       

      Am I missing something?

      Thanks,

      Philip