2 Replies Latest reply on Oct 28, 2009 5:53 AM by Nick Belaevski

    ui:component | a4j:commandButton PassingValue in action.

    scott coleman Newbie

      Hello (again),

      On another thread my problem was fixed with regards to using the action attribute http://www.jboss.org/index.html?module=bb&op=viewtopic&t=162956 on an a4j:commandbutton in a ui:component. This problem was solved using this method:


      ButtonComponent.XML

      <ui:component
      ..........
       <a4j:commandButton
       ..............
       action="${myBean[myMethod]}"
       ...............>
       </a4j:commandButton>
      ............
      </ui:component>
      

      Cog:Button
       <cog:button
       ................
       myBean="${Bean}"
       myMethod="Method()">
       ...............
      </cog:button>
      


      This works fine, apart from when you want to send a parameter, such as "action="#{Bean.Method(true)}"

      Using the above method you would do this:
      myBean="${Bean}"
      myMethod="Method(true)">
      


      But that does not work.. an error message is thrown,

      /components/ButtonComponent.xhtml @53,17 action="${myBean[myMethod]}": Method not found: Bean:5d803p-kdg9wp-g1ah9z1x-1-g1auxf6l-7e.Method(true)()

      From this error i can see that there are double brackets, but im not sure if that is causeing the problem.

      Could anyone help with this problem?
      Thank you

      P.S i have posted this in a new thread because i thought it was a new problem)