3 Replies Latest reply on Jun 30, 2011 9:14 AM by florianhell

    RequestParameter problem

    kirshsam
      Hi, I am having trouble getting the value of the request parameter from my view to action method. Can someone please help explain what I am doing wrong?

      VIEW:
                  <h:commandButton value="Submit" action="#{postingAction.confirm}">
                      <f:param name="subCatId" value="1" />
                  </h:commandButton>

      ACTION:

                 @Name("postingAction")
                 @Scope(ScopeType.CONVERSATION)
                 public class PostingAction implements java.io.Serializable {

                  @RequestParameter
                       Long subCatId;

                public void confirm() {          
                      System.out.println(subCatId);  // this prints NULL
                   }
                  ...
                 

      Thank you.