You can customize Hitmap information to
generate specific information from the server side. For example, to
highlight a group element or change the cursor when you move the
mouse over a certain type of element. .
The server side code will generate Hitmap information in
JSON
format for the Hitmap request.
On the server side you must do the
following:
Your servlet must be a subclass of IlvDiagrammerServlet or of one of its
existing subclasses, for example IlvFacesMapsServlet.
For JSF, configure the servlet using the
servlet
attribute in the JSF view component.
//Configure the servlet in the web.xml file. <servlet> <servlet-name>MapsEditingServlet</servlet-name> <servlet-class>demo.editing.MapsEditingServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>MapsEditingServlet</servlet-name> <url-pattern>/MapsEditingServlet</url-pattern> </servlet-mapping>
Set the
servlet
attribute of JSF view component. For example:
<jvmf:mapView id="maps" servlet="MapsEditingServlet" ... />
You must extend IlvHitmapDefinition. For example:
package yourpackage; public class MyHitmapDefinition extends IlvHitmapDefinition { }
Then add, for example, the following code in the
web.xml
file and add the
hitmap
init-param
for your servlet.
<servlet-name>MapsEditingServlet</servlet-name> <servlet-class>demo.editing.MapsEditingServlet</servlet-class> <init-param> <param-name>hitmap</param-name> <param-value>yourpackage.MyHitmapDefinition</param-value> </init-param> </servlet>
For more information, see the <installdir> /jviews-maps810/samples/jsf-maps-tiled/index.html
sample.