queue: in case sizeExceededBehavior="dropNext" the last event in queue perform
two request.
-------------------------------------------------------------------------------------------
Key: RF-5116
URL:
https://jira.jboss.org/jira/browse/RF-5116
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.0
Environment: IE6,7, FF 3.0.3, Safari 3.1, Opera 9.62(3.3.0- last snapshot)
Reporter: Mikhail Vitenkov
Assignee: Nick Belaevski
#1. Add a4j:queue inside form:
<h:form> ... <a4j:queue ../>..</h:form>
#2. Set size="1", sizeExceededBehavior="dropNext",
requestDelay="5000"
#3. Add checkbox and input inside the same form following way:
<h:inputText value="#{queueComponent.inputValue}" id="inputID">
<a4j:support id="inputSupport" event="onkeyup"
eventsQueue="#{queueComponent.inputQueue}"></a4j:support>
</h:inputText>
...
<h:selectBooleanCheckbox value="#{queueComponent.checkboxValue}"
id="checkboxID">
<a4j:support id="checkboxSupport" event="onchange"
eventsQueue="#{queueComponent.checkboxQueue}"></a4j:support>
</h:selectBooleanCheckbox>
#4. Navigate to the page, make a4j:log enabled.
#5. Initiate 'change' event for selectBooleanCheckbox and then 'keyup'
event for input during requestDelay(5 sec.).
#6. Verify a4j:log.
Actual behavior:
The queue performs two request:
debug[20:01:02,528]: Have Event [object Object] with properties: target: [object
HTMLInputElement], srcElement: undefined, type: change
debug[20:01:02,529]: Query preparation for form 'formID' requested
...
debug[20:01:02,559]: parameter formID:queueStraightforwardSubviewID:checkboxSupport with
value formID:queueStraightforwardSubviewID:checkboxSupport
debug[20:01:02,560]: Look up queue with name 'formQueue'
debug[20:01:02,561]: Found form queue 'formID:formQueue'
debug[20:01:02,562]: Queue is empty now
debug[20:01:02,562]: New request added to queue 'formID:formQueue'. Queue
similarityGroupingId changed to formID:queueStraightforwardSubviewID:checkboxSupport
debug[20:01:02,563]: Queue will wait 5000ms before submit
debug[20:01:05,205]: Have Event [object Object] with properties: target: [object
HTMLInputElement], srcElement: undefined, type: keyup
debug[20:01:05,207]: Query preparation for form 'formID' requested
...
debug[20:01:05,237]: parameter formID:queueStraightforwardSubviewID:inputSupport with
value formID:queueStraightforwardSubviewID:inputSupport
debug[20:01:05,239]: Look up queue with name 'formQueue'
debug[20:01:05,240]: Found form queue 'formID:formQueue'
debug[20:01:05,241]: Last queue entry is not the last anymore. Stopping requestDelay timer
and marking entry as ready for submission
debug[20:01:05,242]: Queue 'formID:formQueue' will submit request NOW
debug[20:01:05,243]: NEW AJAX REQUEST !!! with form: formID
debug[20:01:05,245]: Start XmlHttpRequest
debug[20:01:05,246]: Reqest state : 1
debug[20:01:05,247]: QueryString: ...
debug[20:01:05,257]: Reqest state : 1
debug[20:01:05,258]: New request added to queue 'formID:formQueue'. Queue
similarityGroupingId changed to formID:queueStraightforwardSubviewID:inputSupport
debug[20:01:05,259]: Queue will wait 5000ms before submit
debug[20:01:05,526]: Reqest state : 2
debug[20:01:05,529]: Reqest state : 3
debug[20:01:05,530]: Reqest state : 3
debug[20:01:05,532]: Reqest state : 4
debug[20:01:05,532]: Reqest end with state 4
debug[20:01:05,533]: Response with content-type: text/xml;charset=UTF-8
debug[20:01:05,534]: Full response content: <?xml version="1.0"?...
...
debug[20:01:10,258]: Queue 'formID:formQueue' will submit request NOW
debug[20:01:10,259]: NEW AJAX REQUEST !!! with form: formID
debug[20:01:10,261]: Start XmlHttpRequest
debug[20:01:10,262]: Reqest state : 1
debug[20:01:10,264]: QueryString:...
debug[20:01:10,268]: Reqest state : 1
debug[20:01:10,986]: Reqest state : 2
debug[20:01:10,989]: Reqest state : 3
debug[20:01:10,991]: Reqest state : 3
debug[20:01:10,992]: Reqest state : 4
debug[20:01:10,994]: Reqest end with state 4
debug[20:01:10,995]: Response with content-type: text/xml;charset=UTF-8
debug[20:01:10,996]: Full response content: ...
...
debug[20:01:12,738]: Call local oncomplete function after processing updates
debug[20:01:12,739]: After request: queue 'formID:formQueue'
debug[20:01:12,741]: There are 0 requests more in this queue
debug[20:01:12,742]: Queue is empty now
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira