public FileRepresentation getRepresent() throws IOException{
Integer id = RequestUtil.getInteger(getRequest().getAttributes().get("id"));
try{
ProductImage respImage = coreManager.get(ProductImage.class, id);
File f = File.createTempFile("sunflower_", ".img");
FileOutputStream fos = new FileOutputStream(f);
fos.write(respImage.getImage());
fos.close();
FileRepresentation resp = new FileRepresentation(f, MediaType.IMAGE_ALL);