Hello wicket ppl,

im pretty new in wicket and im facing a problem which seems to me like im 
missing some basic understanding here.

I have a form which is supposed to fill a filter object. So i add some 
TextFields with property models, based on that object, to the form (actually to 
a WebMarkupContainer which is a child of the form).
Then i have two AjaxButtons to 'apply' and reset the filter. I added an 
aditional (debug) container with a Label which displays the content of the 
filter object.

When i enter some information in the TextFields and click apply, the object 
gets updated and so does the 'debug label'. Then i push the reset button and 
want the filter object to be nulled and the TextFields to be cleared. But only 
the object gets affected, the TextFields dont get updated (cleared).

Some code:

filterContainer.add(new TextField<FilterObject>("filterFoo", new 
PropertyModel<PersonFilter>(filter, "foo")));
filterContainer.add(new TextField<FilterObject>("filterBar", new 
PropertyModel<PersonFilter>(filter, "bar")));

filterContainer.add(new AjaxButton("filterApply", new Model<String>("apply")) {
    @Override
    protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        target.addComponent(debugContainer);
    }
});

filterContainer.add(new AjaxButton("filterReset", new Model<String>("reset")) {
    @Override
    protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        filter = new FilterObject();
        target.addComponent(debugContainer);
        target.addComponent(filterContainer);
    }
});

Any suggestions? I would appreciate any kind of help on that.

So long,
Benedikt
[Beta Systems Disclaimer/Impressum: http://www.betasystems.com/disclaimer ]


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to