[jboss-user] [JBoss Seam] - Re: Parameter passing for page action

christian.bauer@jboss.com do-not-reply at jboss.com
Thu May 10 14:21:33 EDT 2007


It's the same issue I talked about in the other forum thread: You are trying to use doStuff(foo.bar) for something it simply doesn't do. What you wrote is just a shortcut for this:


  | @Name(categoryAction)
  | Class CategoryAction
  | {
  | 
  | @In("#{home.category}")
  | private Category category;
  | 
  | public String action()
  | {
  | this.category = category
  | return "category.xhtml"
  | }
  | }
  | 

As you can probably guess, when action() is called, the @In will not find "home" because that component is not in any stateful context. So you need to put it in a stateful context - and there are only two choices for such a simple case: Session and Conversation. 

Session is not good because it is not isolated for different browser windows and concurrent access. So you want to read up on Conversation and how you can span a conversation context across requests, to put stuff into it and read out of it.


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

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



More information about the jboss-user mailing list