You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mu...@apache.org on 2007/03/04 19:51:31 UTC
svn commit: r514458 - in /struts/struts2/trunk: apps/showcase/
apps/showcase/src/main/webapp/ajax/
apps/showcase/src/main/webapp/ajax/autocompleter/
apps/showcase/src/main/webapp/ajax/remotebutton/
plugins/dojo/src/main/java/org/apache/struts2/componen...
Author: musachy
Date: Sun Mar 4 10:51:30 2007
New Revision: 514458
URL: http://svn.apache.org/viewvc?view=rev&rev=514458
Log:
WW-1607 Separate dojo-related tags into their own plugin
* Overwrite parent attribute setters so they are added to the TLD
Modified:
struts/struts2/trunk/apps/showcase/pom.xml
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/commonInclude.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remotebutton/index.jsp
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/AbstractRemoteCallUIBean.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Anchor.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/TreeNode.java
struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AnchorTest.java
struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AutocompleterTest.java
struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java
struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DivTest.java
struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/SubmitAjaxTest.java
struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/TreeTest.java
Modified: struts/struts2/trunk/apps/showcase/pom.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/pom.xml?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/apps/showcase/pom.xml (original)
+++ struts/struts2/trunk/apps/showcase/pom.xml Sun Mar 4 10:51:30 2007
@@ -37,6 +37,12 @@
<artifactId>struts2-struts1-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-dojo-plugin</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.struts</groupId>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp Sun Mar 4 10:51:30 2007
@@ -1,5 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Ajax Examples</title>
@@ -16,7 +16,7 @@
Using a JSON list returned from an action (href="/JSONList.action"), without autoComplete (autoComplete="false"), use indicator, search substring (searchType="substring")
<br/>
-<s:autocompleter name="state" theme="ajax" indicator="indicator1" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" searchType="substring"/>
+<sx:autocompleter name="state" indicator="indicator1" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" searchType="substring"/>
<img id="indicator1" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<br/>
@@ -24,7 +24,7 @@
Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCout="3", it is "3" by default), without the down arrow button (showDownArrow="false")
<br/>
-<s:autocompleter theme="ajax" indicator="indicator" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" loadOnTextChange="true" loadMinimumCount="3" showDownArrow="false"/>
+<sx:autocompleter indicator="indicator" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" loadOnTextChange="true" loadMinimumCount="3" showDownArrow="false"/>
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<br/>
@@ -32,35 +32,35 @@
Using a JSON list returned from an action (href="/JSONList.action"), with autoComplete (autoComplete="true")
<br/>
-<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="true" />
+<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" autoComplete="true" />
<br/>
<br/>
Using a local list (list="{'apple','banana','grape','pear'}")
<br/>
-<s:autocompleter theme="simple" list="{'apple','banana','grape','pear'}" cssStyle="width: 150px;"/>
+<sx:autocompleter list="{'apple','banana','grape','pear'}" cssStyle="width: 150px;"/>
<br/>
<br/>
Force valid options (forceValidOption="true")
<br/>
-<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" forceValidOption="true"/>
+<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" forceValidOption="true"/>
<br/>
<br/>
Make dropdown's height to 180px (dropdownHeight="180")
<br/>
-<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" dropdownHeight="180"/>
+<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" dropdownHeight="180"/>
<br/>
<br/>
Disabled combobox (disabled="true")
<br/>
-<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" disabled="true"/>
+<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" disabled="true"/>
<br/>
<br/>
@@ -71,9 +71,9 @@
Link two autocompleter elements. When the selected value in 'Autocompleter 1' changes, the available values in 'Autocompleter 2' will change also.
<br/>
<form id="selectForm">
- <p>Autocompleter 1 <s:autocompleter theme="simple" name="select" list="{'fruits','colors'}" value="colors" notifyTopics="/Changed" forceValidOption="true" id="sel"/></p>
+ <p>Autocompleter 1 <sx:autocompleter name="select" list="{'fruits','colors'}" value="colors" notifyTopics="/Changed" forceValidOption="true" id="sel"/></p>
</form>
-Autocompleter 2 <s:autocompleter theme="ajax" href="%{#autoex}" autoComplete="false" formId="selectForm" listenTopics="/Changed" forceValidOption="true" id="ops"/>
+Autocompleter 2 <sx:autocompleter href="%{#autoex}" autoComplete="false" formId="selectForm" listenTopics="/Changed" forceValidOption="true" id="ops"/>
<br/>
<br/>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/commonInclude.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/commonInclude.jsp?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/commonInclude.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/commonInclude.jsp Sun Mar 4 10:51:30 2007
@@ -1,4 +1,4 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<!--// START SNIPPET: common-include-->
-<s:head theme="ajax"/>
+<s:head theme="ajax" debug="true"/>
<!--// END SNIPPET: common-include-->
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remotebutton/index.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remotebutton/index.jsp?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remotebutton/index.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remotebutton/index.jsp Sun Mar 4 10:51:30 2007
@@ -1,5 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -33,19 +33,19 @@
A submit button, with an indicator
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
-<s:submit type="submit" theme="ajax" value="submit" targets="t1" href="%{ajaxTest}" align="left" indicator="indicator"/>
+<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" indicator="indicator"/>
<br/><br/>
A submit button, with "notifyTopics"
-<s:submit type="submit" theme="ajax" value="submit" targets="t1" href="%{ajaxTest}" align="left" notifyTopics="/after"/>
+<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" notifyTopics="/after"/>
<br/><br/>
Use an image as submit
-<s:submit type="image" theme="ajax" label="Alt Text" targets="t1"
- src="${pageContext.request.contextPath}/images/struts-power.gif" href="%{ajaxTest}" align="left" />
+<sx:submit type="image" label="Alt Text" targets="t1"
+ src="${pageContext.request.contextPath}/images/struts-power.gif" href="%{ajaxTest}" />
<br/><br/>
<label for="textInput">Text to be echoed</label>
@@ -54,7 +54,7 @@
Use a button as submit (custom text)
<s:form id="form" action="AjaxTest">
<input type=textbox name="data">
- <s:submit type="button" theme="ajax" label="Update Content" targets="t1" id="ajaxbtn"/>
+ <sx:submit type="button" label="Update Content" targets="t1" id="ajaxbtn"/>
</s:form>
<br/><br/>
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/AbstractRemoteCallUIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/AbstractRemoteCallUIBean.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/AbstractRemoteCallUIBean.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/AbstractRemoteCallUIBean.java Sun Mar 4 10:51:30 2007
@@ -168,4 +168,24 @@
public void setShowLoadingText(String showLoadingText) {
this.showLoadingText = showLoadingText;
}
+
+ @StrutsTagAttribute(description="The css class to use for element")
+ public void setCssClass(String cssClass) {
+ super.setCssClass(cssClass);
+ }
+
+ @StrutsTagAttribute(description="The css style to use for element")
+ public void setCssStyle(String cssStyle) {
+ super.setCssStyle(cssStyle);
+ }
+
+ @StrutsTagAttribute(description="The id to use for the element")
+ public void setId(String id) {
+ super.setId(id);
+ }
+
+ @StrutsTagAttribute(description="The name to set for element")
+ public void setName(String name) {
+ super.setName(name);
+ }
}
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Anchor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Anchor.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Anchor.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Anchor.java Sun Mar 4 10:51:30 2007
@@ -33,53 +33,7 @@
*
* A tag that creates a HTML <a href='' /> that when clicked calls a URL remote XMLHttpRequest call via the dojo
* framework.<p/>
- *
- * <!-- START SNIPPET: ajaxJavadoc -->
- * <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
- * <ul>
- * <li>href</li>
- * <li>errorText</li>
- * <li>listenTopics</li>
- * <li>notifyTopics</li>
- * <li>executeScripts</li>
- * <li>loadingText</li>
- * <li>listenTopics</li>
- * <li>handler</li>
- * <li>formId</li>
- * <li>formFilter</li>
- * <li>targets</li>
- * <li>showErrorTransportText</li>
- * <li>targets</li>
- * <li>indicator</li>
- * </ul>
- * 'resultDivId' Deprecated. Use targets.<p/>
- * 'targets' is a list of element ids whose content will be updated with the
- * text returned from request.<p/>
- * 'errorText' is the text that will be displayed when there is an error making the request.<p/>
- * 'onLoadJS' Deprecated. Use 'notifyTopics'.<p/>
- * 'preInvokeJS' Deprecated. Use 'notifyTopics'.<p/>
- * 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
- * 'loadingText' is the text that will be displayed on the 'targets' elements while making the
- * request.<p/>
- * 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
- * and dom node are passed as parameters).<p/>
- * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
- * in the request.<p/>
- * 'formFilter' is the name of a function which will be used to filter the fields that will be
- * seralized. This function takes as a parameter the element and returns true if the element
- * should be included.<p/>
- * 'listenTopics' comma separated list of topics names, that will trigger a request
- * 'indicator' element to be shown while the request executing
- * 'showErrorTransportText': whether errors should be displayed (on 'targets')</p>
- * 'showLoadingText' show loading text on targets</p>
- * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
- * <ul>
- * <li>data: html or json object when type='load' or type='error'</li>
- * <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
- * <li>request: request javascript object, when type='load' or type='error'</li>
- * </ul>
- * <!-- END SNIPPET: javadoc -->
- *
+ *<!-- END SNIPPET: javadoc -->
* <p/> <b>Examples</b>
*
* <pre>
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java Sun Mar 4 10:51:30 2007
@@ -34,50 +34,7 @@
* <p>The autocomplete tag is a combobox that can autocomplete text entered on the input box.
* When used on the "simple" theme, the autocompleter can be used like the ComboBox.
* When used on the "ajax" theme, the list can be retieved from an action. </p>
- * <!-- END SNIPPET: javadoc -->
- * <!-- START SNIPPET: ajaxJavadoc -->
- * <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
- * <ul>
- * <li>href</li>
- * <li>errorText</li>
- * <li>listenTopics</li>
- * <li>notifyTopics</li>
- * <li>listenTopics</li>
- * <li>formId</li>
- * <li>formFilter</li>
- * <li>indicator</li>
- * <li>loadOnTextChange</li>
- * <li>loadMinimumCount</li>
- * <li>showDownArrow</li>
- * <li>searchType</li>
- * </ul>
- * 'dropdownWidth' width in pixels of the drodpdown, same as autocompleter's width by default<p/>
- * 'dropdownHeight' height in pixels of the drodown, 120 px by default<p/>
- * 'forceValidOption' if invalid option is selected, clear autocompleter's text when focus is lost<p/>
- * 'autoComplete', if true, make suggestions on the textbox<p/>
- * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
- * in the request.<p/>
- * 'formFilter' is the name of a function which will be used to filter the fields that will be
- * seralized. This function takes as a parameter the element and returns true if the element
- * should be included.<p/>
- * 'listenTopics' comma separated list of topics names, that will trigger a request
- * 'indicator' element to be shown while the request executing
- * 'showErrorTransportText': whether errors should be displayed (on 'targets')<p/>
- * 'loadOnTextChange' options will be reloaded everytime a character is typed on the textbox<p/>
- * 'loadMinimumCount' minimum number of characters that will force the content to be loaded<p/>
- * 'showDownError' show or hide the down arrow button<p/>
- * 'searchType' how the search must be performed, options are: "startstring", "startword" and "substring"<p/>
- * 'keyName' name of the field to which the selected key will be assigned<p/>
- * 'iconPath' path of icon used for the dropdown<p/>
- * 'templateCssPath' path to css file used to customize Dojo's widget<p/>
- * 'dataFieldName' name of the field to be used as the list in the returned JSON string<p/>
- * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
- * <ul>
- * <li>data: selected value when type='valuechanged'</li>
- * <li>type: 'before' before the request is made, 'valuechanged' when selection changes, 'load' when the request succeeds, or 'error' when it fails</li>
- * <li>request: request javascript object, when type='load' or type='error'</li>
- * <ul>
- *<!-- END SNIPPET: ajaxJavadoc -->
+ *<!-- END SNIPPET: javadoc -->
*
*<!-- START SNIPPET: example -->
*<p>Autocompleter that gets its list from an action:</p>
@@ -298,5 +255,30 @@
@StrutsTagAttribute(description="Name of the field in the returned JSON object that contains the data array", defaultValue="Value specified in 'name'")
public void setDataFieldName(String dataFieldName) {
this.dataFieldName = dataFieldName;
+ }
+
+ @StrutsTagAttribute(description="The css class to use for element")
+ public void setCssClass(String cssClass) {
+ super.setCssClass(cssClass);
+ }
+
+ @StrutsTagAttribute(description="The css style to use for element")
+ public void setCssStyle(String cssStyle) {
+ super.setCssStyle(cssStyle);
+ }
+
+ @StrutsTagAttribute(description="The id to use for the element")
+ public void setId(String id) {
+ super.setId(id);
+ }
+
+ @StrutsTagAttribute(description="The name to set for element")
+ public void setName(String name) {
+ super.setName(name);
+ }
+
+ @StrutsTagAttribute(description="Preset the value of input element")
+ public void setValue(String arg0) {
+ super.setValue(arg0);
}
}
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java Sun Mar 4 10:51:30 2007
@@ -291,6 +291,11 @@
this.templateCssPath = templateCssPath;
}
+ @StrutsTagAttribute(description="Preset the value of input element")
+ public void setValue(String arg0) {
+ super.setValue(arg0);
+ }
+
private String format(Object obj) {
if(obj == null)
return null;
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java Sun Mar 4 10:51:30 2007
@@ -37,54 +37,7 @@
* the dojo framework.
* </p>
* <div>
- * <!-- START SNIPPET: ajaxJavadoc -->
- * <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
- * <ul>
- * <li>href</li>
- * <li>errorText</li>
- * <li>afterLoading</li>
- * <li>executeScripts</li>
- * <li>loadingText</li>
- * <li>listenTopics</li>
- * <li>handler</li>
- * <li>formId</li>
- * <li>formFilter</li>
- * <li>targets</li>
- * <li>notifyTopics</li>
- * <li>showErrorTransportText</li>
- * <li>indicator</li>
- * </ul>
- * 'targets' is a list of element ids whose content will be updated with the
- * text returned from request.<p/>
- * 'href' needs to be set as an url tag reference value.<p/>
- * 'errorText' is the text that will be displayed when there is an error making the request.<p/>
- * 'afterLoading' Deprecated. Use 'notifyTopics'.<p/>
- * 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
- * 'loadingText' is the text that will be displayed on the 'targets' elements while making the
- * request.<p/>
- * 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
- * and dom node are passed as parameters).<p/>
- * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
- * in the request.<p/>
- * 'formFilter' is the name of a function which will be used to filter the fields that will be
- * seralized. This function takes as a parameter the element and returns true if the element
- * should be included.<p/>
- * 'updateFreq' sets(in milliseconds) the update interval.<p/>
- * 'autoStart' if set to true(true by default) starts the timer automatically<p/>
- * 'startTimerListenTopics' is a comma-separated list of topics used to start the timer<p/>
- * 'stopTimerListenTopics' is a comma-separated list of topics used to stop the timer<p/>
- * 'listenTopics' comma separated list of topics names, that will trigger a request<p/>
- * 'indicator' element to be shown while the request executing<p/>
- * 'showErrorTransportText': whether errors should be displayed (on 'targets')</p>
- * 'showLoadingText' show loading text on targets</p>
- * 'separateScript' Run scripts in a separate scope, unique for each Div<p/>
- * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
- * <ul>
- * <li>data: html or json object when type='load' or type='error'</li>
- * <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
- * <li>request: request javascript object, when type='load' or type='error'</li>
- * </ul>
- * <!-- END SNIPPET: javadoc -->
+ *
* </div><p> <b>Examples</b>
*
* <pre>
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java Sun Mar 4 10:51:30 2007
@@ -50,5 +50,10 @@
void setShowLoadingText(String showLoadingText);
void setIndicator(String indicator);
-
+
+ void setName(String name);
+
+ void setCssStyle(String style);
+
+ void setCssClass(String cssClass);
}
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java Sun Mar 4 10:51:30 2007
@@ -65,52 +65,6 @@
* <!-- END SNIPPET: example3 -->
* </pre>
*
- * <!-- START SNIPPET: ajaxJavadoc -->
- * <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
- * <ul>
- * <li>href</li>
- * <li>errorText</li>
- * <li>listenTopics</li>
- * <li>notifyTopics</li>
- * <li>executeScripts</li>
- * <li>loadingText</li>
- * <li>listenTopics</li>
- * <li>handler</li>
- * <li>formId</li>
- * <li>formFilter</li>
- * <li>targets</li>
- * <li>showErrorTransportText</li>
- * <li>targets</li>
- * <li>indicator</li>
- * </ul>
- * 'resultDivId' Deprecated. Use targets.</p>
- * 'targets' is a list of element ids whose content will be updated with the
- * text returned from request.<p/>
- * 'errorText' is the text that will be displayed when there is an error making the request.<p/>
- * 'onLoadJS' Deprecated. Use 'notifyTopics'.<p/>
- * 'preInvokeJS' Deprecated. Use 'notifyTopics'.<p/>
- * 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
- * 'loadingText' is the text that will be displayed on the 'targets' elements while making the
- * request.<p/>
- * 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
- * and dom node are passed as parameters).<p/>
- * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
- * in the request.<p/>
- * 'formFilter' is the name of a function which will be used to filter the fields that will be
- * seralized. This function takes as a parameter the element and returns true if the element
- * should be included.<p/>
- * 'listenTopics' comma separated list of topics names, that will trigger a request
- * 'indicator' element to be shown while the request executing
- * 'showErrorTransportText': whether errors should be displayed (on 'targets')</p>
- * 'showLoadingText' show loading text on targets</p>
- * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
- * <ul>
- * <li>data: html or json object when type='load' or type='error'</li>
- * <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
- * <li>request: request javascript object, when type='load' or type='error'</li>
- * </ul>
- * <!-- END SNIPPET: ajaxJavadoc -->
- *
* <!-- START SNIPPET: ajxExDescription1 -->
* Show the results in another div. If you want your results to be shown in
* a div, use the resultDivId where the id is the id of the div you want them
@@ -315,7 +269,6 @@
this.targets = targets;
}
-
@StrutsTagAttribute(description="Topics that will published when the remote call completes")
public void setNotifyTopics(String notifyTopics) {
this.notifyTopics = notifyTopics;
@@ -327,7 +280,6 @@
this.showErrorTransportText = showErrorTransportText;
}
-
@StrutsTagAttribute(description="Set indicator")
public void setIndicator(String indicator) {
this.indicator = indicator;
@@ -336,5 +288,41 @@
@StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="true")
public void setShowLoadingText(String showLoadingText) {
this.showLoadingText = showLoadingText;
+ }
+
+ @StrutsTagAttribute(description="The css class to use for element")
+ public void setCssClass(String cssClass) {
+ super.setCssClass(cssClass);
+ }
+
+ @StrutsTagAttribute(description="The css style to use for element")
+ public void setCssStyle(String cssStyle) {
+ super.setCssStyle(cssStyle);
+ }
+
+ @StrutsTagAttribute(description="The id to use for the element")
+ public void setId(String id) {
+ super.setId(id);
+ }
+
+ @StrutsTagAttribute(description="The name to set for element")
+ public void setName(String name) {
+ super.setName(name);
+ }
+
+ @StrutsTagAttribute(description="The type of submit to use. Valid values are <i>input</i>, " +
+ "<i>button</i> and <i>image</i>.", defaultValue="input")
+ public void setType(String type) {
+ super.setType(type);
+ }
+
+ @StrutsTagAttribute(description="Preset the value of input element.")
+ public void setValue(String value) {
+ super.setValue(value);
+ }
+
+ @StrutsTagAttribute(description="Label expression used for rendering a element specific label")
+ public void setLabel(String label) {
+ super.setLabel(label);
}
}
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java Sun Mar 4 10:51:30 2007
@@ -431,5 +431,25 @@
public void setShowGrid(String showGrid) {
this.showGrid = showGrid;
}
+
+ @StrutsTagAttribute(description="The css class to use for element")
+ public void setCssClass(String cssClass) {
+ super.setCssClass(cssClass);
+ }
+
+ @StrutsTagAttribute(description="The css style to use for element")
+ public void setCssStyle(String cssStyle) {
+ super.setCssStyle(cssStyle);
+ }
+
+ @StrutsTagAttribute(description="The id to use for the element")
+ public void setId(String id) {
+ super.setId(id);
+ }
+
+ @StrutsTagAttribute(description="The name to set for element")
+ public void setName(String name) {
+ super.setName(name);
+ }
}
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/TreeNode.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/TreeNode.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/TreeNode.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/TreeNode.java Sun Mar 4 10:51:30 2007
@@ -102,4 +102,24 @@
public void setLabel(String label) {
super.setLabel(label);
}
+
+ @StrutsTagAttribute(description="The css class to use for element")
+ public void setCssClass(String cssClass) {
+ super.setCssClass(cssClass);
+ }
+
+ @StrutsTagAttribute(description="The css style to use for element")
+ public void setCssStyle(String cssStyle) {
+ super.setCssStyle(cssStyle);
+ }
+
+ @StrutsTagAttribute(description="The id to use for the element")
+ public void setId(String id) {
+ super.setId(id);
+ }
+
+ @StrutsTagAttribute(description="The name to set for element")
+ public void setName(String name) {
+ super.setName(name);
+ }
}
Modified: struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AnchorTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AnchorTest.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AnchorTest.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AnchorTest.java Sun Mar 4 10:51:30 2007
@@ -21,6 +21,7 @@
package org.apache.struts2.views.jsp.ui;
import org.apache.struts2.TestAction;
+import org.apache.struts2.views.jsp.ui.dojo.AnchorTag;
/**
Modified: struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AutocompleterTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AutocompleterTest.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AutocompleterTest.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/AutocompleterTest.java Sun Mar 4 10:51:30 2007
@@ -20,6 +20,8 @@
*/
package org.apache.struts2.views.jsp.ui;
+import org.apache.struts2.views.jsp.ui.dojo.AutocompleterTag;
+
/**
* @see org.apache.struts2.components.Autocompleter
Modified: struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java Sun Mar 4 10:51:30 2007
@@ -20,6 +20,10 @@
*/
package org.apache.struts2.views.jsp.ui;
+import org.apache.struts2.views.jsp.ui.dojo.AbstractRemoteCallUITag;
+import org.apache.struts2.views.jsp.ui.dojo.DateTimePickerTag;
+import org.apache.struts2.views.jsp.ui.dojo.DivTag;
+
/**
Modified: struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DivTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DivTest.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DivTest.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/DivTest.java Sun Mar 4 10:51:30 2007
@@ -21,6 +21,8 @@
package org.apache.struts2.views.jsp.ui;
import org.apache.struts2.TestAction;
+import org.apache.struts2.views.jsp.ui.dojo.AbstractRemoteCallUITag;
+import org.apache.struts2.views.jsp.ui.dojo.DivTag;
/**
Modified: struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/SubmitAjaxTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/SubmitAjaxTest.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/SubmitAjaxTest.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/SubmitAjaxTest.java Sun Mar 4 10:51:30 2007
@@ -18,6 +18,9 @@
package org.apache.struts2.views.jsp.ui;
import org.apache.struts2.TestAction;
+import org.apache.struts2.views.jsp.ui.dojo.AbstractRemoteCallUITag;
+import org.apache.struts2.views.jsp.ui.dojo.DivTag;
+import org.apache.struts2.views.jsp.ui.dojo.SubmitTag;
/**
* Test Submit component in "ajax" theme.
Modified: struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/TreeTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/TreeTest.java?view=diff&rev=514458&r1=514457&r2=514458
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/TreeTest.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/views/jsp/ui/TreeTest.java Sun Mar 4 10:51:30 2007
@@ -21,6 +21,9 @@
package org.apache.struts2.views.jsp.ui;
+import org.apache.struts2.views.jsp.ui.dojo.TreeNodeTag;
+import org.apache.struts2.views.jsp.ui.dojo.TreeTag;
+
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;