-
1. Re: <a4j:support event="onselect"> does not work with <h:selectOneMenu>
ilya_shaikovsky Jan 19, 2010 10:36 AM (in response to gerry365)remove support and add onselect="alert('alert')" to component and compare the results. -
2. Re: <a4j:support event="onselect"> does not work with <h:selectOneMenu>
gerry365 Jan 19, 2010 11:14 AM (in response to ilya_shaikovsky)Ilya,
Thank you for your rapid reply; it's most appreciated. However, I don't understand what you've suggested. Here's my actual code:
<h:selectOneMenu value="#{productServices.selectedProduct}">
<f:selectItems value="#{productsMap}" id="id_SelectedProduct" />
<a4j:support id="id_onselecProduct"
actionListener="#{productServices.setProduct()}"
event="onselect" reRender="productpanel" />
</h:selectOneMenu>Are you suggesting I remove <a4j:support> element? If so, where does my action listener go?
-
3. Re: <a4j:support event="onselect"> does not work with <h:selectOneMenu>
nbelaevski Jan 19, 2010 1:42 PM (in response to gerry365)Hi,
If you don't see alert, then event is not being invoked by your actions. Please check documentation for "onselect" carefully.
-
4. Re: <a4j:support event="onselect"> does not work with <h:selectOneMenu>
gerry365 Jan 20, 2010 4:29 AM (in response to nbelaevski)Ilya & Nick,
Thanks for your help.
I have tried Ilya's suggestion and now realise that the 'onselect' event is actually not supported by the <select> element. 'onchange' and 'onclick' are supported. How odd.
Documentation at http://www.jsftoolbox.com/documentation/help/12-TagReference/html/h_selectOneMenu.html states that the 'onselect' event is supported by <h:selectOneMenu> and by <h:selectOneListbox>. However, documentation at http://www.w3schools.com/TAGS/tag_Select.asp does not list 'onselect' as an event supported by <select>.
Once again thanks for your help.
Gerry