You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by hrbaer <he...@gmail.com> on 2011/03/28 13:24:08 UTC
issue with
Hi all,
let's assume there is a form with an input field an two buttons: submit and
reset.
Within the java code I add a new form component (extends Form) with an input
field and implement the onSubmit() method.
But: Is there a chance to implement some onReset() method so I can do some
more stuff apart from cleaning the input field (which I cannot influence)?
Thanks in advance.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/issue-with-input-type-reset-tp3411379p3411379.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: issue with
Posted by Josh Kamau <jo...@gmail.com>.
Hi
You can add a wicket button on your form and implement onClick/onSubmit on
the button.
There many buttons including ajax enabled ones. See javadocs for details.
Something like
<form ....>
...
<button wicket:id="myButton"></button>
</form>
myForm.add(new Button("myButton"){
@Override
public void onSubmit() {
//do your stuff here
}
})
Josh.
>
RE: issue with
Posted by hrbaer <he...@gmail.com>.
thanks - that's it.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/issue-with-input-type-reset-tp3411379p3411433.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: issue with
Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> And idea how to avoid that behaviour?
resetButton.setDefaultFormProcessing(false);
- Tor Iver
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: issue with
Posted by hrbaer <he...@gmail.com>.
Meanwhile I tried to add another submit button and just labeling that as a
reset button.
This is almost working but after calling the onSubmit method of my "reset
button" the onSubmit method of my form get's triggered as well?!
This is my button:
-------------------------
Button resetButton = new Button("reset") {
public void onSubmit() {
doSomething();
}
};
add( resetButton );
-------------------------
And idea how to avoid that behaviour?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/issue-with-input-type-reset-tp3411379p3411408.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org