Hi Gervais
Im not sure if you have understood the idea of the
CompoundPropertyModel(CPM). You pass a simple domain class to it and it
uses property expressions to retireve what ever requested. For example
if you set a CPM on a page you may add a label using this new
Label("label") this will create a property expression and call the
acesssor getLabel(). If you do not want to expose / keep your domain
class in memory you can chain a CPM and create your own forexample
personModel, and in the scenes behind you could have your big model and
call getPerson on that and keep an id there only for lookup.
regards Nino
Gervais wrote:
Hi wicketers,
I use Wicket since 2 weeks. Before wicket i have worked on many
projects (Swing or Web apps) and try to find the best "architecture".
Now i'm learning Wicket and i have a big problem. I dont'like Data
Transferts Objects.
Many forms use more than one Bean, so i have asked you in a "Getting
Started" mail on how to do that properly.
"James Perry" give me this response :
...
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.
...
Thank you James. But i don't like the the idea to Create a
DataTransfertObject and give it to a new CompoundPropertyModel. I
think the DTO is like a Model. So i need to create only one Model that
contains all required beans and extends or implements a Model.
What kind of model can i use for doing that in the better and the
cleaner way ?
Thank you
--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]