[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580264#action_12580264
 ] 

Mario Ivankovits commented on TOMAHAWK-1214:
--------------------------------------------

re 1:
I'd say we do it like the standard PPR.
Using submitOnEvent a button can be clicked. PPR then has that button as 
partialTrigger configured and intercept the form submission. Now, instead of 
submitting the form its data will be put into the queue.
The tricky thing here is, that on the response the viewState has to be taken 
and on next request the captured viewState needs to be replaced by the new one.

re 2:
Since it is a normal request, the normal JSF lifecycle will be executed.


Another open question is, what about the response? I'd like to see yet another 
ppr option (queueResponseUpdate="lazy|eager") with default to "eager".
On eager, each response will be used to update the browser dom, on lazy, only 
the last response of a queue will be used.
So, if the user executes many successive requests (e.g. through a barcode 
scanner), there is no need to refresh the user interface all the time.

> allow to process form submits in a queue for high-speed input handling
> ----------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1214
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1214
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: PPRPanelGroup
>            Reporter: Mario Ivankovits
>            Assignee: Ernst Fastl
>
> Enhance the PPR stuff in a way which allows to process form input asynchron 
> in a queue for high-speed input handling.
> Probably by adding a new attribute to the PPRPanelGroup called 
> "queued=true|false". With "true" the form data should be collected and held 
> in a queue on client side.
> The client then checks that queue at given intervalls (queueCheckInterval=) 
> if there is data in the queue and transmit that data to the server like a 
> normal ppr request. Between each transmit a queueWaitInterval= should be 
> waited.
> A status component (queueShowStatus=true|false) should show the success of 
> each transmit. A client side javascript should be used to extract the status 
> text information from the form data 
> (queueShowStatusInfoBuilder=javascript-method-name(formData))
> The PprPanelGroup should also be enhanced to being able to point to the 
> messages component (messages=component-id) the queueStatus information should 
> then be able to visualize that text and show e.g. a red-cross if there were 
> errors (=messages)
> For this first version the status info can be a simple table created 
> client-side using some css to allow to format it according to the application 
> skin.
> A simple table with two columns
> status-info|return-visualization
> status-info is the text returned by the queueShowStatusInfoBuilder javascript 
> method and return-visualization might be an icon.
> Only waiting requests and those with errors should be shown, correctly 
> finished requests can be removed from the list.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to