I want to create web pages with interactive SVG content. It worked for me as a Java application, using Batik to render SVG and collect user interfaces like mouseclick. Now I want to use these SVG image files in my JSF (Primefaces) web application in the same way.
Trying to get started, I found that this did not work:
<h: graphicImage id = "gloob" value = "images / sprinkverks.svg" alt = "Graphic Goes Here" />
I do not mind doing reading to get up from the learning curve. It was a little surprising that some of Google’s searches didn’t show anything useful.
What I found suggested that I would have to do this with the f: verbatim tag, as if I manually encoded the HTML. Then I have to add some script to capture the SVG events and return them back to the AJAX code. If I have to do whatever I want, but I was hoping there would be a simpler and more automated way.
So the questions are:
- How to get an image for rendering in the first place?
- How to return DOM events from SVG page of a page back to beans backup?
Thanks so much for any pointers.
html jsf jsf-2 svg
Alanobject
source share