1

I'm making a project in JSF with Primefaces 4.0 (server Tomcat 7). I have to read an image from a MS SQL database and put a group of areas on it (every area is limited to the coordinates read from a DB too). Every single area of the image has to be a clickable "object". When user clicks on that area, the new image has to be loaded from a DB with new links put on it. According to my (rather not enough) knowledge about the JSF, there is no component allowing for something like this.

So, my idea is to:
- get the image stored in raw bytes in DB to byte array (in a bean)
- create a response with those data (according to the very first BalusC post from How to provide a file download from a JSF backing bean?)
- get bytes from this response by a JS (yes, don't know how...)
- read them to a HTML5 component, draw an image with an area border using coordinates got from another response and in some way make it clickable.

I realise this solution is rather nonsense but I have completely no other idea Could you suggest me, what would be the better way to solve my problem? I went through many Google search results and didn't find the similar one.

Community
  • 1
  • 1
smiechu_skce
  • 193
  • 2
  • 3
  • 8

1 Answers1

0

Maybe you should try Primeface's Diagrams

Alex Po
  • 1,837
  • 1
  • 24
  • 28