Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread Nivedan Nadaraj
James Thanks mate. I have couple of options i guess that is what pedro meant as well. I guess Jeremy's solution is what i was looking for. in that the form instance will have a CPM that refers a container bean that has members. The solution u provided also is the identical but the members are in a

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread Nivedan Nadaraj
HI Pedro Thanks for taking the time. I really appreaciate this community and love it. What Jeremy mentioned provided the solution where in the we let wicket use the hierarchy to use the model class that contains other beans and introspect the property expression and set/get values. That way the pa

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread James Carman
You could put your components for editing the two different objects onto two different panels, which each have a CPM inside your form. On Fri, Jul 16, 2010 at 7:29 AM, Nivedan Nadaraj wrote: > Thanks. How do i let the form know that it has one or more models? In the > above I invoke the > super(i

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread Pedro Santos
Hi Nivedan, Jeremy write " IModel as a private variable" and James "Your form can edit two different objects. It will edit whatever you bind your fields to" If you have an form with some fields for some bean, and other fields for other beans, you can do something like: class panel { private m

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread Nivedan Nadaraj
Hi Jeremy, Nice I follow you now. I can have a container java class and have any number of member variables which in turn can be a hibernate entity and a regular java bean. The container java class will be the model. And on detach; i would have to have the container java class extend IModel and imp

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread Jeremy Thomerson
Either create a model object that contains your study and foo objects, or hold an IModel as a private variable. Remember it's just regular java, so you can use member variables. Just don't forget to detach any model you hold as a variable manually. Jeremy Thomerson -- sent from my smartphone - ple

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread Nivedan Nadaraj
Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModel(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well.

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread James Carman
Your form can edit two different objects. It will edit whatever you bind your fields to On Jul 16, 2010 4:23 AM, "Nivedan Nadaraj" wrote: > Hi > Thanks for the pointer. I did read through models and > LoadableDetachableModel. Not sure if this model addresses the problem at > hand. Isn't LDM rel

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-16 Thread Nivedan Nadaraj
Hi Thanks for the pointer. I did read through models and LoadableDetachableModel. Not sure if this model addresses the problem at hand. Isn't LDM related to performance and resoles Serialization issues? In the same note I came across Chaining of models. or Nesting of Models...can you/someone give m

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-15 Thread vov
see org.apache.wicket.model.LoadableDetachableModel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-s-Form-Model-using-hibernate-entity-or-value-objects-Design-tp2289854p2289870.html Sent from the Wicket - User mailing list archive at Nabble.com. --

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-15 Thread Nivedan Nadaraj
Hi All I use Wicket with Hibernate. I have used the hibernate entity as a Form's Model.Now however I noticed that I need to also add/update an LDAP instance's entries.This means as part of my submit Ineed to wicket to capture the non-entity properties also. 1. I either have to use a Value Object a