I have PolicySearch page showing search Results in a datatable. When I click on a specific row
in this datatable,
Code:
<view-state id="reviewPolicies" view="policySearch.xhtml">
<transition on="selectPolicy" to="selectedPolicy">
<set name="flowScope.aPolicy" value="searchResults.selectedRow" />
</transition>
</view-state>
I <transition on="selectPolicy"> to view-state "selectedPolicy"
Code:
<view-state id="selectedPolicy" view="selectedPolicy.xhtml">
<transition on="driverSummary" to="driverSummary" />
</view-state>
On this "selectedPolicy" view-state I correctly show the policyDetails using the flowScope.aPolicy object.
This page has a sidebar containing the link to the "Drivers" on that policy.
I want to click on the Drivers link in the sidebar and start the DriverSummary subflow using the "policy" object that is in the flowScope.
So I have this subflow-state
Code:
<subflow-state id="driverSummary" subflow="driverSummary">
<input name="policy" value="aPolicy" />
</subflow-state>
which goes to this driverSummary.xml flow which has <input> variable of policy which pulls the Drivers and shows them in the datatable.
Code:
<input name="policy" type="com.abc.model.Policy"/>
The problem is I always get a null "policy" input in the driverSummary.xml when I visit this flow using the sidebar link
that uses a <h:outputLink value="driverSummary"> Drivers </h:outputLink>
My flows are declared in webflow-config.xml as follows
Code:
<webflow:flow-location path="/WEB-INF/flows/policy/policySearch.xml" />
<webflow:flow-location path="/WEB-INF/flows/driver/driverSummary.xml" />
I have noticed when I hover my mouse over the Drivers link while i am on the policyDetails page (in policySearch flow)
the browser shows the link as
http://localhost.../spring/policy/driverSummary instead of http://localhost.../spring/driver/driverSummary
Could that be causing the issue.
Please help