Warning |
---|
|
This documentation refers to version 2.1 which has not been released yet. |
Table of Contents |
---|
minLevel | 3 |
---|
indent | 20px |
---|
style | none |
---|
|
Common
All examples on this page assume the following JSP fragment is on the same page as the example.
Code Block |
---|
|
<%@ 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
...
Code Block |
---|
|
<!-- With a submit tag -->
<s:form namespace="/mynamespace" action="MyAction">
<input type=textbox name="data">
<sx:submit />
</s:form>
<!-- With an anchor tag -->
<s:form namespace="/mynamespace" action="MyAction">
<input type=textbox name="data">
<sx:a />
</s:form>
|
Div
Loads its content after page is loaded
...
Code Block |
---|
|
<sx:div href="%{#url}"
listenTopics="/refresh"
startTimerListenTopics="/startTimer"
stopTimerListenTopics="/stopTimer"
updateFreq="3000">
Initial Content
</sx:div>
<s:submit value="Refresh" onclick="dojo.event.topic.publish('/refresh')" />
<s:submit value="Start refresh timer" onclick="dojo.event.topic.publish('/startTimer')" />
<s:submit value="Stop refresh timer" onclick="dojo.event.topic.publish('/stopTimer')" />
|
Date and Time picker
Date picker
Code Block |
---|
|
<sx:datetimepicker name="picker" />
|
...
Code Block |
---|
|
<sx:head extraLocales="en-us,nl-nl,de-de" />
<sx:datetimepicker label="In German" name="dddp7" value="%{'2006-06-28'}" language="de-de" />
<sx:datetimepicker label="In Dutch" name="dddp8" value="%{'2006-06-28'}" language="nl-nl" />
|
Tabbed Panel
Local Tabs
Code Block |
---|
|
<sx:tabbedpanel>
<sx:div label="Tab 1" >
Local Tab 1
</sx:div>
<sx:div label="Tab 2" >
Local Tab 2
</sx:div>
</sx:tabbedpanel>
|
...
Code Block |
---|
|
<sx:tabbedpanel templateCssPath="%{#cssUrl}" >
<sx:div id="tab1" label="Tab 1">
Local Tab 1
</sx:div>
<sx:div id="tab2" label="Tab 2">
Local Tab 2
</sx:div>
</sx:tabbedpanel>
|
Autocompleter
Fixed list
Code Block |
---|
|
<sx:autocompleter list="{'apple','banana','grape','pear'}" />
|
...