Announcement Announcement Module
Collapse
No announcement yet.
How to call state transition from <h:selectOneListbox> onClick event? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to call state transition from <h:selectOneListbox> onClick event?

    Is there a way to call a state transition from onClick event of <h:selectOneListbox>?

    eg.

    Code:
    <h:selectOneListbox id="selectedSite" value="#{searchCriteria.siteCode}" size="15" onClick="call the  --"search"--  transition">
         <f:selectItems value="#{referenceDataService.sites}" />
    </h:selectOneListbox>

    flow definition

    Code:
    <view-state id="selectSite">	
          <transition on="search" to ="somewhereelse"/>
    </view-state>

    swf 2.3.0
    primefaces 2.2.1

    Thanks in advance.

  • #2
    You can use p:remoteCommand to execute the transition for this case

    Anil.

    Comment


    • #3
      thanks for the quick response. It works!

      Comment


      • #4
        Have just solved this problem in the following way without Primefaces:
        HTML Code:
        <h:selectOneMenu id="category" value="#{filterOrder.deliveryStatus}"
                         onchange="document.getElementById('deliveryListForm:filterButton').click()">
        where filter button is hidden button.

        Quite painless BTW.

        Comment

        Working...
        X