Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image cropping in Jsf on the release of mouse

 
HarshAuro Patil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic