• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image cropping in Jsf on the release of mouse  RSS feed

HarshAuro Patil
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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}"

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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!