Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > Ajax Tags > Ajax Cookbook |
![]() |
This documentation refers to version 2.1 which has not been released yet. |
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" />
<s:submit value="Make Request" onclick="dojo.event.topic.publish('/request')" /> <sx:bind listenTopics="/request" href="%{#url}" />
<s:submit value="Make Request" id="submit"> <sx:bind sources="submit" events="onclick" href="%{#url}" />
<s:submit value="Make Request" id="submit0"> <s:submit value="Make Request" id="submit1"> <sx:bind sources="submit0,submit1" events="onclick" href="%{#url}" />
<s:textarea id="area0"> <s:textarea id="area1"> <sx:bind sources="area0,area1" events="onfocus,onchange" href="%{#url}" />