0

I have multi-select listbox as below.

<t:selectManyListbox id="sourceCars"  style="width: 40%;"
                     value="#{PersonalInformationDataBean.listOfUsers002}" size="10">
    <t:selectItems value="#{PersonalInformationDataBean.showAllMyRemData()}" var="t"
                   itemLabel="#{t.title}" itemValue="#{t.status}" >
    </t:selectItems>
</t:selectManyListbox>

What I want is call a Java method say callMeOnDoubleClick() if I double click the item in the listbox.

Any idea how to get this done?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
  • Perhaps with an Asynchronous call when you click on that. You could use a Ajax function to do this, or a Jquery call but probably the famework you are using(JSF i suppose) has already a feature to do this. – PbxMan Oct 14 '12 at 09:34
  • @PbxMan : Which feature? – Fahim Parkar Oct 14 '12 at 10:02
  • @FahimParkar Don't you want to use the `valueChangeListener` ? of `t:selectManyListbox` – Daniel Oct 14 '12 at 12:08

1 Answers1

1

Use <f:ajax event="dblclick">.

<t:selectManyListbox ...>
    <f:ajax event="dblclick" listener="#{bean.listener}" />
</t:selectManyListbox>

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • could you please take a look at my new [question](http://stackoverflow.com/questions/12999353/images-wont-load-if-they-are-of-high-size) – Fahim Parkar Oct 21 '12 at 16:33