Configure the server-side action listeners either by
editing the web.xml
file or by using annotations.
Customized servlet example in a web.xml file:
<servlet>
<servlet-name>DiagrammerEditingServlet</servlet-name>
<servlet-class>demo.editing.DiagrammerEditingServlet</servlet-class>
<!-- content between init-param tags equivalent to annotations shown in next substep. -->
<init-param>
<param-name>serverActions</param-name>
<param-value>
[createObject]
[deleteObject, ilog.views.diagrammer.servlet.IlvDiagrammerDeleteActionListener]
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>DiagrammerEditingServlet</servlet-name>
<url-pattern>/DiagrammerEditingServlet</url-pattern>
</servlet-mapping>
To use the customized servlet in a JViews Diagrammer view, use the following assignment
statement:
<jvdf:diagrammerView id="diagrammer" servlet="DiagrammerEditingServlet " ... />
Java annotation example configuring server action listeners:
@IlvServerActions(parameters={
@IlvServerActionParam(actionName="deleteObject", actionListener=DiagrammerDeleteActionListener.class),
@IlvServerActionParam(actionName="createObject"),
@IlvServerActionParam(actionName="myServerAction", actionListener=MyServerAction.class), })
public class DiagrammerEditingServlet extends IlvDiagrammerServlet { ......}