Are you by any chance using Wicket set as the root servlet, i.e.
mapping it's servlet to the "/*" url-pattern? If so, that was a bug
that should be fixed in 1.1rc1.
/Gwyn
On 11/09/05, Fred Astaire <[EMAIL PROTECTED]> wrote:
> Hello !
>
> I am newbie to Wicket, just figuring out how stuff works. Now i am stuck
> with how to use input fields in forms. My input field retuns null...Can
> someone tell me what i am doing wrong?
> Thanks in Advance, my code is listed below.
>
> Greetz
> Sebastian
>
>
>
> Java Code:
>
> public class TestPage extends WebPage {
> class Person implements Serializable {
> private String name = "TEST";
>
> public void setName(String name) {
> this.name = name;
> }
>
> public String getName() {
> return name;
> }
> }
>
> public TestPage() {
> Person person = new Person();
> add(new TestForm("testForm", new Model(person)));
> }
>
> class TestForm extends Form {
>
>
>
> public TestForm(String id, IModel model) {
> super(id, model, null);
> add(new TextField("name", new PropertyModel(
> model, "name")));
> }
>
> public void onSubmit() {
> System.out.println("----------------------------------");
> System.out.println(((Person) getModelObject()).getName());
> System.out.println("----------------------------------");
> }
> }
> }
>
> HTML Code:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>My Wicket Example</title>
> </head>
> <body>
> <form wicket:id="testForm" method="get">
> Name: <input type="text" wicket:id="name"/>
> <input type="submit" value="save" />
> </form>
> </body>
> </html>
>
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar – get it now!
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>