Hi, On Fri, Oct 28, 2011 at 9:54 AM, Groot, Mathijs de (IDT Competence Java) <math.de.gr...@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-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org