[jboss-user] [JBoss Seam] - Correct way to start conversation

alllle do-not-reply at jboss.com
Fri Feb 8 18:13:22 EST 2008


Given the many options I can use to start a new conversation, I am still not sure what is the correct way for my situation. 

I have a page that shows the summary info, no long-running conversation. It contains a <s:link> to a editing page that should starts a long-running conversation. In addition, when this page is created, it needs to perform an action to load the object from the database for editing. I have tried the following ways but they all have some problem:

Method 1: in the <s:link>, besides specifying view ID, I also specify an action that is annotated with @Begin to start a conversation, which loads the data from the DB. <s:link> propagation set to "join".
Problem:  
Refreshing the resulting page causes a new conversation been created instead of reusing the one just created.

Method 2:  in the pages.xml file for the view, I specify the <start-conversation> tag. I also specify an action="" attribute to trigger loading of the data from the DB. propagation set to "join".
Problem: : 
Each time the view is accessed, it reloads the data from DB , even for ajax calls.
Refreshing page causes new conversation to start, ajax calls are fine.

What I want is when the view is access the first time, create the conversation, load the data from the DB. However, using the existing conversation when the page is refreshed. What is the proper way to achieve this in seam?

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

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



More information about the jboss-user mailing list