what does your web.xml look like?

-igor

On Fri, Oct 31, 2008 at 2:22 PM, ds26680 <[EMAIL PROTECTED]> wrote:
>
> Thanks for the reply, Igor. I have added a feedback panel and no validation
> or error messages are displayed. Here is my complete code listing for
> clarity of what I am working with.
>
> The Java class:-
>
> private static final long serialVersionUID = 1L;
>
>    public HomePage() {
>
>        MyForm form = new MyForm("form");
>        add(new FeedbackPanel("feedback"));
>        add(form);
>    }
>
>    private class MyForm extends Form {
>
>        private CheckBoxModel checkBoxModel = new CheckBoxModel();
>
>        public MyForm(String s) {
>            super(s);
>
>            FormComponentFeedbackBorder feedbackMessage = new
> FormComponentFeedbackBorder("feedbackMessage");
>            CheckBox myCheckBox = new CheckBox("selected",
>                            new PropertyModel(checkBoxModel, "selected"));
>
>            feedbackMessage.add(myCheckBox);
>            add(feedbackMessage);
>        }
>
>        protected void onSubmit() {
>            boolean bool = checkBoxModel.getSelected();
>            System.out.println(bool);
>        }
>    }
>
> The Domain Model:-
>
>   public class CheckBoxModel implements Serializable {
>
>   public boolean selected;
>
>    public boolean getSelected() {
>        System.out.println("getSelected() has been called");
>        return selected;
>    }
>
>    public void setSelected(boolean selected) {
>        System.out.println("setSelected() have been caled: " +
> this.selected);
>        this.selected = selected;
>    }
>
>    public String toString() {
>        return String.valueOf(selected);
>    }
>  }
>
> When I load this page, select the checkbox and click the submit button, the
> following debug is printed:-
>
> getSelected() has been called
> INFO  - RequestListenerInterface   - registered listener interface
> [RequestListenerInterface name=INewBrowserWindowListener, method=public
> abstract void
> org.apache.wicket.markup.html.INewBrowserWindowListener.onNewBrowserWindow()]
> getSelected() has been called
> getSelected() has been called
> false
>
> Does anyone have any ideas what is wrong or suggestions on how to get this
> to work? Thanks in advance for your help.
> --
> View this message in context: 
> http://www.nabble.com/Help-with-simple-CheckBox-example-tp20267081p20274222.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to