Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using imageCropper with JSF and primefaces

 
Marcelo Tataje
Ranch Hand
Posts: 64
Java Oracle Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody, I've been racking my brain for three days with a problem I cannot solve, it's about JSF and primefaces... what I want to do to begin is simple. I have my index.xhtml page which has a button, the button forwards to a page where there's an image and a cropper which is implemented with primefaces (p:imageCropper). When I access the page I can see the pointer of the cropper and also select an area, the problem is when I call the "Crop" command button because nothing happens it even doesn't calls my action (managed bean) but what is weird is that a message is shown under my form and says: Conversion error occurred
I'm pasting the code of my xhtml and my managed bean class:

image-preview.xhtml



ImageCropperBean.java



I don't know what to do, I'm working with Eclipse Helios and the image I'm using is inside the WebContent folder, that's why I'm calling it directly. I thought that the problem could be my java class but it cannot be since I have a System.out.println("Inside crop") and it's there's nothing on console. I don't know if the problem is primefaces.

Another thing is that in all the examples I have seen on the web, the import for cropped image in the class is: org.primefaces.ui.component.imagecropper.CroppedImage;
while in my case I just have: org.primefaces.model.CroppedImage

Could it be that the problem?

Libraries I'm using are the following:

el-api-1.1jar
el-impl-1.1
jsf-api.jar
jsf-impl.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
primefaces-2.2.jar

I hope somebody could help me please, I'd be very grateful. Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic