Results 1 to 4 of 4

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

  1. #1
    Join Date
    May 2009
    Posts
    4

    Default 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. #2
    Join Date
    May 2007
    Posts
    11

    Default

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

    Anil.

  3. #3
    Join Date
    May 2009
    Posts
    4

    Default

    thanks for the quick response. It works!

  4. #4
    Join Date
    Dec 2010
    Posts
    4

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •