Announcement Announcement Module
No announcement yet.
no transition executed from h:dataTable link Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • no transition executed from h:dataTable link

    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
    	<var name="searchForm" class="" />
    	<var name="meetings" class="" />
    	<var name="meeting" class="" />
    	<view-state id="searchMeeting" view="searchCriteria.xhtml" >
    		<transition on="search" to="browseMeetings" >
    	<view-state id="browseMeetings" view="browseMeetings.xhtml" >
    			<evaluate expression="meetingService.find(flowScope.searchForm)" result="meetings" result-type="dataModel"/>
    		<transition on="seeMeeting" to="sfMeetingDetail">
    			<set name="flowScope.meetingId" value="meetings.selectedRow" />
    		<transition on="refineSearch" to="searchMeeting" />
    	<subflow-state id="sfMeetingDetail" subflow="meetingDetail" >
    		<input name="flowScope.meetingId" required="true"/>
    		<transition on="exit" to="browseMeetings">
    		<transition on="abort" to="home" />
    and my xhtml looks like
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <ui:composition xmlns=""
    <ui:define name="content">
    <h:form id="meetingsForm" >
    	<div class="section">
    			<sf:commandLink value="Suche anpassen" action="refineSearch"/>
    		<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">
    						<f:facet name="header">Datum</f:facet>
    						<f:facet name="header">Tags</f:facet>
    						<f:facet name="header">Tageszeit</f:facet>
    					<h:column >
    						<f:facet name="header">Mehr...</f:facet>
    						<sf:commandLink id="seeMeetingLink" value="Detail" action="seeMeeting" />
    now my first quetion is:
    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

  • #2
    btw it doesn't help to change the sf:commandLink to h:commandLink...


    • #3
      You can load it in the previous state as long as you put it in a scope that is also available to the next state (i.e. flow or conversation).

      Regarding your event, my guess is that there isn't a row selected hence the assignment fails and the screen rerenders. Enable debug logging and check thelogging.