Author: musachy
Date: Tue May  8 18:07:14 2007
New Revision: 536387

URL: http://svn.apache.org/viewvc?view=rev&rev=536387
Log:
* Fix velocity directives (so #sxTAGNAME maps to TAGNAME)
* Change type of tabbedpanel, treenode and tree to BLOCK
* Small datetimepicker javadoc fix

Added:
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java
Modified:
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java
    
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
 Tue May  8 18:07:14 2007
@@ -101,11 +101,11 @@
  * </p>
  * <ul>
  *   <li>RFC 3339
- *   <li>SimpleDateFormat.getTimeInstance(DateFormat.SHORT
- *   <li>SimpleDateFormat.getDateInstance(DateFormat.SHORT
- *   <li>SimpleDateFormat.getDateInstance(DateFormat.MEDIUM
- *   <li>SimpleDateFormat.getDateInstance(DateFormat.FULL
- *   <li>SimpleDateFormat.getDateInstance(DateFormat.LONG
+ *   <li>SimpleDateFormat.getTimeInstance(DateFormat.SHORT)
+ *   <li>SimpleDateFormat.getDateInstance(DateFormat.SHORT)
+ *   <li>SimpleDateFormat.getDateInstance(DateFormat.MEDIUM)
+ *   <li>SimpleDateFormat.getDateInstance(DateFormat.FULL)
+ *   <li>SimpleDateFormat.getDateInstance(DateFormat.LONG)
  *   <li>'displayFormat' attribute value
  * </ul>
  * <!-- END SNIPPET: javadoc -->

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java
 Tue May  8 18:07:14 2007
@@ -25,14 +25,13 @@
 
 import org.apache.struts2.components.Anchor;
 import org.apache.struts2.components.Component;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see Anchor
  */
-public class AnchorDirective extends AbstractDirective {
+public class AnchorDirective extends DojoAbstractDirective {
     public String getBeanName() {
         return "a";
     }

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java
 Tue May  8 18:07:14 2007
@@ -25,14 +25,13 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.Autocompleter;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see Autocompleter
  */
-public class AutocompleterDirective extends AbstractDirective {
+public class AutocompleterDirective extends DojoAbstractDirective {
 
     protected Component getBean(ValueStack stack, HttpServletRequest req,
             HttpServletResponse res) {

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java
 Tue May  8 18:07:14 2007
@@ -25,14 +25,13 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.Bind;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see Bind
  */
-public class BindDirective extends AbstractDirective {
+public class BindDirective extends DojoAbstractDirective {
     public String getBeanName() {
         return "bind";
     }

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java
 Tue May  8 18:07:14 2007
@@ -22,14 +22,13 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.DateTimePicker;
-import org.apache.struts2.views.velocity.components.TextFieldDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see DateTimePicker
  */
-public class DateTimePickerDirective extends TextFieldDirective {
+public class DateTimePickerDirective extends DojoAbstractDirective {
 
     protected Component getBean(ValueStack stack, HttpServletRequest req, 
HttpServletResponse res) {
         return new DateTimePicker(stack, req, res);

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java
 Tue May  8 18:07:14 2007
@@ -25,14 +25,13 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.Div;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see Div
  */
-public class DivDirective extends AbstractDirective {
+public class DivDirective extends DojoAbstractDirective {
     public String getBeanName() {
         return "div";
     }

Added: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java?view=auto&rev=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java
 (added)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java
 Tue May  8 18:07:14 2007
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.dojo.views.velocity.components;
+
+import org.apache.struts2.views.velocity.components.AbstractDirective;
+
+/**
+ * Overwrite name prefix 
+ *
+ */
+public abstract class DojoAbstractDirective extends AbstractDirective {
+    public String getName() {
+        return "sx" + getBeanName();
+    }
+}

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java
 Tue May  8 18:07:14 2007
@@ -25,14 +25,13 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.Head;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see Head
  */
-public class HeadDirective extends AbstractDirective {
+public class HeadDirective extends DojoAbstractDirective {
     protected Component getBean(ValueStack stack, HttpServletRequest req, 
HttpServletResponse res) {
         return new Head(stack, req, res);
     }

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java
 Tue May  8 18:07:14 2007
@@ -25,14 +25,13 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.components.Submit;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see Submit
  */
-public class SubmitDirective extends AbstractDirective {
+public class SubmitDirective extends DojoAbstractDirective {
     public String getBeanName() {
         return "submit";
     }

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java
 Tue May  8 18:07:14 2007
@@ -25,19 +25,22 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.TabbedPanel;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
 /**
  * @see TabbedPanel
  */
-public class TabbedPanelDirective extends AbstractDirective {
+public class TabbedPanelDirective extends DojoAbstractDirective {
     public String getBeanName() {
         return "tabbedpanel";
     }
 
     protected Component getBean(ValueStack stack, HttpServletRequest req, 
HttpServletResponse res) {
         return new TabbedPanel(stack, req, res);
+    }
+    
+    public int getType() {
+        return BLOCK;
     }
 }

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java
 Tue May  8 18:07:14 2007
@@ -25,7 +25,6 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.Tree;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
@@ -33,12 +32,16 @@
  * <code>TreeDirective</code>
  * @see Tree
  */
-public class TreeDirective  extends AbstractDirective {
+public class TreeDirective  extends DojoAbstractDirective {
     public String getBeanName() {
         return "tree";
     }
 
     protected Component getBean(ValueStack stack, HttpServletRequest req, 
HttpServletResponse res) {
         return new Tree(stack, req, res);
+    }
+    
+    public int getType() {
+        return BLOCK;
     }
 }

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java?view=diff&rev=536387&r1=536386&r2=536387
==============================================================================
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java
 Tue May  8 18:07:14 2007
@@ -25,7 +25,6 @@
 
 import org.apache.struts2.components.Component;
 import org.apache.struts2.dojo.components.TreeNode;
-import org.apache.struts2.views.velocity.components.AbstractDirective;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
@@ -33,13 +32,17 @@
  * <code>TreeNodeDirective</code>
  * @see TreeNode
  */
-public class TreeNodeDirective  extends AbstractDirective {
+public class TreeNodeDirective  extends DojoAbstractDirective {
     public String getBeanName() {
         return "treenode";
     }
 
     protected Component getBean(ValueStack stack, HttpServletRequest req, 
HttpServletResponse res) {
         return new TreeNode(stack, req, res);
+    }
+    
+    public int getType() {
+        return BLOCK;
     }
 }
 


Reply via email to