Hi all
i'm using the h:dataTable tag to render a dataModel. For each row i have a link that should execute a transition to a detail state (which is defined as a subflow). Now that doesn't quite work. The transition is never executed, the same view is rendered again.
my flow definition is
and my xhtml looks likeCode:<var name="searchForm" class="org.starthello.web.data.forms.SearchForm" /> <var name="meetings" class="org.starthello.web.data.SearchResults" /> <var name="meeting" class="org.starthello.web.data.model.Meeting" /> <view-state id="searchMeeting" view="searchCriteria.xhtml" > <transition on="search" to="browseMeetings" > </transition> </view-state> <view-state id="browseMeetings" view="browseMeetings.xhtml" > <on-render> <evaluate expression="meetingService.find(flowScope.searchForm)" result="meetings" result-type="dataModel"/> </on-render> <transition on="seeMeeting" to="sfMeetingDetail"> <set name="flowScope.meetingId" value="meetings.selectedRow" /> </transition> <transition on="refineSearch" to="searchMeeting" /> </view-state> <subflow-state id="sfMeetingDetail" subflow="meetingDetail" > <input name="flowScope.meetingId" required="true"/> <transition on="exit" to="browseMeetings"> </transition> <transition on="abort" to="home" /> </subflow-state>
now my first quetion is:Code:<!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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:sf="http://www.springframework.org/tags/faces" template="/WEB-INF/layouts/default.xhtml"> <ui:define name="content"> <h:form id="meetingsForm" > <div class="section"> <h2>Suchergebnisse</h2> <p> <sf:commandLink value="Suche anpassen" action="refineSearch"/> </p> <ui:fragment id="searchResultsFragment"> <div id="searchResults"> <h:outputText id="meetingError" value="Meetings nicht geladen" rendered="#{meetings == null}"/> <h:outputText id="noMeetingsText" value="Keine Meetings gefunden!" rendered="#{meetings.rowCount == 0}"/> <h:dataTable id="meetingsDataTable" styleClass="summary" value="#{meetings}" var="m"> <h:column> <f:facet name="header">Datum</f:facet> #{m.meetingDate} </h:column> <h:column> <f:facet name="header">Tags</f:facet> #{m.tags} </h:column> <h:column> <f:facet name="header">Tageszeit</f:facet> #{m.daytime} </h:column> <h:column > <f:facet name="header">Mehr...</f:facet> <sf:commandLink id="seeMeetingLink" value="Detail" action="seeMeeting" /> </h:column> </h:dataTable> </div> </ui:fragment> </div> </h:form> </ui:define> </ui:composition>
why can't i load the dataModel used for the dataTable tag in the previous transition? data is only displayed when i load it in the <on-render> action of the current state. why is that?
and my second question is:
why is no transition executed and the same view is rendered again?
any help is very appreciated!
cheers, simon


Reply With Quote
