I have a form in a webpage in a GWT project, which contains only one element which is a text box. As of now, no events are fired by the form. When I open the page and I put some text in the box and press enter, the GWT module unloads. Don't understand why this is happening. This also happens when events fire functions on form submits and pressing enter in the text box. Here's the form:
<form id = "search_form">
<input id = "search_box" class="search_text_box" type="text"
placeholder="Search" autocomplete="off">
</form>
The page shows error "Ljava.lang.stackTraceElement@b" everytime the form fires events after unloading. What could possibly be wrong? The project also has GWTQuery included.
You may want to read this https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/k9qxjRWuahw
The form submit by default will trigger a page reload, thus unloading/reloading your module and you don't want that. So you want to cancel the default form submission behaviour.
I believe that using a g:form, among possible other things, does just that under the scenes.