2009/4/10 Ganesh <[email protected]> > Hi again, > > - Now here's my second problem: In 13.3.2 the spec says: >>All Ajax >>> requests must be put into a client side request queue before they are sent >>> to the server to ensure Ajax requests are processed in the order they are >>> sent.<< >>> >>> So, if you trigger a queue of n Ajax requests each of them would include >>> the same ViewState that was collected at the time when the request was >>> queued. But with each response the view state will have changed, making the >>> former collected view state obsolete! With >>> javax.faces.STATE_SAVING_METHOD==server the old view state may even be gone >>> if the queue size exceeds the number of view states stored in the session. >>> Also, with Ajax requests is it hard to think of a szenario, >>> >> >> I dont think this is an issue the view state is probably updated with each >> request and hence it does the states on every ajax request. >> > Yes, the view state is updated with each request, but view state is > collected before queuing a request. This is stated in the Javscript docs of > jsf.ajax.request and it's implemented this way in the RI, so a queuesize > superceeding the number of stored view states would probably break the > system. > > > Ok, if we provide a configurable queue size I would suggest the following processing: Each interaction which triggers an ajax request become a member of the queue. The interaction needs a snapshot of the current state of the form fields on the page (except the view-state hidden field). When the running request is finished, the next request could be sent with the snapshot-form-fields (actually only the fields which are mentioned in the "execute"-parameter). In my oppinion it doesn't make sense to have a queue size greater than one (in most cases). Also in the table-scrolling-scenario. Only the last position of the scrollbar is interesting to get all the rows which I need to show. If there are several "actions" in the queue it could become a performance issue. Unfortunately I've don't read the final of the spec. yet but I'm gonna read it until monday.
cheerz alex -- Mit freundlichen Grüßen / Kind regards Alexander Bell J4Fry OpenSource Community Internet: http://www.j4fry.org E-Mail: [email protected] Webprofil: http://www.j4fry.org/alexanderbell.shtml
