【发布时间】:2014-07-14 21:49:04
【问题描述】:
我无法用我有限的 Spring_flow 知识来解决这个问题。这是我的两个视图状态。
<view-state id="viewPatientState" view="viewPatient.xhtml" model="patient">
<transition on="newPatient" to="addPatient" />
<transition on="viewPatient" to="viewPatientState" />
<transition on="viewPatientProfile" to="patientProfile">
</transition>
</view-state>
<view-state id="patientProfile" view="patientProfile.xhtml" model="patient">
<transition on="newPatient" to="addPatient" />
<transition on="viewPatient" to="viewPatientState" />
</view-state>
我想从 viewPatient 将患者对象或只是一个 id(整数)发送到 patientProfile。这是我的 viewPatient.xhtml。我只想传递所选行的 id 或所选对象。
<p:dataTable id="tbl" var="pat"
value="#{patientService.getAllPatients()}" paginator="true"
rows="10">
<p:column>
<f:facet name="header">
<h:outputText value="Hasta No" />
</f:facet>
<h:outputText value="#{pat.patientId}" />
</p:column>
<p:column exportable="false">
<f:facet name="header">
<h:outputText value="Soyisim" />
</f:facet>
<h:outputText value="#{pat.lastName}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="İsim" />
</f:facet>
<h:outputText value="#{pat.firstName}" />
</p:column>
<p:column exportable="false">
<f:facet name="header">
<h:outputText value="Yaş" />
</f:facet>
<h:outputText value="#{pat.age}" />
</p:column>
<p:column exportable="false">
<f:facet name="header">
<f:facet name="header">
<h:outputText value="Profil" />
</f:facet>
</f:facet>
<p:commandLink id="profileLink" action="viewPatientProfile"
ajax="false">
<h:outputText value="Detay" />
</p:commandLink>
</p:column>
</p:dataTable>
【问题讨论】:
标签: jsf spring-mvc spring-webflow