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 @@ <body> - <sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true" closeButton="pane" labelposition="bottom"> - <sx:div id="left" label="test1" theme="ajax" > + <sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true" labelposition="bottom"> + <sx:div id="left" label="test1" theme="ajax" closable="true"> I'm a Tab!!! </sx:div > - <sx:div id="middle" label="test2" theme="ajax" > + <sx:div id="middle" label="test2" theme="ajax" closable="true"> I'm the other Tab!!! </sx:div > 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 @@ <li><a href="example2.jsp">A local tabbed panel width fixed size (doLayout="true")</a></li> <li><a href="example3.jsp">A remote (href != "") and local tabbed panel</a></li> <li><a href="example1.jsp">Various remote and local tabbed panels (with enclosed tabbed pannels) with layout (doLayout="false")</a></li> - <li><a href="example4.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on tabs(closeButton="tab"), and tabs on the right (labelposition="right")</a></li> - <li><a href="example5.jsp">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></li> + <li><a href="example5.jsp">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")</a></li> </ol> 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 @@ <h2>Description</h2> <p> <!-- START SNIPPET: tagdescription --> - 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 <!-- END SNIPPET: tagdescription --> </p> Modified: struts/struts2/trunk/core/src/site/resources/tags/ajax/autocompleter.html URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/ajax/autocompleter.html?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/core/src/site/resources/tags/ajax/autocompleter.html (original) +++ struts/struts2/trunk/core/src/site/resources/tags/ajax/autocompleter.html Sat Mar 24 08:37:58 2007 @@ -36,6 +36,14 @@ <td align="left" valign="top">Set the html accesskey attribute on rendered html element</td> </tr> <tr> + <td align="left" valign="top">afterNotifyTopics</td> + <td align="left" valign="top">false</td> + <td align="left" valign="top"></td> + <td align="left" valign="top">true</td> + <td align="left" valign="top">String</td> + <td align="left" valign="top">Comma delimmited list of topics that will published after the request(if the request succeeds)</td> + </tr> + <tr> <td align="left" valign="top">autoComplete</td> <td align="left" valign="top">false</td> <td align="left" valign="top">false</td> @@ -44,6 +52,14 @@ <td align="left" valign="top">Whether autocompleter should make suggestion on the textbox</td> </tr> <tr> + <td align="left" valign="top">beforeNotifyTopics</td> + <td align="left" valign="top">false</td> + <td align="left" valign="top"></td> + <td align="left" valign="top">true</td> + <td align="left" valign="top">String</td> + <td align="left" valign="top">Comma delimmited list of topics that will published before the request</td> + </tr> + <tr> <td align="left" valign="top">cssClass</td> <td align="left" valign="top">false</td> <td align="left" valign="top"></td> @@ -108,6 +124,14 @@ <td align="left" valign="top">Decide if an empty option is to be inserted. Default false.</td> </tr> <tr> + <td align="left" valign="top">errorNotifyTopics</td> + <td align="left" valign="top">false</td> + <td align="left" valign="top"></td> + <td align="left" valign="top">true</td> + <td align="left" valign="top">String</td> + <td align="left" valign="top">Comma delimmited list of topics that will published after the request(if the request fails)</td> + </tr> + <tr> <td align="left" valign="top">forceValidOption</td> <td align="left" valign="top">false</td> <td align="left" valign="top">false</td> @@ -514,6 +538,14 @@ <td align="left" valign="top">true</td> <td align="left" valign="top">String</td> <td align="left" valign="top">Preset the value of input element</td> + </tr> + <tr> + <td align="left" valign="top">valueNotifyTopics</td> + <td align="left" valign="top">false</td> + <td align="left" valign="top"></td> + <td align="left" valign="top">true</td> + <td align="left" valign="top">String</td> + <td align="left" valign="top">Comma delimmited list of topics that will published when a value is selected</td> </tr> </table> <!-- END SNIPPET: tagattributes --> Modified: struts/struts2/trunk/core/src/site/resources/tags/ajax/div.html URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/ajax/div.html?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/core/src/site/resources/tags/ajax/div.html (original) +++ struts/struts2/trunk/core/src/site/resources/tags/ajax/div.html Sat Mar 24 08:37:58 2007 @@ -60,6 +60,14 @@ <td align="left" valign="top">Comma delimmited list of topics that will published before the request</td> </tr> <tr> + <td align="left" valign="top">closable</td> + <td align="left" valign="top">false</td> + <td align="left" valign="top">false</td> + <td align="left" valign="top">true</td> + <td align="left" valign="top">String</td> + <td align="left" valign="top">Show a close button when the div is inside a 'tabbedpanel'</td> + </tr> + <tr> <td align="left" valign="top">cssClass</td> <td align="left" valign="top">false</td> <td align="left" valign="top"></td> Modified: struts/struts2/trunk/core/src/site/resources/tags/ajax/tabbedpanel.html URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/ajax/tabbedpanel.html?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/core/src/site/resources/tags/ajax/tabbedpanel.html (original) +++ struts/struts2/trunk/core/src/site/resources/tags/ajax/tabbedpanel.html Sat Mar 24 08:37:58 2007 @@ -41,7 +41,7 @@ <td align="left" valign="top"></td> <td align="left" valign="top">true</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Where the close button will be placed, possible values are 'tab' and 'pane'</td> + <td align="left" valign="top">Deprecated. Use 'closable' on each div(tab)</td> </tr> <tr> <td align="left" valign="top">cssClass</td> Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java (original) +++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java Sat Mar 24 08:37:58 2007 @@ -72,7 +72,8 @@ protected String stopTimerListenTopics; protected String refreshOnShow; protected String separateScripts; - + protected String closable; + public Div(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { super(stack, request, response); } @@ -102,6 +103,8 @@ addParameter("stopTimerListenTopics", findString(stopTimerListenTopics)); if (separateScripts != null) addParameter("separateScripts", findValue(separateScripts, Boolean.class)); + if (closable != null) + addParameter("closable", findValue(closable, Boolean.class)); } @StrutsTagAttribute(description="Start timer automatically", type="Boolean", defaultValue="true") @@ -137,5 +140,10 @@ @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each Div", defaultValue="true") public void setSeparateScripts(String separateScripts) { this.separateScripts = separateScripts; + } + + @StrutsTagAttribute(description="Show a close button when the div is inside a 'tabbedpanel'", defaultValue="false") + public void setClosable(String closable) { + this.closable = closable; } } Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java (original) +++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java Sat Mar 24 08:37:58 2007 @@ -131,7 +131,7 @@ this.selectedTab = selectedTab; } - @StrutsTagAttribute(description="Where the close button will be placed, possible values are 'tab' and 'pane'") + @StrutsTagAttribute(description="Deprecated. Use 'closable' on each div(tab)") public void setCloseButton(String closeButton) { this.closeButton = closeButton; } Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java (original) +++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java Sat Mar 24 08:37:58 2007 @@ -39,6 +39,7 @@ protected String stopTimerListenTopics; protected String refreshOnShow; protected String separateScripts; + protected String closable; public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return new Div(stack, req, res); @@ -55,6 +56,7 @@ div.setStopTimerListenTopics(stopTimerListenTopics); div.setRefreshOnShow(refreshOnShow); div.setSeparateScripts(separateScripts); + div.setClosable(closable); } public void setAutoStart(String autoStart) { @@ -83,5 +85,9 @@ public void setSeparateScripts(String separateScripts) { this.separateScripts = separateScripts; + } + + public void setClosable(String closable) { + this.closable = closable; } } Modified: struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/div.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/div.ftl?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/div.ftl (original) +++ struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/div.ftl Sat Mar 24 08:37:58 2007 @@ -8,6 +8,9 @@ <#if parameters.autoStart?exists> autoStart="${parameters.autoStart?string?html}"<#rt/> </#if> + <#if parameters.closable?exists> + closable="${parameters.closable?string?html}"<#rt/> + </#if> <#if parameters.startTimerListenTopics?if_exists != ""> startTimerListenTopics="${parameters.startTimerListenTopics?html}"<#rt/> </#if> Modified: struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DivTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DivTest.java?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DivTest.java (original) +++ struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DivTest.java Sat Mar 24 08:37:58 2007 @@ -52,6 +52,7 @@ tag.setShowLoadingText("true"); tag.setSeparateScripts("false"); tag.setErrorNotifyTopics("n"); + tag.setClosable("true"); tag.doStartTag(); tag.doEndTag(); Modified: struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/div-1.txt URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/div-1.txt?view=diff&rev=522039&r1=522038&r2=522039 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/div-1.txt (original) +++ struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/div-1.txt Sat Mar 24 08:37:58 2007 @@ -3,6 +3,7 @@ delay="4000" updateFreq="1000" autoStart="true" + closable="true" startTimerListenTopics="h" stopTimerListenTopics="i" refreshOnShow="true"