Hi all. I'm trying to create a component I call a FormBorder. The idea
is to embed the form and OK/Cancel buttons into the border:

<wicket:border>
  <div class="form">
    <form wicket:id="form">
      <wicket:body/>
      <div class="buttons">
        <input wicket:id="button" type="submit"/>
      </div>
    </form>
  </div>
</wicket:border>

public FormBorder(String id, IModel model) {
    super(id, model);
    add(form = new Form("form"));
    form.add(getBodyContainer());
    form.add(buttons = new RepeatingView("button"));
    // ... add buttons to the repeating view
}

I'd like to use it like this...

  FormBorder border = new FormBorder("border");
  border.add(new TextField("name", new PropertyModel(person, "name")));

...but it doesn't work quite right. The page renders fine, but upon
submit the data never makes it back into the TextField's model.
Presumably this is because the TextField is a child of the border, not
of the form.

Is there any way to make this work, other than taking the form
completely out of the border?

jk

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

Reply via email to