You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Michał Letyński <ml...@consol.pl> on 2010/03/29 11:20:19 UTC
Bug with
Code:
Form<?> form = new Form<Void>("form1");
form.add(new Button("submitButton2") {
@Override
public void onSubmit() {
//logic2
}
});
form.add(new Button("submitButton1") {
@Override
public void onSubmit() {
//logic1
}
});
Markup:
<form wicket:id="form1">
<button type="button" wicket:id="submitButton2">Submit2</button>
<button type="submit" wicket:id="submitButton1">Submit1</button>
</form>
On ie, after clicking on "Submit 1" onSubmit() from submit button2 will
be invoked. Its because IE send's the name of the button type="button"
and Form#findSubmittingButton() takes this button.
Is it a known problem ? Can i create a jira issues for that ?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Bug with
Posted by Michał Letyński <ml...@consol.pl>.
Of course it can be solved.
http://www.kopz.org/public/documents/css/multiple_buttons_ie_workaround.html
Jason Lea pisze:
> That is the problem with IE sending all button elements instead of the
> one that was clicked. Firefox and others send only the clicked button.
> So there is nothing that can be done on the server side, there is no
> way to figure out which button was actually clicked.
>
> On 29/03/10 10:20 PM, Michał Letyński wrote:
>> Code:
>> Form<?> form = new Form<Void>("form1");
>> form.add(new Button("submitButton2") {
>> @Override
>> public void onSubmit() {
>> //logic2
>> }
>> });
>> form.add(new Button("submitButton1") {
>> @Override
>> public void onSubmit() {
>> //logic1
>> }
>> });
>> Markup:
>> <form wicket:id="form1">
>> <button type="button"
>> wicket:id="submitButton2">Submit2</button>
>> <button type="submit"
>> wicket:id="submitButton1">Submit1</button>
>> </form>
>>
>> On ie, after clicking on "Submit 1" onSubmit() from submit button2 will
>> be invoked. Its because IE send's the name of the button type="button"
>> and Form#findSubmittingButton() takes this button.
>> Is it a known problem ? Can i create a jira issues for that ?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
--
Michał Letyński
ConSol* Consulting & Solutions Software Poland Sp. z o.o.
ul. Piastowska 44c, 30-070 Krakow
mail: mikel@consol.pl
tel: +48 609 266 753
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Bug with
Posted by Jason Lea <ja...@kumachan.net.nz>.
That is the problem with IE sending all button elements instead of the
one that was clicked. Firefox and others send only the clicked button.
So there is nothing that can be done on the server side, there is no way
to figure out which button was actually clicked.
On 29/03/10 10:20 PM, Michał Letyński wrote:
> Code:
> Form<?> form = new Form<Void>("form1");
> form.add(new Button("submitButton2") {
> @Override
> public void onSubmit() {
> //logic2
> }
> });
> form.add(new Button("submitButton1") {
> @Override
> public void onSubmit() {
> //logic1
> }
> });
> Markup:
> <form wicket:id="form1">
> <button type="button" wicket:id="submitButton2">Submit2</button>
> <button type="submit" wicket:id="submitButton1">Submit1</button>
> </form>
>
> On ie, after clicking on "Submit 1" onSubmit() from submit button2 will
> be invoked. Its because IE send's the name of the button type="button"
> and Form#findSubmittingButton() takes this button.
> Is it a known problem ? Can i create a jira issues for that ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
Jason Lea
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org