-
1. Re: h:selectOneMenu with a4j:support rendered unexpected htm
ilya_shaikovsky Aug 4, 2009 8:04 AM (in response to yyq2009)use onsubmit of a4j:support. It's not allowed to define both - tag event handler and support for the same event.
-
2. Re: h:selectOneMenu with a4j:support rendered unexpected htm
yyq2009 Aug 4, 2009 9:18 AM (in response to yyq2009)ilya_shaikovsky, Thanks for your timely reply.
If using onsubmit, the event will be fired till the form submited, right?
So i must use the event-onchange, because anthor menu dynamically changed following the first selectonemenu.
do you get me?
looking forward to your reply. -
3. Re: h:selectOneMenu with a4j:support rendered unexpected htm
ilya_shaikovsky Aug 4, 2009 10:24 AM (in response to yyq2009)So i must use the event-onchange
you pointed the support to onchange. So support's onsubmit called on every onchange. So your statement will be executed exactly in the same time as defined in onchange.
And b.t.w. A4J.AJAX.Submit() should not be used directly! It's internal api and could be changed before every release according to some optimization/customization tasks. -
4. Re: h:selectOneMenu with a4j:support rendered unexpected htm
yyq2009 Aug 4, 2009 10:44 PM (in response to yyq2009)ilya_shaikovsky, thanks for your reply. I still can't get you. I've tried
a4j:support's onsubmit, but onchange event can triggle the onsubmit event. You mean that i should add the event "onchange='changed=true;sumbit()'" to
selectonemenu , don't you?
Unfortunately, it works normally but not what i want.
Maybe i've misunderstood you, please give me some code example for this.
You know, a4j:commandButton can add custumer onlick event before it's own event code, why can't h:selectOneMenu do the same thing in another event like onchange or other events, the reason is that h:selectOneMenu is a JSF component not a richfaces component? -
5. Re: h:selectOneMenu with a4j:support rendered unexpected htm
ilya_shaikovsky Aug 5, 2009 4:22 AM (in response to yyq2009)<h:selectOneMenu> <f:selectItem itemLabel="Item1" itemValue="1"/> <f:selectItem itemLabel="Item2" itemValue="2"/> <f:selectItem itemLabel="Item3" itemValue="3"/> <f:selectItem itemLabel="Item4" itemValue="4"/> <a4j:support event="onchange" onsubmit="changed = true" action="#{testBean.checkItems}" ajaxSingle="true" ignoreDupResponses="true"></a4j:support> </h:selectOneMenu>
-
6. Re: h:selectOneMenu with a4j:support rendered unexpected htm
yyq2009 Aug 5, 2009 7:24 AM (in response to yyq2009)ilya_shaikovsky, good work. Thanks very much.