svn commit: r522027 - /struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java

2007-03-24 Thread musachy
Author: musachy
Date: Sat Mar 24 06:30:18 2007
New Revision: 522027

URL: http://svn.apache.org/viewvc?view=rev&rev=522027
Log:
WW-1607  Improve anchor's javadoc

Modified:

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java?view=diff&rev=522027&r1=522026&r2=522027
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java
 Sat Mar 24 06:30:18 2007
@@ -31,57 +31,54 @@
 
 /**
  * 
- *
- * A tag that creates a HTML  that when clicked calls a URL 
remote XMLHttpRequest call via the dojo
- * framework.
- *
- *  Examples
- *
- * 
- * 
- * 
- * 
- * 
- * 
- * 
- * 
- *
- * 
- *
- * 
- *
- * Results in
- *
- * 
- *
- * 
- *
- * 
- * 
- * 
- * 
- * 
- *
- * 
- *
- * 
- *
- * Here is an example that uses the beforeLoading. This example is in 
altSyntax=true:
- *
- * 
- *
+ * 
+ * A tag that creates an HTML  element, that when clicked makes an 
asynchronous request(XMLHttpRequest). The url
+ * attribute must be build using the  tag. 
  * 
- *
+ * 
  * 
- * 
- * 
- *  A
- * 
- * 
+ * 
+ * Update target content with html returned from an action:
+ * 
+ * 
Div 1
+ * + * + * + * Update Content + * + * + * Submit form(anchor inside the form): + * + * + * + * Submit form + * + * + * Submit form(anchor outside the form) + * + * + * + * + * + * Submit form + * + * Using topics: + * + * dojo.event.topic.subscribe("/before", function(data, type, e){ + * alert('inside a topic event. before request'); + * //data : source element id + * //type : "before" + * //e: request object + * //set e.cancel = true to cancel request + * }); + * + * + * Publish topics + * * - * */ [EMAIL PROTECTED](name="a", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AnchorTag", description="Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets") [EMAIL PROTECTED](name="a", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AnchorTag", description="Renders an HTML anchor element that when clicked calls a URL via remote XMLHttpRequest and updates " + +"its targets content") public class Anchor extends AbstractRemoteCallUIBean { public static final String OPEN_TEMPLATE = "a"; public static final String TEMPLATE = "a-close";

svn commit: r522028 - /struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java

2007-03-24 Thread musachy
Author: musachy
Date: Sat Mar 24 06:31:12 2007
New Revision: 522028

URL: http://svn.apache.org/viewvc?view=rev&rev=522028
Log:
WW-1607  Improve anchor's javadoc

Modified:

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java?view=diff&rev=522028&r1=522027&r2=522028
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java
 Sat Mar 24 06:31:12 2007
@@ -51,7 +51,7 @@
  * 
  * 
  *  
- *  Submit form   
+ *  Submit form   
  * 
  * 
  * Submit form(anchor outside the form)
@@ -73,7 +73,7 @@
  * });
  *  
  * 
- * Publish topics 
+ * Publish topics 
  * 
  * 
  */




svn commit: r522038 - /struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java

2007-03-24 Thread musachy
Author: musachy
Date: Sat Mar 24 07:48:38 2007
New Revision: 522038

URL: http://svn.apache.org/viewvc?view=rev&rev=522038
Log:
WW-1607  Improve autocompleter's javadoc

Modified:

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java?view=diff&rev=522038&r1=522037&r2=522038
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java
 Sat Mar 24 07:48:38 2007
@@ -32,19 +32,56 @@
 
 /**
  * 
- * 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. 
- *
+ * The autocomplete tag is a combobox that can autocomplete text entered on 
the input box. If an action
+ * is used to populate the autocompleter, the output of the action must be a 
well formed JSON string. The 
+ * autocompleter expects and array of arrays of length 2, where the first 
element is the text displayed and
+ * the second is the value.
+ * 
+ * 
+ * 
+ * Autocompleter that gets its list from an action:
  *
- *
- *Autocompleter that gets its list from an action:
- *
- *
- **Autocompleter that uses a list:
- *
- *
- *
+ * 
+ *
+ * Which expects a response like:
+ * 
+ * [
+ *  ["Text1", "Value1"],
+ *  ["Text2", "Value2"]
+ * ]
+ * 
+ * Or (note that now the response is a JSON object, instead of an array, and a 
field inside the object matches the autocompleter's name):
+ * 
+ * {
+ *  autocompleter1:[
+ *   ["Text1", "Value1"],
+ *   ["Text2", "Value2"]
+ *  ]
+ * }
+ * 
+ * The name of the field that contains the data for the autocompleter can be 
specified using the "dataFieldName" attribute.
+ * 
+ * Autocompleter that uses a list:
+ *
+ * 
+ * 
+ * Autocompleter that reloads its content everytime the text changes (and 
the length of the text is greater than 3):
+ * 
+ * 
+ * 
+ * The text entered on the autocompleter is passed as a parameter to the url 
specified in "href", like (text is "struts"):
+ *  
+ * http://host/example/myaction.do?mvc=struts
+ * 
+ * Linking two autocompleters:
+ * 
+ * 
+ * + * + * + * + * + * */ @StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities") public class Autocompleter extends ComboBox {

svn commit: r522039 - in /struts/struts2/trunk: apps/showcase/src/main/webapp/ajax/tabbedpanel/ core/src/site/resources/tags/ core/src/site/resources/tags/ajax/ plugins/dojo/src/main/java/org/apache/s

