// Change the class of the web element that fired the event:
SetAttributeAction action1 = new SetAttributeAction(event.getElementId(), "class", "expanded");
// Construct the CSS selector identifying the web page part that will be updated with the JSP content:
String selector = new StringBuilder("#").append(event.getElementId()).append("~").append("div.entryBody").toString();
ElementMatcher matcher = new SelectorMatcher(Arrays.asList(selector));
// Replace the content of the web page part identified by the selector:
ReplaceContentAction action2 = new ReplaceContentAction(matcher, jsp);
// Call a client-side javascript function:
Map<String, Object> params = new HashMap<String, Object>();
params.put("selector", selector);