Rather than intercepting every event generated by the UI on the client, components can be instructed to invoke client-side JavaScript™ directly. In this case, the component will not sent a ClickEvent event to the server.
<blox:present id="samplePresent" width="700" height="500">
<%
// Find the component
BloxModel model = samplePresent .getBloxModel();
Component component = model.searchForComponent(
ModelConstants.DATA_OPTIONS );
// Create a client link using javascript:protocol method
ClientLink link = new ClientLink(“javascript:
myJavaScriptFunction( );” );
// Set the link on the component
component.setClientLink( link );
%>
</blox:present>
When the Data Options menu item is clicked, the client will invoke the JavaScript myJavaScriptFunction() function rather than send the event to the server. It is assumed that the JavaScript function has been already defined on the page.