Bonjour Gervais,

To help you understand the fundamentals of Wicket, I would strongly
recommend reading the first few chapters of Wicket in Action. It's
available for the Manning Early Access Program.

To answer your third qestion on how to bind more then one domain model
to a form, I would recommend using the Data Transfer Object which has
associations to the domain models you are binding. Then use a
CompoundPropertyModel
 to access the associatios.

For example, if you are wanting to bind both Foo and Bar to a form,
you would do it like this

public class FooBarDTO implements Serializable {

      private static final long serialVersionUID = 1L;

      private Foo foo;

      private Bar bar;

}

And the inner class form would look like this:

private final class FooBarForm extends Form {

         public FooBarForm(String id, FooBarDTO fooBarDTO) {
                    super(id, new CompoundPropertyModel(foorBarDTO));
                    add(new RequiredTextField("foo.name"));
                    add(new RequiredTextField("bar.name");
          }

         @Override
         protected void onSubmit() {
                FooBarDTO fooBarDTO = (FooBarDTO) this.getModelObject();
         }

}

If it's a big form then I would recommend using a Wizard.


Cheers,
James.


>
> 3° In a big form ( with more than 20 fields ) that represnet more than
> one Pojo Bean how must i work ?
>
>
> Thanks
>
>

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

Reply via email to