I always wrap my domain objects in a generic loadable detachable wicket model subclass. So for User, for example, UserModel extends MyGenericDetachableModel<User>. This is safer than passing around raw IModels and also saves casting the return value from getObject() until Wicket 1.4 generifies everything. But even in the generic future I find UserModel a bit nicer than IModel<User>. Furthermore, a detachable model subclass is a great place to attach DAO functionality (using that locator idea I blogged about, even).
mfs wrote: > > Guys, > > I would want to know if using your business/domain objects as wicket > models would be a good idea ? > > i remember in an earlier thread i was suggested not to use > business-objects as wicket models, but it would want to hear more > opinions.. > > Thanks in advance.. > -- View this message in context: http://www.nabble.com/Business-Domain-objects-used-as-wicket-model-object---opinions-please-tp15462661p15475231.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
