Here's my approach when designing something like that. Any validation
should happen immediately client side since that is one of the major
benefits of using AJAX. Doing an RPC call every time a field loses focus is
pretty inefficient - I think doing it this way is too easy to make it a
crappy exp
Thanks for all the help.
Vitali, I cannot simply disable the "save" button since our field
validation happens when field loses focus. If I disable "Save" button,
user will be confused.
Jason, yes, I do have a similar AsyncCommand package that does the
command chaining. The problem is, our UI is
So, you click save, then each field is validated individually via an
RPC?
One trick is to chain your RPC Calls. I have an abstract Callback that
implements Command and also has a field to hold an additional Command.
CommandCallback the execute() method is able to Fire the RPC that is
hand
It might be useful is to use a callbacks registry (perhaps the page
itself) that callbacks register themselves with when they start and
remove themselves when they return (successfully or otherwise). By
extending AsyncCallback you can make this process transparent. As
part of the remove process,
No just DOM events. Like I said, just disable the UI screen (i.e. popup a
modal dialogbox) until the RPC completes one way or another. That's by far
the simplest solution I can think of.
More complicated ones would involve grouping forms & specifying which are
incompatible. Then a framework wou
Sorry, "Wait" may have a misnomer here. I don't mean to have browser
block waiting for the asynchronous calls to finish.
What I mean is, before launching another asynchronous call, flush out
the AsyncCallbacks in the stack.
In a complicated UI screen, when saving the record, each field may go
th
No. "Waiting" in the browser means it freezes it (remember - single
threaded). Why not just disable the input fields that can lead to an RPC
call (& some kind of processing indicator so the user understands what's
going on) & reenable them when the call completes.
Just apply a proper MVC pattern
Hi GWT gurus,
I have a generic questions regarding asynchronous calls. Basically in
our gwt web application, when user clicks on "save button", the
application launches a bunch of asynchronous calls(validation, server
side callbacks).
"Save" should only be invoked when all those asynchronous cal