a one<->one relation ship between whats in the list and whats in the model.
if you want to map that then the fastest way that i can think of right now is to use
a model that sits between it. That maps CategoryVO <-> int back and forward.
Why do you work with ints in the model objects? Why not just full blown java objects?
johan
On 6/2/06, Ralf Ebert <[EMAIL PROTECTED]> wrote:
Hi,
quite often I have the problem that my model objects (which are bound
using compound property models) contain a field like categoryId (as
int), but when building pages, I would like to use objects like
CategoryVO. Simplest example is choosing from a list, the
dropdownchoices would be a List<CategoryVO> while the model object
itself would be an simple integer. I'm looking for an elegant way to
handle these things in a model based way. I would like to throw in a
little class which allows me to implement a mapping between both types
(id -> object, object -> id, a bit like a converter). I couldn't find
an elegant way to do things like these, is there some best practice
for handling such cases?
thx,
Ralf
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user