wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Neretin <dmitriy.nere...@googlemail.com>
Subject FormComponent independent from the Model/Model object
Date Tue, 09 Jul 2013 17:58:04 GMT
Hi everyone,

I have a dummy question:

If I have a panel with a form (not everything is my code) ->

public class MyPanel{

  public MyPanel(id, IModel<MyObj> model){
        super(id, new CompoundPropertyModel<MyObj>(model);
        Form<MyObj> form = new Form("id", model);
        form.add(new AjaxCheckBox("anyStupidId");



And I want to add a Component (AjaxCheckBox) to the form above, but this
component shouldn't have anything to do with a model object. It's purpose
is just a change the state of the input fields. If I check the box the
field should be deactivated and vice versa. Nothing more.

My problem is, that Wicket thinks (and I even know  why :)) the
"anyStupidId" is a field of MyObj and tries to change the value... Well,
the checkbox should be inside of the form, but I don't know if is it
possible to make this checkbox independent from the Model handling... How
can I tell wicket, "hey dude, anyStupidId has nothing to do with MyObj, it
is really just a stupid id"


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message