2007-03-24 Thread musachy
Author: musachy
Date: Sat Mar 24 08:37:58 2007
New Revision: 522039

URL: http://svn.apache.org/viewvc?view=rev&rev=522039
Log:
WW-1812 
* Flag "closeButton" attribute as deprecated on tabbedpanel tag, and add 
"closable" on div tag
* Update showcase tabbedpanel example
* Remove ajax html doc from old location on core

Removed:

struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example4.jsp
struts/struts2/trunk/core/src/site/resources/tags/autocompleter.html
struts/struts2/trunk/core/src/site/resources/tags/datepicker.html
struts/struts2/trunk/core/src/site/resources/tags/datetimepicker.html
struts/struts2/trunk/core/src/site/resources/tags/tabbedPanel.html
struts/struts2/trunk/core/src/site/resources/tags/timepicker.html
struts/struts2/trunk/core/src/site/resources/tags/tree.html
struts/struts2/trunk/core/src/site/resources/tags/treenode.html
Modified:

struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example5.jsp

struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/index.jsp
struts/struts2/trunk/core/src/site/resources/tags/ajax/a.html
struts/struts2/trunk/core/src/site/resources/tags/ajax/autocompleter.html
struts/struts2/trunk/core/src/site/resources/tags/ajax/div.html
struts/struts2/trunk/core/src/site/resources/tags/ajax/tabbedpanel.html

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java
struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/div.ftl

struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DivTest.java

struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/div-1.txt

Modified: 
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example5.jsp
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example5.jsp?view=diff&rev=522039&r1=522038&r2=522039
==
--- 
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example5.jsp
 (original)
+++ 
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example5.jsp
 Sat Mar 24 08:37:58 2007
@@ -11,11 +11,11 @@
 
 
 
-   
-  
+   
+  
   I'm a Tab!!!
   
-  
+  
   I'm the other Tab!!!
   
  

Modified: 
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/index.jsp
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/index.jsp?view=diff&rev=522039&r1=522038&r2=522039
==
--- 
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/index.jsp 
(original)
+++ 
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/index.jsp 
Sat Mar 24 08:37:58 2007
@@ -14,8 +14,7 @@
 A local tabbed panel width fixed size 
(doLayout="true")
 A remote (href != "") and local tabbed 
panel
 Various remote and local tabbed panels 
(with enclosed tabbed pannels) with layout (doLayout="false")
-A local tabbed panel width fixed size 
(doLayout="true") with close button on tabs(closeButton="tab"), and tabs on the 
right (labelposition="right")
-A local tabbed panel width fixed size 
(doLayout="true") with close button on the tab pane (closeButton="pane"), and 
tabs on the bottom (labelposition="bottom")
+A local tabbed panel width fixed size 
(doLayout="true") with close button on the tab pane (closable="true" on tabs), 
and tabs on the bottom (labelposition="bottom")
 
 
 

Modified: struts/struts2/trunk/core/src/site/resources/tags/ajax/a.html
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/ajax/a.html?view=diff&rev=522039&r1=522038&r2=522039
==
--- struts/struts2/trunk/core/src/site/resources/tags/ajax/a.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/ajax/a.html Sat Mar 24 
08:37:58 2007
@@ -12,7 +12,7 @@
Description


-   Render a HTML href element that when clicked can optionally 
call a URL via remote XMLHttpRequest and updates its targets
+   Renders an HTML anchor element that when clicked calls a URL 
via remote XMLHttpRequest and updates its targets content


 

Modifi

svn commit: r522040 - /struts/struts2/trunk/core/src/main/resources/template/simple/autocompleter.ftl

2007-03-24 Thread musachy
Author: musachy
Date: Sat Mar 24 08:47:40 2007
New Revision: 522040

URL: http://svn.apache.org/viewvc?view=rev&rev=522040
Log:
Delete ajax autocompleter template from core

Removed:

struts/struts2/trunk/core/src/main/resources/template/simple/autocompleter.ftl



svn commit: r522041 - in /struts/struts2/trunk/plugins/dojo/src: main/resources/template/ajax/autocompleter.ftl main/resources/template/ajax/form-close.ftl test/resources/org/apache/struts2/dojo/views

2007-03-24 Thread musachy
Author: musachy
Date: Sat Mar 24 08:52:18 2007
New Revision: 522041

URL: http://svn.apache.org/viewvc?view=rev&rev=522041
Log:
WW-1667
* Move script generated on form tag outside the table element
* Make xhtml complient the input generated by the autocompleter tag

Modified:

struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl

struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/form-close.ftl

struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/Autocompleter-1.txt

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl?view=diff&rev=522041&r1=522040&r2=522041
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl
 Sat Mar 24 08:52:18 2007
@@ -106,7 +106,11 @@
 
 <#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
 <#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
->
+<#if parameters.href?exists>
+ />
+<#else>
+ >
+
 <#if parameters.list?exists>
<#if (parameters.headerKey?exists && parameters.headerValue?exists)>
${parameters.headerValue?html}

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/form-close.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/form-close.ftl?view=diff&rev=522041&r1=522040&r2=522041
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/form-close.ftl
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/form-close.ftl
 Sat Mar 24 08:52:18 2007
@@ -1,4 +1,4 @@
-
+
 <#if (parameters.customOnsubmitEnabled?default(false))>
 
 <#-- 
@@ -84,6 +84,4 @@
 --><#t/>
<#lt/>
<#lt/>