Send contents of Editor/RequestFactory managed form to server multiple times

39 views
Skip to first unread message

salk31

unread,
Dec 13, 2012, 9:27:08 AM12/13/12
to google-we...@googlegroups.com
Hello,

We are using UiBinder/Editors/RequestFactory nicely to do normal forms very happily. However we would now like to sometimes send the latest contents of the form to the server to do extra validation, generated derived values etc... This should all be transparent to the user.

I can't think of a particularly nice way to do this. I've got hacks to always fail validation (so the Request fails to that the RequestContext is not frozen). I guess I could modify GWT so that AbstractRequestContext exposes reuse..

Am I missing something obvious? Some way to clone RequestContext?

Cheers

Sam

salk31

unread,
Dec 19, 2012, 5:27:21 AM12/19/12
to google-we...@googlegroups.com
In case anyone else has similar problem, we are going to try:
* Attach another request context to our main one that contains a bean that lets us fail JSR-303 validation within our control - so request fails (so request context not frozen but server side beans are populated)
* Our own RequestTransport and RequestFactoryServlet that can stick mutliple requests (from different request contexts) together so sent over a single HTTP request (independent as far as RequestFactory is concerned)

So with this we send the latest state of the form to the server without any chance of the request context getting marked as frozen and with the same server side request execute other Request Factory requests so the server can use the latest state.

We have a prototype that seems to work. Fiddly things like making sure user actions don't try and fire off a request while the request context is blocked but we were going to queue those anyway.

We would still like a simpler solution though ;)

Regards

Sam
Reply all
Reply to author
Forward
0 new messages