[jboss-user] [JBoss Seam] - pageflow and parameters transmition

gazadonf do-not-reply at jboss.com
Fri Dec 28 13:10:30 EST 2007


Hy all.

I don't anderstand why there's such a difference between page.xml navigation and pageflow navigation... It sucks!!!!

My problem is:

i have a list of element and i want to edit one of them.

When i use page.xml to navigate between the list page and the edit page, there's no problem to get the instance of the objet i want to edit.
Seam generator do it well.

In my listPage.xhtml, there's table of instance and a parameter define like this

<f:param name="historyId" value="#{history.id}"/>
  | 
in the link definition

<s:link view="/#{empty from ? 'History' : from}.xhtml" 
  |                         value="Select" 
  |                              id="history">
  |          <f:param name="historyId" 
  |                         value="#{history.id}"/>
  |             </s:link>

In my destiantion page.xml, i retrieve this parameter define like this
<param name="historyId" value="#{historyHome.historyId}"/>
and then, used in my destination page like this 
<h:outputText value="#{historyHome.instance.startDate}">

When i want to replace all page.xml by one navigation pageflow, i replace all of this by:

s:link
<s:link action="consultHistory" 
  |                    value="Select"
  |                       id="history">
f:param is the same

h:outputText is the same too

and in my pageflow i do this:
<page name="gestionProject" view-id="/project/HistoryList.xhtml">
  |  <redirect/>
  |  <transition to="consultHistory" name="consultHistory" >
  |     <param name="historyId" value="#{historyHome.historyId}"/>
  |  </transition>
  | </page>
  | 
  | <page name="consultHistory" view-id="/project/History.xhtml">
  |  <redirect/>
  |  <transition to="gestionProject" name="retour"></transition>
  | </page>

but i do not retrieve anything...

I also try 
<page name="gestionProject" view-id="/project/HistoryList.xhtml">
  |  <redirect/>
  |  <transition to="consultHistory" name="consultHistory" >
  |  </transition>
  | </page>
  | 
  | <page name="consultHistory" view-id="/project/History.xhtml">
  |     <param name="historyId" value="#{historytHome.historyId}"/>
  |  <redirect/>
  |  <transition to="gestionProject" name="retour"></transition>
  | </page>

but it doesn't work as well...

What's wrong with that?????

I try to find somme help in the samples projets of seam 2.0, but only numberguess use pageflow, and there's no direct transmission between pages...

And when i do something like this 
<s:link action="consultProject" 
  |                    value="Select"
  |                       id="project">
  |                 <f:param name="projectId" 
  |                         value="#{projectHome.setProjectId(project.id)}"/>
  |             </s:link>

without any parameter definition in the pageflow only the last instance is transmit to the next page, even if i click on the first one...

What is the solution??? Please...



here is the complete table code
<rich:dataTable id="projectList" 
  |                 var="project"
  |               value="#{projectList.resultList}" 
  |            rendered="#{not empty projectList.resultList}"
  |            onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
  |                 onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
  |                 
  |         <h:column name="idProject">
  |             <f:facet name="header">
  |                 <s:link styleClass="columnHeader"
  |                              value="id #{projectList.order=='id asc' ? messages.down : ( projectList.order=='id desc' ? messages.up : '' )}">
  |                     <f:param name="order" value="#{projectList.order=='id asc' ? 'id desc' : 'id asc'}"/>
  |                 </s:link>
  |             </f:facet>
  |             #{project.id}
  |         </h:column>
  |         <h:column>
  |             <f:facet name="header">
  |                 <s:link styleClass="columnHeader"
  |                              value="history id #{projectList.order=='history.id asc' ? messages.down : ( projectList.order=='history.id desc' ? messages.up : '' )}">
  |                     <f:param name="order" value="#{projectList.order=='history.id asc' ? 'history.id desc' : 'history.id asc'}"/>
  |                 </s:link>
  |             </f:facet>
  |             #{project.history.id}
  |         </h:column>
  |         <h:column>
  |             <f:facet name="header">
  |                 <s:link styleClass="columnHeader"
  |                              value="idMantis #{projectList.order=='idMantis asc' ? messages.down : ( projectList.order=='idMantis desc' ? messages.up : '' )}">
  |                     <f:param name="order" value="#{projectList.order=='idMantis asc' ? 'idMantis desc' : 'idMantis asc'}"/>
  |                 </s:link>
  |             </f:facet>
  |             #{project.idMantis}
  |         </h:column>
  |         <h:column>
  |             <f:facet name="header">
  |                 <s:link styleClass="columnHeader"
  |                              value="title #{projectList.order=='title asc' ? messages.down : ( projectList.order=='title desc' ? messages.up : '' )}">
  |                     <f:param name="order" value="#{projectList.order=='title asc' ? 'title desc' : 'title asc'}"/>
  |                 </s:link>
  |             </f:facet>
  |             #{project.title}
  |         </h:column>
  |         <h:column>
  |             <f:facet name="header">action</f:facet>
  |             <s:link action="consultProject" 
  |                    value="Select"
  |                       id="project">
  |                 <f:param name="projectId" 
  |                         value="#{projectHome.setProjectId(project.id)}"/>
  |             </s:link>
  |         </h:column>
  |     </rich:dataTable>

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

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



More information about the jboss-user mailing list