Sunday, January 29, 2012

How to wrap a “submit button” with GWT?

I am getting an error when I try to wrap a submit button with GWT:

Caused by: java.lang.AssertionError: Child cannot be null
at com.google.gwt.dom.client.Node$.isOrHasChild$(Node.java:278)
at com.google.gwt.user.client.ui.Button.wrap(Button.java:55)
HTML Code:

<div style="display:none">
<form id="login_form" action="javascript:;">
<input id="username" type="text">
<input id="password" type="password">
<button type="button" id="submit" name="submit" value="Submit">
</form>
</div>
Java Code (GWT):

loginButton = Button.wrap(Document.get().getElementById("submit"));
Is there any way to wrap a submit button?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment