This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSF and the fly likes Image cropping in Jsf on the release of mouse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Image cropping in Jsf on the release of mouse" Watch "Image cropping in Jsf on the release of mouse" New topic
Author

Image cropping in Jsf on the release of mouse

HarshAuro Patil
Greenhorn

Joined: Nov 12, 2008
Posts: 1
Hi,
In jsf , if we want to crop image on mmouse release. then use following code.

h:commandLink action="#{cropAction.crop}" on click="return false;" onmouseup="return true;"
h:graphicImage value="#{cropAction.image}"
h:commandLink

As on click of commandLink the form has been submitting , set on click return false , so form won't submit. Then afer selecting the area when we release the mouse ,set return true, so now form get submitted and we get the coordinate and we can crop the image.
[ November 13, 2008: Message edited by: HarshAuro Patil ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Image cropping in Jsf on the release of mouse