You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This documentation refers to version 2.1 which has not been released yet.

Common

All examples on this page assume the following JSP fragment is on the same page as the example.

<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<head>
    <sx:head />
</head>

<s:url id="url" value="/MyAction.action" />

Requests

Request is triggered by a topic
<s:submit value="Make Request" onclick="dojo.event.topic.publish('/request')" />
<sx:bind listenTopics="/request" href="%{#url}" />
Attached to an event
<s:submit value="Make Request" id="submit">
<sx:bind sources="submit" events="onclick" href="%{#url}" />
Attached to an event on multiple sources
<s:submit value="Make Request" id="submit0">
<s:submit value="Make Request" id="submit1">
<sx:bind sources="submit0,submit1" events="onclick" href="%{#url}" />
Attached to multiple events on multiple sources
<s:textarea id="area0">
<s:textarea id="area1">
<sx:bind sources="area0,area1" events="onfocus,onchange" href="%{#url}" />
  • No labels