Hi,
I use Hibernate and have got a reasonably sized app working with Wicket. I
am aware of the concept of detachable models and want to use it effectively
and I have the following questions. If the information is already there on
the wiki or something - feel free to point me there. Apologies in advance
for the dumb questions, but I'm sure there is a general consensus that
Wicket models are tricky to understand.
a) If you don't use detachable models, it is ok but the downside is that
when your page is serialized, your models get serialized and this could take
up a lot of memory. Is my understanding correct?
b) In some cases I use new Label("foo", new PropertyModel(fooModel,
"foo"))); and in some cases I use new Label("foo", fooModel.getFoo()); which
should I stick to or when should I use which?
c) I have a list of objects I got from Hibernate. Can you provide (or link
to) some simple code that will show me how to "install" this model on the
parent component, and I mean in detachable mode. In my case it is just a
WebPage.
d) Now I am iterating using ListView. How exactly do I initialize the
ListView so that it uses the "installed" detachable model?
e) While rendering each row of the ListView, how do I initialize Labels so
that they in turn get the right chunk of the detachable model?
f) And suppose I have a Label that has to be derived by say some string
concatenation or formula and OGNL notation will not work. Will new
Label("foo", fooModel.getFoo() + "bar")kind of hardcoding conflict in some
subtle way with the concept of detachable models?
Thanks,
Peter.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user