Announcement Announcement Module
No announcement yet.
calling a view-state from an html link <a> tag Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • calling a view-state from an html link <a> tag

    Hi there,
    How can I call a view-state from with in a <a href="" ..> tag.
    Essentially I want to open up a specific view-state from with in a SWF flow
    when the user clicks an html link in the sidebar.
    Please help,

  • #2
    it's just possible to call a Flow (where the first View-state will be showed/executed)
    But it's not possible to enter in the middle of a flow - probably you have to split your workflow into flow parts and/or subflow parts


    • #3
      I have PolicySearch page showing search Results in a datatable. When I click on a specific row
      in this datatable,

      <view-state id="reviewPolicies" view="policySearch.xhtml">
      <transition on="selectPolicy" to="selectedPolicy">
      			<set name="flowScope.aPolicy" value="searchResults.selectedRow" />
      I <transition on="selectPolicy"> to view-state "selectedPolicy"

      <view-state id="selectedPolicy" view="selectedPolicy.xhtml">
      		<transition on="driverSummary" to="driverSummary" />
      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

      <subflow-state id="driverSummary" subflow="driverSummary">
      		<input name="policy" value="aPolicy" />
      which goes to this driverSummary.xml flow which has <input> variable of policy which pulls the Drivers and shows them in the datatable.

      <input name="policy" type=""/>
      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

      <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


      • #4
        At the moment, you cannot signal an event to Web Flow using a JSF <h: outputLink>. You must use a commandLink, or some other component that is a JSF ActionSource.