[jboss-user] [JBoss Seam] - Re: invoke a action method everytime a page is accessed FROM

antispart do-not-reply at jboss.com
Fri Jan 12 10:00:34 EST 2007


petemuir,

I tried:

action bean:
    
  |    @RequestParameter
  |     private String bar;       
  |     
  |     @Begin(join=true)
  |     public void foo() {
  |         if(bar!=null)
  |             log.debug("set");
  |     }
  | 

xhtml:

  | <s:link ...>     
  |    <f:param name="bar" value="testtest"/>
  | </s:link>   
  | 

pages.xml:

  | <page view-id="/players/plays.xhtml" action="#{playerPlayAction.foo}"/>
  | 

Now, when foo() gets called with the s:link the @RequestParameter bar is never set. But if i use an h:outputLink or just type the url string myself then the @RequestParameter does get set. Is this expected behavior?

The advantage of s:link is that I could continue a conversation (add "join=true" to the foo() method) AND pass in params via a @RequestParam.

Is this not meant to work with s:link or am I do something wrong?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000979#4000979

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000979



More information about the jboss-user mailing list