This content has been marked as final.
Show 4 replies
-
1. Re: Basic
sergeysmirnov Jul 24, 2007 6:18 PM (in response to ksteele6)The second produces the duplicate request. One request is by a4j:support, the second on is by h:commandButton.
The second request is a non-Ajax one. So, the whole page is reloaded discarding the result of ajax request.
To avoid this nightmare, you can use a4j:commandButton as a natural substitute for "h:commandButton - a4j:support" combination.
If using the h:commandButton is extrimly important for you, add disableDefault='true' to a4j:support.
What the Ajax4jsf version do you use, BTW? -
2. Re: Basic
ksteele6 Jul 25, 2007 9:39 AM (in response to ksteele6)Sergey - Thanks for the quick reply and for the help! This forum is very helpful. I've reworked the code. Here's the working version.
<h:outputText value="#{MyBacking.title}" id="title"> <a4j:commandButton value="Run" action="#{MyBacking.doRun}" reRender="title" onclick="alert('onclick');" oncomplete="alert('oncomplete');"> </a4j:commandButton>
-
3. Re: Basic
ksteele6 Jul 25, 2007 3:21 PM (in response to ksteele6)Sergey - BTW I'm using Ajax4jsf v1.1.0.
-
4. Re: Basic
sergeysmirnov Jul 25, 2007 7:02 PM (in response to ksteele6)"ksteele6" wrote:
Sergey - BTW I'm using Ajax4jsf v1.1.0.
Yep. Since 1.1.1, the disableDefault="true" by default.