Environment:
OS - Windows XP
GWT version - 1.5.3
browser - GWT Hosted Mode
JDK - Sun's SE v6 update 11
The javadoc API for FormPanel.wrap() says that the method "Creates a
FormPanel that wraps an existing <form> element. This element must
already be attached to the document. If the element is removed from
the document, you must call RootPanel.detachNow(Widget).
"If the createIFrame parameter is set to true, then the wrapped form's
target attribute will be set to a hidden iframe. If not, the form's
target will be left alone, and the FormSubmitComplete event will not
be fired."
To me, this implies that with wrapped form elements, the FormSubmit
event is fired whether createIFrame is set to true or false. However,
I can only get the FormSubmit event to fire if I set createIFrame to
true, and I can't get the FormSubmitComplete event to fire at all.
Is this a bug? A miss-match between documentation and behavior?
Sloppy reading on my part? Is there an error in my code?
FormPanel formPanel = FormPanel.wrap( DOM.getElementById
( "idOfForm" ), true );
formPanel.addFormHandler( new FormHandler(){
public void onSubmit( FormSubmitEvent event )
{
Window.alert( "I'm handling a submit." );
}
public void onSubmitComplete( FormSubmitCompleteEvent
event )
{
Window.alert( "I'm handling a completed submit." );
}
} );
Thanks,
S
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---