Hi I have a question about using POJO as Models in wicket. BTW, love the framework ! I am using Hibernate 3 and Wicket 1.1

I've got 2 POJO : Contestant -1:n-> Design. I have a page which lets a Contestant uploads a bunch of images and each of these images are stored as Blobs in a database. Each image is a Design

Here's the 'problem'

I am setting Contestant object as the CompoundPropertyModel, which is ok. and everything is populated. I use a ListView to handle set of Designs within the form, and I have FileUploadField to handle image file uploads.

The FileUploadField, however, will populate a FileUpload object which I had to add into my POJO, and onSubmit, I then populate my Bolb field...

Question: Although it works, does this sound right in using my POJO as a Model? becuase I really don't like the idea of having to modify my POJO just to accommodate the wicket page, becasue I might have another page which may require a checkbox for e.g. for some other reason....and I have to modify my Pojo again?

I would like to have a Pojo that is not dependant on the wicket page ... is this right? any advise? Am I using it correctly?

Thanks
Joshua



Reply via email to