Hi,

Something like this:

if (form.isValid()) {

  DomainObject domainObject = someService.createNewObject();
  form.copyTo(domainObject);
  domainObject.fileByte = fileField.getFileItem().get();
  domainObject.ileName = fileField.getFileItem().getName();

  someService.save(domainObject);
}

Hope this helps.

regards

Bob

On 16/01/2011 01:01, Andre Gustavo Lomonaco wrote:
>     Hi guys,
> 
>      Anybody has a example or part of a code showing how to use the Cayenne 
> in Apache Click to store
> a single small file in a Database.
> 
>      To upload the file is easy using the
> http://click.avoka.com/click-examples/control/file-upload.htm example, but I 
> wanna help to create
> the Cayeene code
>      to save in the Database
> 
>     My Best Regards
> 
>     Andre Lomonaco
> 
> 
> 

Reply via email to