[jboss-user] [JBoss Seam] - Conversation binding workaround

vineetmanohar do-not-reply at jboss.com
Fri Apr 20 17:21:41 EDT 2007


Hi,

Currently I have a seam component "numberGuess" with Conversation.SCOPE. It has a binding that I want to use on the view page directly, but can't because of seam limitation.
@Name("numberGuess")
  | @Scope(ScopeType.CONVERSATION)
  | public class NumberGuess implements Serializable {
  |   private UIInput input;
  | }

My view is as follows:
<h:inputText binding="#{numberGuess.input}"/>

I realize that conversation scoped components cannot be accessed through "binding" from the view, as discussed in the following posts:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=97544
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=99270
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=97182

As a workaround the posts suggest that "Just do you bindings on an event scoped object and inject that object in."

I am new to seam and would appreciate if someone could explain a bit more specifically how to accomplish the above. Do I need to create a new seam component with EVENT scope?

Thanks in advance!

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

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



More information about the jboss-user mailing list