You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Groot, Mathijs de (IDT Competence Java)" <ma...@logica.com> on 2011/10/28 09:54:40 UTC
Application Home page - Firefox issue
Hi,
I've a really strange problem with my home page when using Firefox (3.6.32).
I'm currently using Wicket version 1.5.2
When typing in a textField, the model object is always null when submitted!
This is only the case when my Page is my application home page, and only with Firefox.
(thus: When it is not my application home page, or using Chrome or IE it is working fine).
I think it's a bug in Wicket...
Can someone help me?
Or should I just create a new Wicket a bug report?
A example that will reproduce this issue:
You will see that [input] is always null in Firefox (3.6)!
public class TestPage extends WebPage {
private static final long serialVersionUID = 5676036334073650103L;
private String input;
public TestPage() {
final Label label = new Label("label", "start, rendered # " + getRenderCount());
add(label);
final Form<String> form = new Form<String>("form", new PropertyModel<String>(this, "input")) {
private static final long serialVersionUID = -8888949169730520245L;
@Override
public void onSubmit() {
label.setDefaultModelObject("input = [" + input + "] rendered # " + getRenderCount());
}
};
add(form);
form.add(new TextField<String>("input", new PropertyModel<String>(this, "input")));
form.add(new SubmitLink("submit"));
}
}
NB: Make sure the following is in your WebApplication
@Override
public Class<? extends Page> getHomePage() {
return TestPage.class;
}
Corresponding Mark-up:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>[Application Title]</title>
</head>
<body>
<form wicket:id="form" action="#" method="post">
<input wicket:id="input" type="text" class="textfield" />
<a href="#" wicket:id="submit">submit</a>
</form>
<div wicket:id="label">[label]</div>
</body>
</html>
Best regards,
Mathijs
Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Application Home page - Firefox issue
Posted by Martin Grigorov <mg...@apache.org>.
Create a quickstart and attach it to Jira.
On Fri, Oct 28, 2011 at 11:50 AM, Groot, Mathijs de (IDT Competence
Java) <ma...@logica.com> wrote:
> Hi Martin,
>
> Thanks for your quick reply.
>
> a) No, it is not working in Firefox 7.0.1 as well
> b) I know form submitting should be (and is) the same for all browsers, that is why it's so strange.
> c) I don't have much experience with analysing the post requests, but I see the following when submitting "test-input":
>
> 1. POST myApp/?5-1.IFormSubmitListener-form Status: 302 Moved Temporarily
> Post Parameters:
> :submit x
> input test-input
> 2. GET myApp/?5-1.IFormSubmitListener-form Status: 302 Moved Temporarily
> Reply:
> Loading source failed for: http://localhost:8080/myApp/?5-1.IFormSubmitListener-form
> 3. GET TestPage?6
>
> Looking at this, the first get (step 2) fails, and the page is reloaded (step 3).
>
> But how can I make this simple form submitting work in Firefox?
> And I don't understand why this is only the case when the page is my Application Home page.
>
>
>
> P.s. If more people are struggling with this problem, I've made a workaround to get to my (working) home page:
> (I know it's not a nice way of working...)
>
> public class RedirectToHomePage extends WebPage {
> private static final long serialVersionUID = -8505922834510539508L;
>
> public RedirectToHomePage() {
> setResponsePage(HomePage.class);
> }
> }
>
> In my WebApplication
>
> @Override
> public Class<? extends Page> getHomePage() {
> return RedirectToHomePage.class;
> }
>
>
>
> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: vrijdag 28 oktober 2011 10:00
> To: users@wicket.apache.org
> Subject: Re: Application Home page - Firefox issue
>
> Hi,
>
> On Fri, Oct 28, 2011 at 9:54 AM, Groot, Mathijs de (IDT Competence
> Java) <ma...@logica.com> wrote:
>> Hi,
>>
>> I've a really strange problem with my home page when using Firefox (3.6.32).
>> I'm currently using Wicket version 1.5.2
>>
>> When typing in a textField, the model object is always null when submitted!
>>
>> This is only the case when my Page is my application home page, and only with Firefox.
>> (thus: When it is not my application home page, or using Chrome or IE it is working fine).
>>
>> I think it's a bug in Wicket...
>
> Does it work in newer versions of Firefox ?
> Wicket process the form submit the same way for all browsers. See with
> Firebug what parameteres are sent to the server-side.
>
>>
>> Can someone help me?
>> Or should I just create a new Wicket a bug report?
>>
>>
>> A example that will reproduce this issue:
>> You will see that [input] is always null in Firefox (3.6)!
>>
>> public class TestPage extends WebPage {
>> private static final long serialVersionUID = 5676036334073650103L;
>> private String input;
>>
>> public TestPage() {
>> final Label label = new Label("label", "start, rendered # " + getRenderCount());
>> add(label);
>> final Form<String> form = new Form<String>("form", new PropertyModel<String>(this, "input")) {
>> private static final long serialVersionUID = -8888949169730520245L;
>>
>> @Override
>> public void onSubmit() {
>> label.setDefaultModelObject("input = [" + input + "] rendered # " + getRenderCount());
>> }
>> };
>> add(form);
>> form.add(new TextField<String>("input", new PropertyModel<String>(this, "input")));
>> form.add(new SubmitLink("submit"));
>> }
>> }
>>
>> NB: Make sure the following is in your WebApplication
>>
>> @Override
>> public Class<? extends Page> getHomePage() {
>> return TestPage.class;
>> }
>>
>> Corresponding Mark-up:
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/">
>> <head>
>> <meta http-equiv="X-UA-Compatible" content="IE=8"/>
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>> <title>[Application Title]</title>
>> </head>
>> <body>
>> <form wicket:id="form" action="#" method="post">
>> <input wicket:id="input" type="text" class="textfield" />
>> <a href="#" wicket:id="submit">submit</a>
>> </form>
>> <div wicket:id="label">[label]</div>
>> </body>
>> </html>
>>
>> Best regards,
>>
>> Mathijs
>>
>> Think green - keep it on the screen.
>>
>> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> Think green - keep it on the screen.
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Application Home page - Firefox issue
Posted by "Groot, Mathijs de (IDT Competence Java)" <ma...@logica.com>.
Hi Martin,
Thanks for your quick reply.
a) No, it is not working in Firefox 7.0.1 as well
b) I know form submitting should be (and is) the same for all browsers, that is why it's so strange.
c) I don't have much experience with analysing the post requests, but I see the following when submitting "test-input":
1. POST myApp/?5-1.IFormSubmitListener-form Status: 302 Moved Temporarily
Post Parameters:
:submit x
input test-input
2. GET myApp/?5-1.IFormSubmitListener-form Status: 302 Moved Temporarily
Reply:
Loading source failed for: http://localhost:8080/myApp/?5-1.IFormSubmitListener-form
3. GET TestPage?6
Looking at this, the first get (step 2) fails, and the page is reloaded (step 3).
But how can I make this simple form submitting work in Firefox?
And I don't understand why this is only the case when the page is my Application Home page.
P.s. If more people are struggling with this problem, I've made a workaround to get to my (working) home page:
(I know it's not a nice way of working...)
public class RedirectToHomePage extends WebPage {
private static final long serialVersionUID = -8505922834510539508L;
public RedirectToHomePage() {
setResponsePage(HomePage.class);
}
}
In my WebApplication
@Override
public Class<? extends Page> getHomePage() {
return RedirectToHomePage.class;
}
-----Original Message-----
From: Martin Grigorov [mailto:mgrigorov@apache.org]
Sent: vrijdag 28 oktober 2011 10:00
To: users@wicket.apache.org
Subject: Re: Application Home page - Firefox issue
Hi,
On Fri, Oct 28, 2011 at 9:54 AM, Groot, Mathijs de (IDT Competence
Java) <ma...@logica.com> wrote:
> Hi,
>
> I've a really strange problem with my home page when using Firefox (3.6.32).
> I'm currently using Wicket version 1.5.2
>
> When typing in a textField, the model object is always null when submitted!
>
> This is only the case when my Page is my application home page, and only with Firefox.
> (thus: When it is not my application home page, or using Chrome or IE it is working fine).
>
> I think it's a bug in Wicket...
Does it work in newer versions of Firefox ?
Wicket process the form submit the same way for all browsers. See with
Firebug what parameteres are sent to the server-side.
>
> Can someone help me?
> Or should I just create a new Wicket a bug report?
>
>
> A example that will reproduce this issue:
> You will see that [input] is always null in Firefox (3.6)!
>
> public class TestPage extends WebPage {
> private static final long serialVersionUID = 5676036334073650103L;
> private String input;
>
> public TestPage() {
> final Label label = new Label("label", "start, rendered # " + getRenderCount());
> add(label);
> final Form<String> form = new Form<String>("form", new PropertyModel<String>(this, "input")) {
> private static final long serialVersionUID = -8888949169730520245L;
>
> @Override
> public void onSubmit() {
> label.setDefaultModelObject("input = [" + input + "] rendered # " + getRenderCount());
> }
> };
> add(form);
> form.add(new TextField<String>("input", new PropertyModel<String>(this, "input")));
> form.add(new SubmitLink("submit"));
> }
> }
>
> NB: Make sure the following is in your WebApplication
>
> @Override
> public Class<? extends Page> getHomePage() {
> return TestPage.class;
> }
>
> Corresponding Mark-up:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/">
> <head>
> <meta http-equiv="X-UA-Compatible" content="IE=8"/>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <title>[Application Title]</title>
> </head>
> <body>
> <form wicket:id="form" action="#" method="post">
> <input wicket:id="input" type="text" class="textfield" />
> <a href="#" wicket:id="submit">submit</a>
> </form>
> <div wicket:id="label">[label]</div>
> </body>
> </html>
>
> Best regards,
>
> Mathijs
>
> Think green - keep it on the screen.
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Re: Application Home page - Firefox issue
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
On Fri, Oct 28, 2011 at 9:54 AM, Groot, Mathijs de (IDT Competence
Java) <ma...@logica.com> wrote:
> Hi,
>
> I've a really strange problem with my home page when using Firefox (3.6.32).
> I'm currently using Wicket version 1.5.2
>
> When typing in a textField, the model object is always null when submitted!
>
> This is only the case when my Page is my application home page, and only with Firefox.
> (thus: When it is not my application home page, or using Chrome or IE it is working fine).
>
> I think it's a bug in Wicket...
Does it work in newer versions of Firefox ?
Wicket process the form submit the same way for all browsers. See with
Firebug what parameteres are sent to the server-side.
>
> Can someone help me?
> Or should I just create a new Wicket a bug report?
>
>
> A example that will reproduce this issue:
> You will see that [input] is always null in Firefox (3.6)!
>
> public class TestPage extends WebPage {
> private static final long serialVersionUID = 5676036334073650103L;
> private String input;
>
> public TestPage() {
> final Label label = new Label("label", "start, rendered # " + getRenderCount());
> add(label);
> final Form<String> form = new Form<String>("form", new PropertyModel<String>(this, "input")) {
> private static final long serialVersionUID = -8888949169730520245L;
>
> @Override
> public void onSubmit() {
> label.setDefaultModelObject("input = [" + input + "] rendered # " + getRenderCount());
> }
> };
> add(form);
> form.add(new TextField<String>("input", new PropertyModel<String>(this, "input")));
> form.add(new SubmitLink("submit"));
> }
> }
>
> NB: Make sure the following is in your WebApplication
>
> @Override
> public Class<? extends Page> getHomePage() {
> return TestPage.class;
> }
>
> Corresponding Mark-up:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/">
> <head>
> <meta http-equiv="X-UA-Compatible" content="IE=8"/>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <title>[Application Title]</title>
> </head>
> <body>
> <form wicket:id="form" action="#" method="post">
> <input wicket:id="input" type="text" class="textfield" />
> <a href="#" wicket:id="submit">submit</a>
> </form>
> <div wicket:id="label">[label]</div>
> </body>
> </html>
>
> Best regards,
>
> Mathijs
>
> Think green - keep it on the screen.
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org