Oh, in this case the approach I suggested does not work, I
think...sorry but I didn't get "page flow" logic properly.

Then your approach of a submit handler will be better.
MaybAs an alternativeif you don't strictly need a form for what you'r
doing you can define a GWT RPC method that contains the parameters you
need to redirect properly or update your GUI.

Something like this:

//RPC interface, synchronous version
public String submit(SubmitWrapper content);   //SubmitWrapper class
contains what you want to submit

//invocation
SubmitWrapper content = .....//build
submitService.submit(content, new AsyncCallback<String>(){
onSuccess(String redirectURL){
Window.open(redirectURL, "_self", null);
}
onFailure(Throwable caught){  //handle}
});

Whether to use an handler or define your RPC depends on your needs (I
don't know struts so much...), yet it's another alternative you can
consider if you're still designing your interface.

I can suggest you to join the GWT discussion group here:
http://groups.google.com/group/Google-Web-Toolkit

Regards
Lorenzo

On Dec 29, 3:06 pm, dreamer <venugopal.vasire...@gmail.com> wrote:
> Thanks Ikai & Lorenzo. I am trying "page flow" as in struts, server
> does some business logic
> and tells where to go next depends on some biz logic or status.
>
> I will try your suggestions.
>
> On Dec 29, 1:41 am, "l.denardo" <lorenzo.dena...@gmail.com> wrote:
>
> > Why don't you simply build the form panel with the specified target in
> > the constructor?
>
> >http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...
>
> > FormPanel uses a hidden IFrame to manage the cycle of submit/receive
> > response; if you give a target to the constructor it will follow
> > standard behavior of replacing the current page after submit.
>
> > Regards
> > Lorenzo
>
> > On Dec 28, 2:10 pm, dreamer <venugopal.vasire...@gmail.com> wrote:
>
> > > Instead of server dispatching/forwarding to a new page as in
> > > traditional web flows,
> > > I send the page name as response to BROWSER, and used GWT -
> > > onSubmitComplete
> > > event to go to new page.
> > > ====== HERE CLIENT side code ====
> > > formPanel.addSubmitCompleteHandler(new
> > > FormPanel.SubmitCompleteHandler() {
> > >               public void onSubmitComplete(SubmitCompleteEvent event) {
> > >                   shownextpage("/page2.html");
> > >               }
> > >             });
> > > ---------------------------------------------------------------------------
> > >  -----------
> > > private native void shownextpage(String message) /*-{
> > >         $wnd.alert(message);
> > >         $wnd.location.href="/page2.html";
> > >         }-*/;
> > > ---------------------------------------------------------------------------
> > >  ----------------
>
> > > On Dec 28, 3:10 am, dreamer <venugopal.vasire...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > I have a GWT entry point that submits to servlet , build using
> > > > "FormPanel".
> > > > I am trying to build page flow using servlet "RequestDispatcher" or
> > > > "sendRedirect", even though no exception GAE is not forwarding to next
> > > > page.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to