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

antispart do-not-reply at jboss.com
Thu Jan 11 17:42:20 EST 2007


Thanks petemuir.

I have the following code:

actionBean

  |     @Begin(join=true)
  |     public void foo() {
  |         if(player!=null)
  |            log.debug("set");
  |     }
  |     public void setBar(String bar) {
  |         this.bar= bar;
  |     }
  |     public String getBar) {
  |         return bar;
  |     }
  | 

pages.xml

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

xhtml

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

While foo() gets called every time the page is accessed. the setBar() method is never called.  

If I add:

  | <param name="bar" value="#{actionBean.bar}"/>    
  | 
to the pages.xml then the setBar() is called, BUT.

Once i've navigated to the page 1 time from the s:link now the bar property is always not-null (note that this is a conversation scoped bean).

Is there any solution to this?

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

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



More information about the jboss-user mailing list