Announcement Announcement Module
Collapse
No announcement yet.
Do I use a action-state? loading dropdown values based on radio button Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Do I use a action-state? loading dropdown values based on radio button

    Do I use a action-state? loading dropdown values based on radio button

    I am trying to load the values of a dropdown based on the user clicking a radio button but I dont know if this can be done with a action-state.

    This is what I was thinking.

    My flow has:
    <view-state id="SchoolVisitReport" view="SchoolVisitReport.jsp" model="visit">
    <transition on="submit" to="addVisit">
    <evaluate expression="flowActions.validateVisit(visit, messageContext)"/>
    </transition>
    <transition on="cancel" to="endState" bind="false"/>
    <transition on="loadSchools" to="loadSchools" bind="false"/>
    </view-state>

    <action-state id="loadSchools">
    <evaluate expression="flowActions.initializeSelectableStates ()" result="flowScope.selectableStates" />
    </action-state>

    and my controller has something like this
    public Map<String, String> initializeSelectableStates(Visit visit) {
    LOGGER.debug("inside initializeSelectableStats");

    LinkedHashMap<String, String> selectableStates = new LinkedHashMap<String, String>();

    selectableStates.put("NY", "NY");
    selectableStates.put("Nj", "Nj");
    return selectableStates;
    }


    but this does not work.. can someone please help me out
Working...
X