Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Using imageCropper with JSF and primefaces  RSS feed

 
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!