Re: [Wicket-user] Using POJO as Model - is this right?

2005-12-27 Thread Joshua Lim
thanks ... should have thought of that! :) On 12/23/05, Maurice Marrink <[EMAIL PROTECTED]> wrote:
You could always use a different model (containing just the fileuploadobject) for the fileupload and the compoundmodel for the rest of theform. then in the onsubmit you could get both models set the blob onyour pojo and save it. this way you can keep your pojo clean.
Maurice2005/12/23, Joshua Lim <[EMAIL PROTECTED]>:> 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 reasonand 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>>
>>---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!http://ads.osdn.com/?ad_idv37&alloc_id865&opclick___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Using POJO as Model - is this right?

2005-12-22 Thread Maurice Marrink
You could always use a different model (containing just the fileupload
object) for the fileupload and the compoundmodel for the rest of the
form. then in the onsubmit you could get both models set the blob on
your pojo and save it. this way you can keep your pojo clean.

Maurice

2005/12/23, Joshua Lim <[EMAIL PROTECTED]>:
> 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 reasonand 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
>
>
>
>


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Using POJO as Model - is this right?

2005-12-22 Thread Joshua Lim
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 reasonand
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