for a new entity you can always return a new entity. There is no need to keep the filled in data between requests :-) as the fields have the data already... When you return a new object Wicket's form update mechanism will repopulate the object's fields.
Martijn On 4/19/08, Fernando Wermus <[EMAIL PROTECTED]> wrote: > I try to spend the less memory I can using LoadableDetachableModel. But if > the user is filling up a form for a new entity I think I have two options, > one serialize and the other create a kind of dto. I don't like the first > because I don't want my domain model be modified by the web tier > (Serializable interface) and I don't like the second because I prefer > languages as Smalltalk, Grovee or Ruby which you don't need dtos either > serializable interfaces. That's why I was speaking up. I like wicket and > maybe I could find another way. > > ps: I am using db4o as my data object base (in this prototype). I know a guy > who make wicket serialize their entities using db4o, but I don't know how > hard is replace the serializable wicket mechanism. > > On Fri, Apr 18, 2008 at 7:30 PM, James Carman <[EMAIL PROTECTED]> > wrote: > > > > I like for my entities to always be serializable. Is there some > > special requirement to have a non-serializable field on your entity > > class? > > > > On Fri, Apr 18, 2008 at 4:50 PM, Fernando Wermus > > <[EMAIL PROTECTED]> wrote: > > > I am finishing my first app for production in wicket. As any newbie I try > > to > > > make a side relevant non-functional problems to focus in which I > > consider > > > important. > > > I was implementing Serializable in all my entities, but I have to change > > now > > > that. I ve done it using LoadableDetachableModel. But I couldn't do it > > in > > > some parts. When the user walks over a wizard to create an entity, I > > just > > > attached to the wizard a new entity and, finally I persist it in the las > > > step. But, I have to change that now, because the entity is not > > Serializable > > > anymore. > > > > > > Which is the best way? > > > > > > I think it is attaching a model which have all the attributes needed for > > the > > > creation of the entity and at the end I have to copy the whole > > information > > > to my entity, doesn' it? (like I was doing with j2ee DTO :( ). Then I > > have a > > > modelForm of the view and my entities at the end of the steps. > > > > > > Is there a best approach to it? > > > > > > Bye! > > > > > > ps: sorry for my english. > > > -- > > > Fernando Wermus. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > > Fernando Wermus. > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
