[jboss-user] [JBoss Seam] - start and kill a conversation

koatto do-not-reply at jboss.com
Fri Jan 5 17:18:44 EST 2007


<?xml version="1.0"?>
  | <html 
  | 	xmlns:h="http://java.sun.com/jsf/html"
  | 	xmlns:f="http://java.sun.com/jsf/core"
  | 	xmlns:s="http://jboss.com/products/seam/taglib"
  | 	xmlns:t="http://myfaces.apache.org/tomahawk"
  | 	xmlns="http://www.w3.org/1999/xhtml" version="2.0">
  | 	<head>
  | 	<title>search</title>
  | 	</head>
  | 	<body>
  | 	<f:view>
  | 		<h:outputText value="#{conversation.id}"/>
  | 		<div>id: <h:outputText value="#{myFather.id}" /></div>
  | 		<div>managed: <h:outputText value="#{FatherHome.managed}" /></div>
  | 		
  | 		<h:form>
  | 			<div>name: <h:inputText value="#{myFather.name}" /></div>
  | 			<s:button action="#{conversation.begin}" value="begin conv"/>
  | 			<h:commandLink  action="#{FatherHome.persist}" value="create" >
  | 				<s:conversationPropagation type="begin"/>
  | 			</h:commandLink>
  | 
  | 			<h:commandLink action="#{FatherHome.update}" value="update" >
  | 				<!--<s:conversationPropagation type="begin"/>-->
  | 			</h:commandLink>
  | 		</h:form>
  | 		
  | 		<h:messages/>
  | 	
  | 		<s:link   view="/common/child.seam" value="child">
  | 		</s:link>
  | 		</f:view>
  | 	</body> 
  | </html>
That's the code of my page, i cant understand why clicking the first commandLink   the conversation does not sart. Obviusly clicking the first button everything goes fine.

I have another problem, i need to kill the active conversation when a click a link on a dataTable, invoke a bean's method wich has to start a new conversation and inject objects. 
I procedeed this way:
 1 - the s:link in the table's row have propagation="end"
 2 - the invoked method has @Begin annotation
 3 - the method body gets the conversation context and pushes objects into.

The conversation ends an starts againg, with the same id, but the behaviour it's not the one i was expecting for. 
Is the conversation started just when leaving the @Begin annotated method? If this is true i'm pushing objects into a zombie conv...

What's the best way to solve this issue?

Thanks.

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

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



More information about the jboss-user mailing list