[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

gavin.king@jboss.com do-not-reply at jboss.com
Wed Jul 12 16:26:03 EDT 2006


"iradix" wrote : Ok Gavin, let me try to explain.  I have a page that outputs a DataTable of objects.  A user can click on an object's name to select it and bring up an update form or use a button below the list to bring up a form for new object creation.  When either of these forms is successfully submitted, the user is returned to the page with the DataTable
  | 
  | I want to set the conversation that the @DataModel is outjected into as long running so that when the postback occurs for a selection and my @DataModelSelection is injected it will be sure to come from the same @DataModel displayed to the user.
  | 
  | When a new object is created, I want to end the conversation so that the @DataModel, which was retrieved using a now stale query and any state associated with it is dropped before the page with the DataTable is redisplayed.
  | 
  | So therein lies my problem.  If I begin the conversation from the page containing the DataTable and the conversation is ended by an action method that redisplays that page, the conversation will always be restarted, even after issuing a redirect.
  | 
  | Make sense?
  | 
  | I'm not married to doing things this way, but it's the best I've come up with, so if it can be done differently please point me in the right direction.
  | 
  | -Dave
  | 
  | 

So you have

(1) A conversational search screen 

I usually recommend that search screens be page scoped, session scoped, or even purely stateless.

http://blog.hibernate.org/cgi-bin/blosxom.cgi/2006/06/22#stages-of-adoption

(2) A conversation that edits the data and then returns to the search screen 

Shouldn't it be a nested conversation then?

(3) the need to update the search screen when done editing the data 

why not just use a Seam event that forces refresh of the list (just like the booking list in the booking demo)


Have I understood everything here?

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

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



More information about the jboss-user mailing list