myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus B├╝ttner ...@buett.at>
Subject concurrency problem ajax value change event and page submit
Date Fri, 02 Jul 2010 11:35:46 GMT
Hi,

I have the following example:

        <h:outputLabel for="val1" value="Value1"/>
        <h:inputText id="val1"
                     value="#{myBean.val1}"
                     valueChangeListener="#{myBean.val1ChangedListener}">
            <f:ajax render="myText" event="change" />
        </h:inputText>

        <h:outputText id="myText" value="#{myBean.val1}"/>

        <h:commandButton id="button" value="submit" 
action="#{myBean.action}"/>

Now I fill out the input field and directly press Enter for submit or 
click submit button without leaving the input field before. Now two 
requests are send parallel (page submit and ajax value change event).
The problem is I found four different behaviours which comes random 
(with firefox):

1.) 1. request: value change listener is called. 2. request actions is 
called (that's what I expected)
2.) 1. request value change listener is called. but the action request 
is missing.
3.) 1. action request get's in an fires the value change event and calls 
the action. but than this message pops up:
"httpError-httpError-Request failed- Note, this message is only sent, 
because project sage is development and no other error listeners are 
registered"
4.) 1. request value change lister is called. 2. request also value 
change listener is called and than the action is called. the message 
above also pops up.

In IE sometimes the action is called, sometimes not. The value change 
listener is always called. But this error dialog (like in firefox) is 
never shown.

Is there any explanation? How could I force a fix behaviour?

Thx for help.

Marcus


Mime
View raw message