[jboss-user] [JBoss Seam] - begin-conversation in Seam2 prevents data load

damianharvey do-not-reply at jboss.com
Thu Jul 12 06:13:11 EDT 2007


Morning,

I have an issue with jboss-seam-2.0.0.BETA1. 

I have an all-on-one CRUD page where selecting an item in the table reloads the current page and populates the create/edit form in another div. If the page.xml has <begin-conversation join="true"/> then the form will not be populated (ie. the form field values are not set). If I remove the <begin..>, then it works (the form field values are populated with the data from the selected table row).

A conversation isn't required for my example page, however I have some more complex pages where one is.

The same behaviour was not present in Seam 1.2.1GA. I have tried this with a sample app Seam-Gen'd using both Seam2.0.0 and also with Seam1.2.1.

My example form PersonList.xhtml:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  |                              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  | 
  | <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  |                 xmlns:s="http://jboss.com/products/seam/taglib"
  |                 xmlns:ui="http://java.sun.com/jsf/facelets"
  |                 xmlns:f="http://java.sun.com/jsf/core"
  |                 xmlns:h="http://java.sun.com/jsf/html"
  |                 xmlns:a="https://ajax4jsf.dev.java.net/ajax"
  | 		xmlns:rich="http://richfaces.ajax4jsf.org/rich"
  |                 template="layout/template.xhtml">
  |                        
  | <ui:define name="body">
  |     <h:form id="person" styleClass="edit">
  |         <rich:panel>
  |             <f:facet name="header">Edit Person</f:facet>
  | 
  |             <s:decorate id="personidDecoration" template="layout/edit.xhtml">
  |                 <ui:define name="label">personid</ui:define>
  |                 <h:inputText id="personid"
  |                        required="true"
  |                        disabled="#{personHome.managed}"
  |                           value="#{personHome.instance.personid}">
  |                     <a:support event="onblur" reRender="personidDecoration" bypassUpdates="true"/>
  |                 </h:inputText>
  |             </s:decorate>
  | 
  |             <s:decorate id="firstnameDecoration" template="layout/edit.xhtml">
  |                 <ui:define name="label">firstname</ui:define>
  |                 <h:inputText id="firstname" 
  |                        required="true"
  |                            size="50"
  |                       maxlength="50"
  |                           value="#{personHome.instance.firstname}">
  |                     <a:support event="onblur" reRender="firstnameDecoration" bypassUpdates="true"/>
  |                 </h:inputText>
  |             </s:decorate>
  | 
  |             <s:decorate id="lastnameDecoration" template="layout/edit.xhtml">
  |                 <ui:define name="label">lastname</ui:define>
  |                 <h:inputText id="lastname" 
  |                        required="true"
  |                            size="50"
  |                       maxlength="50"
  |                           value="#{personHome.instance.lastname}">
  |                     <a:support event="onblur" reRender="lastnameDecoration" bypassUpdates="true"/>
  |                 </h:inputText>
  |             </s:decorate>
  |         
  |             <div style="clear:both">
  |                 <span class="required">*</span> 
  |                 required fields
  |             </div>
  |             
  |         </rich:panel>
  |     </h:form>
  |     
  |     <rich:panel>
  |         <f:facet name="header">Person search results</f:facet>
  |     <div class="results" id="personList">
  |     <rich:dataTable id="personList" 
  |                 var="person"
  |               value="#{personList.resultList}" 
  |            rendered="#{not empty personList.resultList}">
  |         <h:column>
  |             <f:facet name="header">
  |                 personId
  |             </f:facet>
  |             #{person.personid}
  |         </h:column>
  |         <h:column>
  |             <f:facet name="header">
  |                 firstName
  |             </f:facet>
  |             #{person.firstname}
  |         </h:column>
  |         <h:column>
  |             <f:facet name="header">
  |                  lastName
  |             </f:facet>
  |             #{person.lastname}
  |         </h:column>
  |         <h:column>
  |             <f:facet name="header">action</f:facet>
  |             <s:link view="/PersonList.xhtml" 
  |                    value="Select" 
  |                       id="person">
  |                 <f:param name="personPersonid" 
  |                         value="#{person.personid}"/>
  |             </s:link>
  |         </h:column>
  |     </rich:dataTable>
  | 
  |     </div>
  |     </rich:panel>
  |         
  | </ui:define>
  | 
  | </ui:composition>
  | 

My PersonList.page.xml:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <page xmlns="http://jboss.com/products/seam/pages"
  |       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |       xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
  |       
  |    <begin-conversation join="true"/> <!-- the line that causes my hair-loss -->
  |    <param name="personPersonid" value="#{personHome.personPersonid}"/>
  | 
  | </page>
  | 

Has the way that conversations are treated changed between 1.2.1 and 2.0.0? Nothing in the changelog.txt rings any bells. I have looked at the debug output but can't spot anything that would cause this behaviour.

I can upload this sample app (both versions) if anyone would like to see it.

Thanks,

Damian.

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

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



More information about the jboss-user mailing list