[jboss-user] [JBoss Seam] - Ajax, conversation and multiple requests..

appendix do-not-reply at jboss.com
Tue Dec 4 06:22:00 EST 2007


Hi!

I'm having an entity bean ("personal") with some attributes, which I would like to edit through a view page - nothing special so to say.
But I'm getting some random 
anonymous wrote : 
  | The conversation ended, timed out or was processing another request
  | 
JSF Messages while editing the page exhaustively.

I've used seam-gen to set up the project and everything is working well.

My issue arose after I decorated all the input fields on the edit view with s:decorate and do a re-render on "onblur" to get the field immediately validated and a warning right next to the field, if validation fails. 

Let me examplify with the following fraction from personal.xhtml:

  | <s:decorate id="nameDecoration" template="/layout/edit.xhtml">
  |   <ui:define name="label">
  |     <h:outputText value="#{messages['newPersonal.label.accountName']}"/>
  |   </ui:define>
  |   <h:inputText id="name" required="true" value="#{personalHome.instance.accountName}">
  |     <a4j:support event="onblur" reRender="nameDecoration"   />
  |    </h:inputText>
  | </s:decorate>
  | 

All other input fields (approximately 20 - just to do some stress test) for each attribute of the entity bean is alike (id and reRender attribute adjusted respectively).

When the page is displayed by the browser and a regular user is editing each field after another, not causing the onblur event being fired too quickly, everything is fine.

But consider a user, selecting the first input element with the mouse and then hitting (and continuously holding down) the "Tab" key on the keyboard, leading to onblur events being fired from each input element very quickly -> The quoted message will pop up and the user is redirected to the home view. 

This behavior is definitely not what I'd like to see, so I'm asking myself, how to prevent this situation?

I've tried to put a 
anonymous wrote : eventQueue="personalAjaxQueue"
on every a4j:support element, improving the situation, but randomly I'm still getting the described behavior.

Am I understanding the whole situation right, that the redirect is caused, because an AJAX request is fired and the old one is not completely processed (and it happens in the same conversation)?

Has anyone else seen this behavior on forms with many input fields? 

Any suggestions?

Any help is greatly appreciated!

Best regards, Kurt

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110140#4110140

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110140



More information about the jboss-user mailing list