-
1. Re: <a4j:support ..../> question
nbelaevski Jun 23, 2009 5:29 AM (in response to kragoth)Hi Kragoth,
Are you observing the wrong behavior if you do not use alert() for onsubmit, but something another, e.g.window.status = 'start';
? -
2. Re: <a4j:support ..../> question
kragoth Jun 23, 2009 7:24 PM (in response to kragoth)Hi nbelaevski,
The suggestion you made is something I tried late yesterday and yes when I do that it works. (Obviously I need to do some more reading because I do not understand why an alert changes the behaviour but that's another question. :)
When I do a non alert javascript call it appears to behave correctly. Athough I'm having trouble with what I'm trying to do but I'm almost there :)
If you do know why the alert doesn't work I would appreciate an explanation, otherwise I'll go google around and do some reading.
Thanks again.
Tim -
3. Re: <a4j:support ..../> question
nbelaevski Jun 24, 2009 5:09 AM (in response to kragoth)Hi Tim,
I think it's browser dependent behavior; user events in chains are lost if modal window such as alert appears for some of them. -
4. Re: <a4j:support ..../> question
kragoth Jun 24, 2009 6:56 PM (in response to kragoth)Thanks.
I've now finally managed to get my problem sorted.
But I did notice some weird behaviour.
Using the following example (I think its right, I've had to cut it down a lot from my project)<h:form onsubmit="showPleaseWaitModalPanel();"> <h:inputText id="input"> <h:outputText id="output"/> <a4j:support event="onchange" onsubmit="showPleaseWaitModalPanel();" oncomplete="hidePleaseWaitPanel();" reRender="output"/> </h:inputText> <h:commandLink value="save" action="#{Bean.save()}" /> </h:form>
If I have my cursor in the inputText and change the value then using my mouse click the commandLink it appears that the action never happens.
However, If I remove the onsubmit from the form then it works.
So all I did is change the form from having onsubmit="....." to adding an EventListener to the form and that seems to work fine.
I don't really think there is a bug anywhere here but obviously something I'm doing is getting in the way.
But I'm happy enough, I've got things working and probably better overall design anyway.
Thanks for the help.