Pecc
13 May 2009, 12:51 AM
Hello everyone,
I'm working on a university project using JEE+GXT. My goal is to develop something like an image-viewer and -editor. The concept is quite simple: users can register, make albums, upload images into them, edit the images (rotate, scale, flip, sharpen, etc.).
I thought why not try to store the images as longBlobs in the database, as i don't have to worry about performance now.(and this way, i don't have to do the fileoperations) So i made my Image entitybean with a byte array field like this:
@Lob @Basic(fetch=FetchType.LAZY)
@Column(columnDefinition="LONGBLOB NOT NULL")
protected byte[] imageData;
I have the business-layer methods to get the image entities to the web-layer. Next i tried to use the imageorganizer sample from http://extjs.com/explorer/#imageorganizer to display these images, but i cant see how to insert my imageData into the listview. Is it even possible? I dont quite understand the sample either, where does the actual image data come from? Does this Photo class contain a path field or something which is automatically processed?
Sorry if my questions are lame, i'm quite new to gxt. Also i tried google, with no success.
Please provide me some directions.
thanks.
I'm working on a university project using JEE+GXT. My goal is to develop something like an image-viewer and -editor. The concept is quite simple: users can register, make albums, upload images into them, edit the images (rotate, scale, flip, sharpen, etc.).
I thought why not try to store the images as longBlobs in the database, as i don't have to worry about performance now.(and this way, i don't have to do the fileoperations) So i made my Image entitybean with a byte array field like this:
@Lob @Basic(fetch=FetchType.LAZY)
@Column(columnDefinition="LONGBLOB NOT NULL")
protected byte[] imageData;
I have the business-layer methods to get the image entities to the web-layer. Next i tried to use the imageorganizer sample from http://extjs.com/explorer/#imageorganizer to display these images, but i cant see how to insert my imageData into the listview. Is it even possible? I dont quite understand the sample either, where does the actual image data come from? Does this Photo class contain a path field or something which is automatically processed?
Sorry if my questions are lame, i'm quite new to gxt. Also i tried google, with no success.
Please provide me some directions.
thanks.