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/03 06:49:21 UTC

svn commit: r514083 [3/49] - in /struts/struts2/trunk/plugins/dojo: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/struts2/ src/main/java/org/apache/struts2/components/ src/main/java/org/apache/st...

Added: 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=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,435 @@
+/*
+ * $Id: Tree.java 497654 2007-01-19 00:21:57Z rgielen $
+ *
+ * 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.components;
+
+import java.io.Writer;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
+import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * <!-- START SNIPPET: javadoc -->
+ *
+ * Renders a tree widget with AJAX support.<p/>
+ *
+ * The id attribute is normally specified, such that it could be looked up using
+ * javascript if necessary.<p/>
+ *
+ * <!-- END SNIPPET: javadoc -->
+ *
+ * <p/> <b>Examples</b>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ *
+ * &lt-- statically --&gt;
+ * &lt;s:tree id="..." label="..."&gt;
+ *    &lt;s:treenode id="..." label="..." /&gt;
+ *    &lt;s:treenode id="..." label="..."&gt;
+ *        &lt;s:treenode id="..." label="..." /&gt;
+ *        &lt;s:treenode id="..." label="..." /&gt;
+ *    &;lt;/s:treenode&gt;
+ *    &lt;s:treenode id="..." label="..." /&gt;
+ * &lt;/s:tree&gt;
+ *
+ * &lt;-- dynamically --&gt;
+ * &lt;s:tree
+ *          id="..."
+ *          rootNode="..."
+ *          nodeIdProperty="..."
+ *          nodeTitleProperty="..."
+ *          childCollectionProperty="..." /&gt;
+ *
+ * <!-- END SNIPPET: example -->
+ * </pre>
+ *
+ */
+@StrutsTag(name="tree", tldTagClass="org.apache.struts2.views.jsp.ui.TreeTag", description="Render a tree widget.")
+@StrutsTagSkipInheritance
+public class Tree extends ClosingUIBean {
+
+    private static final String TEMPLATE = "tree-close";
+    private static final String OPEN_TEMPLATE = "tree";
+
+    private String toggle = "fade";
+    private String treeSelectedTopic;
+    private String treeExpandedTopic;
+    private String treeCollapsedTopic;
+    protected String rootNodeAttr;
+    protected String childCollectionProperty;
+    protected String nodeTitleProperty;
+    protected String nodeIdProperty;
+    private String showRootGrid;
+
+    private String showGrid;
+    private String blankIconSrc;
+    private String gridIconSrcL;
+    private String gridIconSrcV;
+    private String gridIconSrcP;
+    private String gridIconSrcC;
+    private String gridIconSrcX;
+    private String gridIconSrcY;
+    private String expandIconSrcPlus;
+    private String expandIconSrcMinus;
+    private String iconWidth;
+    private String iconHeight;
+    private String toggleDuration;
+    private String templateCssPath;
+
+    public Tree(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+        super(stack, request, response);
+    }
+
+    public boolean start(Writer writer) {
+        boolean result = super.start(writer);
+
+        if (this.label == null) {
+            if ((rootNodeAttr == null)
+                    || (childCollectionProperty == null)
+                    || (nodeTitleProperty == null)
+                    || (nodeIdProperty == null)) {
+                fieldError("label","The TreeTag requires either a value for 'label' or ALL of 'rootNode', " +
+                        "'childCollectionProperty', 'nodeTitleProperty', and 'nodeIdProperty'", null);
+            }
+        }
+        return result;
+    }
+
+    protected void evaluateExtraParams() {
+        super.evaluateExtraParams();
+
+        if (toggle != null) {
+            addParameter("toggle", findString(toggle));
+        }
+
+        if (treeSelectedTopic != null) {
+            addParameter("treeSelectedTopic", findString(treeSelectedTopic));
+        }
+
+        if (treeExpandedTopic != null) {
+            addParameter("treeExpandedTopic", findString(treeExpandedTopic));
+        }
+
+        if (treeCollapsedTopic != null) {
+            addParameter("treeCollapsedTopic", findString(treeCollapsedTopic));
+        }
+
+        if (rootNodeAttr != null) {
+            addParameter("rootNode", findValue(rootNodeAttr));
+        }
+
+        if (childCollectionProperty != null) {
+            addParameter("childCollectionProperty", findString(childCollectionProperty));
+        }
+
+        if (nodeTitleProperty != null) {
+            addParameter("nodeTitleProperty", findString(nodeTitleProperty));
+        }
+
+        if (nodeIdProperty != null) {
+            addParameter("nodeIdProperty", findString(nodeIdProperty));
+        }
+
+        if (showRootGrid != null) {
+            addParameter("showRootGrid", findValue(showRootGrid, Boolean.class));
+        }
+
+
+        if (showGrid != null) {
+            addParameter("showGrid", findValue(showGrid, Boolean.class));
+        }
+
+        if (blankIconSrc != null) {
+            addParameter("blankIconSrc", findString(blankIconSrc));
+        }
+
+        if (gridIconSrcL != null) {
+            addParameter("gridIconSrcL", findString(gridIconSrcL));
+        }
+
+        if (gridIconSrcV != null) {
+            addParameter("gridIconSrcV", findString(gridIconSrcV));
+        }
+
+        if (gridIconSrcP != null)  {
+            addParameter("gridIconSrcP", findString(gridIconSrcP));
+        }
+
+        if (gridIconSrcC != null) {
+            addParameter("gridIconSrcC", findString(gridIconSrcC));
+        }
+
+        if (gridIconSrcX != null) {
+            addParameter("gridIconSrcX", findString(gridIconSrcX));
+        }
+
+        if (gridIconSrcY != null) {
+            addParameter("gridIconSrcY", findString(gridIconSrcY));
+        }
+
+        if (expandIconSrcPlus != null) {
+            addParameter("expandIconSrcPlus", findString(expandIconSrcPlus));
+        }
+
+        if (expandIconSrcMinus != null) {
+            addParameter("expandIconSrcMinus", findString(expandIconSrcMinus));
+        }
+
+        if (iconWidth != null) {
+            addParameter("iconWidth", findValue(iconWidth, Integer.class));
+        }
+        if (iconHeight != null) {
+            addParameter("iconHeight", findValue(iconHeight, Integer.class));
+        }
+        if (toggleDuration != null) {
+            addParameter("toggleDuration", findValue(toggleDuration, Integer.class));
+        }
+        if (templateCssPath != null) {
+            addParameter("templateCssPath", findString(templateCssPath));
+        }
+    }
+
+    public String getDefaultOpenTemplate() {
+        return OPEN_TEMPLATE;
+    }
+
+    protected String getDefaultTemplate() {
+        return TEMPLATE;
+    }
+
+    public String getToggle() {
+        return toggle;
+    }
+
+    @StrutsTagAttribute(description="The toggle property (either 'explode' or 'fade')", defaultValue="fade")
+    public void setToggle(String toggle) {
+        this.toggle = toggle;
+    }
+
+    public String getTreeSelectedTopic() {
+        return treeSelectedTopic;
+    }
+
+    @StrutsTagAttribute(description="The treeSelectedTopic property")
+    public void setTreeSelectedTopic(String treeSelectedTopic) {
+        this.treeSelectedTopic = treeSelectedTopic;
+    }
+
+    public String getTreeExpandedTopic() {
+        return treeExpandedTopic;
+    }
+
+    @StrutsTagAttribute(description="The treeExpandedTopic property.")
+    public void setTreeExpandedTopic(String treeExpandedTopic) {
+        this.treeExpandedTopic = treeExpandedTopic;
+    }
+
+    public String getTreeCollapsedTopic() {
+        return treeCollapsedTopic;
+    }
+
+    @StrutsTagAttribute(description="The treeCollapsedTopic property.")
+    public void setTreeCollapsedTopic(String treeCollapsedTopic) {
+        this.treeCollapsedTopic = treeCollapsedTopic;
+    }
+
+    public String getRootNode() {
+        return rootNodeAttr;
+    }
+
+    @StrutsTagAttribute(description="The rootNode property.")
+    public void setRootNode(String rootNode) {
+        this.rootNodeAttr = rootNode;
+    }
+
+    public String getChildCollectionProperty() {
+        return childCollectionProperty;
+    }
+
+    @StrutsTagAttribute(description="The childCollectionProperty property.")
+    public void setChildCollectionProperty(String childCollectionProperty) {
+        this.childCollectionProperty = childCollectionProperty;
+    }
+
+    public String getNodeTitleProperty() {
+        return nodeTitleProperty;
+    }
+
+    @StrutsTagAttribute(description="The nodeTitleProperty property.")
+    public void setNodeTitleProperty(String nodeTitleProperty) {
+        this.nodeTitleProperty = nodeTitleProperty;
+    }
+
+    public String getNodeIdProperty() {
+        return nodeIdProperty;
+    }
+
+    @StrutsTagAttribute(description="The nodeIdProperty property.")
+    public void setNodeIdProperty(String nodeIdProperty) {
+        this.nodeIdProperty = nodeIdProperty;
+    }
+
+    @StrutsTagAttribute(description="The showRootGrid property (default true).")
+    public void setShowRootGrid(String showRootGrid) {
+        this.showRootGrid = showRootGrid;
+    }
+
+    public String getShowRootGrid() {
+        return showRootGrid;
+    }
+
+    public String getBlankIconSrc() {
+        return blankIconSrc;
+    }
+
+    @StrutsTagAttribute(description="Blank icon image source.")
+    public void setBlankIconSrc(String blankIconSrc) {
+        this.blankIconSrc = blankIconSrc;
+    }
+
+    public String getExpandIconSrcMinus() {
+        return expandIconSrcMinus;
+    }
+
+    @StrutsTagAttribute(description="Expand icon (-) image source.")
+    public void setExpandIconSrcMinus(String expandIconSrcMinus) {
+        this.expandIconSrcMinus = expandIconSrcMinus;
+    }
+
+    public String getExpandIconSrcPlus() {
+        return expandIconSrcPlus;
+    }
+
+    @StrutsTagAttribute(description="Expand Icon (+) image source.")
+    public void setExpandIconSrcPlus(String expandIconSrcPlus) {
+        this.expandIconSrcPlus = expandIconSrcPlus;
+    }
+
+    public String getGridIconSrcC() {
+        return gridIconSrcC;
+    }
+
+    @StrutsTagAttribute(description="Image source for under child item child icons.")
+    public void setGridIconSrcC(String gridIconSrcC) {
+        this.gridIconSrcC = gridIconSrcC;
+    }
+
+    public String getGridIconSrcL() {
+        return gridIconSrcL;
+    }
+
+
+    @StrutsTagAttribute(description=" Image source for last child grid.")
+    public void setGridIconSrcL(String gridIconSrcL) {
+        this.gridIconSrcL = gridIconSrcL;
+    }
+
+    public String getGridIconSrcP() {
+        return gridIconSrcP;
+    }
+
+    @StrutsTagAttribute(description="Image source for under parent item child icons.")
+    public void setGridIconSrcP(String gridIconSrcP) {
+        this.gridIconSrcP = gridIconSrcP;
+    }
+
+    public String getGridIconSrcV() {
+        return gridIconSrcV;
+    }
+
+    @StrutsTagAttribute(description="Image source for vertical line.")
+    public void setGridIconSrcV(String gridIconSrcV) {
+        this.gridIconSrcV = gridIconSrcV;
+    }
+
+    public String getGridIconSrcX() {
+        return gridIconSrcX;
+    }
+
+    @StrutsTagAttribute(description="Image source for grid for sole root item.")
+    public void setGridIconSrcX(String gridIconSrcX) {
+        this.gridIconSrcX = gridIconSrcX;
+    }
+
+    public String getGridIconSrcY() {
+        return gridIconSrcY;
+    }
+
+    @StrutsTagAttribute(description="Image source for grid for last root item.")
+    public void setGridIconSrcY(String gridIconSrcY) {
+        this.gridIconSrcY = gridIconSrcY;
+    }
+
+    public String getIconHeight() {
+        return iconHeight;
+    }
+
+
+    @StrutsTagAttribute(description="Icon height", defaultValue="18px")
+    public void setIconHeight(String iconHeight) {
+        this.iconHeight = iconHeight;
+    }
+
+    public String getIconWidth() {
+        return iconWidth;
+    }
+
+    @StrutsTagAttribute(description="Icon width", defaultValue="19px")
+    public void setIconWidth(String iconWidth) {
+        this.iconWidth = iconWidth;
+    }
+
+
+
+    public String getTemplateCssPath() {
+        return templateCssPath;
+    }
+
+    @StrutsTagAttribute(description="Template css path", defaultValue="{contextPath}/struts/tree.css.")
+    public void setTemplateCssPath(String templateCssPath) {
+        this.templateCssPath = templateCssPath;
+    }
+
+    public String getToggleDuration() {
+        return toggleDuration;
+    }
+
+    @StrutsTagAttribute(description="Toggle duration in milliseconds", defaultValue="150")
+    public void setToggleDuration(String toggleDuration) {
+        this.toggleDuration = toggleDuration;
+    }
+
+    public String getShowGrid() {
+        return showGrid;
+    }
+
+    @StrutsTagAttribute(description="Show grid", type="Boolean", defaultValue="true")
+    public void setShowGrid(String showGrid) {
+        this.showGrid = showGrid;
+    }
+}
+

Added: 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=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/TreeNode.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/components/TreeNode.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,105 @@
+/*
+ * $Id: TreeNode.java 497654 2007-01-19 00:21:57Z rgielen $
+ *
+ * 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.components;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
+import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * <!-- START SNIPPET: javadoc -->
+ *
+ * Renders a tree node within a tree widget with AJAX support.<p/>
+ *
+ * Either of the following combinations should be used depending on if the tree
+ * is to be constrcted dynamically or statically. <p/>
+ *
+ * <b>Dynamically</b>
+ * <ul>
+ *      <li>id - id of this tree node</li>
+ *      <li>title - label to be displayed for this tree node</li>
+ * </ul>
+ *
+ * <b>Statically</b>
+ * <ul>
+ *      <li>rootNode - the parent node of which this tree is derived from</li>
+ *      <li>nodeIdProperty - property to obtained this current tree node's id</li>
+ *      <li>nodeTitleProperty - property to obtained this current tree node's title</li>
+ *      <li>childCollectionProperty - property that returnds this current tree node's children</li>
+ * </ul>
+ *
+ * <!-- END SNIPPET: javadoc -->
+ *
+ * <p/> <b>Examples</b>
+ *
+ * <pre>
+ * <!-- START SNIPPET: example -->
+ *
+ * &lt-- statically --&gt;
+ * &lt;s:tree id="..." label="..."&gt;
+ *    &lt;s:treenode id="..." label="..." /&gt;
+ *    &lt;s:treenode id="..." label="..."&gt;
+ *        &lt;s:treenode id="..." label="..." /&gt;
+ *        &lt;s:treenode id="..." label="..." /&gt;
+ *    &;lt;/s:treenode&gt;
+ *    &lt;s:treenode id="..." label="..." /&gt;
+ * &lt;/s:tree&gt;
+ *
+ * &lt;-- dynamically --&gt;
+ * &lt;s:tree
+ *          id="..."
+ *          rootNode="..."
+ *          nodeIdProperty="..."
+ *          nodeTitleProperty="..."
+ *          childCollectionProperty="..." /&gt;
+ *
+ * <!-- END SNIPPET: example -->
+ * </pre>
+ *
+ */
+@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.")
+@StrutsTagSkipInheritance
+public class TreeNode extends ClosingUIBean {
+    private static final String TEMPLATE = "treenode-close";
+    private static final String OPEN_TEMPLATE = "treenode";
+
+    public TreeNode(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+        super(stack, request, response);
+    }
+
+    public String getDefaultOpenTemplate() {
+        return OPEN_TEMPLATE;
+    }
+
+    protected String getDefaultTemplate() {
+        return TEMPLATE;
+    }
+
+    @StrutsTagAttribute(description="Label expression used for rendering tree node label.", required=true)
+    public void setLabel(String label) {
+        super.setLabel(label);
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/DojoTagLibrary.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/DojoTagLibrary.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/DojoTagLibrary.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/DojoTagLibrary.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,43 @@
+package org.apache.struts2.views;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.views.freemarker.tags.StrutsModels;
+import org.apache.struts2.views.velocity.components.AnchorDirective;
+import org.apache.struts2.views.velocity.components.AutocompleterDirective;
+import org.apache.struts2.views.velocity.components.DateTimePickerDirective;
+import org.apache.struts2.views.velocity.components.DivDirective;
+import org.apache.struts2.views.velocity.components.SubmitDirective;
+import org.apache.struts2.views.velocity.components.TabbedPanelDirective;
+import org.apache.struts2.views.velocity.components.TreeDirective;
+import org.apache.struts2.views.velocity.components.TreeNodeDirective;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+public class DojoTagLibrary implements TagLibrary {
+
+    public Object getFreemarkerModels(ValueStack stack, HttpServletRequest req,
+            HttpServletResponse res) {
+        
+        return new StrutsModels(stack, req, res);
+    }
+
+    public List<Class> getVelocityDirectiveClasses() {
+        Class[] directives = new Class[] {
+            DateTimePickerDirective.class,
+            DivDirective.class,
+            AutocompleterDirective.class,
+            AnchorDirective.class,
+            SubmitDirective.class,
+            TabbedPanelDirective.class,
+            TreeDirective.class,
+            TreeNodeDirective.class,
+        };
+        return Arrays.asList(directives);
+    }
+
+}
\ No newline at end of file

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/AutocompleterModel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/AutocompleterModel.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/AutocompleterModel.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/AutocompleterModel.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,43 @@
+/*
+ * $Id: AutocompleterModel.java 502294 2007-02-01 17:28:00Z niallp $
+ *
+ * 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.views.freemarker.tags;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.Autocompleter;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see Autocompleter
+ */
+public class AutocompleterModel extends TagModel {
+
+    public AutocompleterModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        super(stack, req, res);
+    }
+
+    protected Component getBean() {
+        return new Autocompleter(stack, req, res);
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,40 @@
+/*
+ * $Id: DateTimePickerModel.java 493867 2007-01-07 22:26:23Z mrdon $
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.views.freemarker.tags;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.DateTimePicker;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see DropdownDateTimePicker
+ */
+public class DateTimePickerModel extends TextFieldModel {
+
+    public DateTimePickerModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        super(stack, req, res);
+    }
+
+    protected Component getBean() {
+        return new DateTimePicker(stack, req, res);
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DojoModels.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DojoModels.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DojoModels.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DojoModels.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,89 @@
+package org.apache.struts2.views.freemarker.tags;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+public class DojoModels {
+    protected DateTimePickerModel dateTimePicker;
+    protected TabbedPanelModel tabbedPanel;
+    protected TreeModel treeModel;
+    protected TreeNodeModel treenodeModel;
+    protected AutocompleterModel autocompleterModel;
+    protected DivModel div;
+    protected AnchorModel a;
+    protected SubmitModel submit;
+    
+    private ValueStack stack;
+    private HttpServletRequest req;
+    private HttpServletResponse res;
+    
+    public DojoModels(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        this.stack = stack;
+        this.req = req;
+        this.res = res;
+    }
+    
+    public DateTimePickerModel getDatetimepicker() {
+        if (dateTimePicker == null) {
+            dateTimePicker = new DateTimePickerModel(stack, req, res);
+        }
+
+        return dateTimePicker;
+    }
+    
+    public AutocompleterModel getAutocompleterModel() {
+        if (autocompleterModel == null) {
+            autocompleterModel = new AutocompleterModel(stack, req, res);
+        }
+
+        return autocompleterModel;
+    }
+    
+    public TabbedPanelModel getTabbedpanelModel() {
+        if (tabbedPanel == null) {
+            tabbedPanel = new TabbedPanelModel(stack, req, res);
+        }
+
+        return tabbedPanel;
+    }
+    
+    public TreeModel getTree() {
+        if (treeModel == null) {
+            treeModel = new TreeModel(stack,req, res);
+        }
+        return treeModel;
+    }
+
+    public TreeNodeModel getTreenode() {
+        if (treenodeModel == null) {
+            treenodeModel = new TreeNodeModel(stack, req, res);
+        }
+        return treenodeModel;
+    }
+    
+    public DivModel getDiv() {
+        if (div == null) {
+            div = new DivModel(stack, req, res);
+        }
+
+        return div;
+    }
+    
+    public AnchorModel getA() {
+        if (a == null) {
+            a = new AnchorModel(stack, req, res);
+        }
+
+        return a;
+    }
+    
+    public SubmitModel getSubmit() {
+        if (submit == null) {
+            submit = new SubmitModel(stack, req, res);
+        }
+
+        return submit;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TabbedPanelModel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TabbedPanelModel.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TabbedPanelModel.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TabbedPanelModel.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,42 @@
+/*
+ * $Id: TabbedPanelModel.java 471756 2006-11-06 15:01:43Z husted $
+ *
+ * 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.views.freemarker.tags;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.TabbedPanel;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see TabbedPanel
+ */
+public class TabbedPanelModel extends TagModel {
+    public TabbedPanelModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        super(stack, req, res);
+    }
+
+    protected Component getBean() {
+        return new TabbedPanel(stack, req, res);
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeModel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeModel.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeModel.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeModel.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,44 @@
+/*
+ * $Id: TreeModel.java 471756 2006-11-06 15:01:43Z husted $
+ *
+ * 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.views.freemarker.tags;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.Tree;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * TreeModel
+ * @see Tree
+ *
+ */
+public class TreeModel extends TagModel {
+    public TreeModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        super(stack, req, res);
+    }
+
+    protected Component getBean() {
+        return new Tree(stack,req,res);
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeNodeModel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeNodeModel.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeNodeModel.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeNodeModel.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,43 @@
+/*
+ * $Id: TreeNodeModel.java 471756 2006-11-06 15:01:43Z husted $
+ *
+ * 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.views.freemarker.tags;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.TreeNode;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * TreeNodeModel
+ * @see TreeNode
+ */
+public class TreeNodeModel extends TagModel {
+    public TreeNodeModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        super(stack, req, res);
+    }
+
+    protected Component getBean() {
+        return new TreeNode(stack,req,res);
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRemoteCallUITag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRemoteCallUITag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRemoteCallUITag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRemoteCallUITag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,117 @@
+/*
+ * $Id: AbstractRemoteCallUITag.java 508285 2007-02-16 02:42:24Z musachy $
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.views.jsp.ui;
+
+import org.apache.struts2.components.RemoteUICallBean;
+
+public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
+
+    protected String href;
+    protected String listenTopics;
+    protected String notifyTopics;
+    protected String loadingText;
+    protected String errorText;
+    protected String beforeLoading;
+    protected String afterLoading;
+    protected String executeScripts;
+    protected String handler;
+    protected String formId;
+    protected String formFilter;
+    protected String showErrorTransportText;
+    protected String indicator;
+    protected String showLoadingText;
+
+    protected void populateParams() {
+        super.populateParams();
+
+        RemoteUICallBean remote = (RemoteUICallBean) component;
+        remote.setHref(href);
+        remote.setListenTopics(listenTopics);
+        remote.setLoadingText(loadingText);
+        remote.setErrorText(errorText);
+        remote.setAfterLoading(afterLoading);
+        remote.setBeforeLoading(beforeLoading);
+        remote.setExecuteScripts(executeScripts);
+        remote.setHandler(handler);
+        remote.setFormFilter(formFilter);
+        remote.setFormId(formId);
+        remote.setNotifyTopics(notifyTopics);
+        remote.setShowErrorTransportText(showErrorTransportText);
+        remote.setIndicator(indicator);
+        remote.setShowLoadingText(showLoadingText);
+    }
+
+    public void setHref(String href) {
+        this.href = href;
+    }
+
+    public void setErrorText(String errorText) {
+        this.errorText = errorText;
+    }
+
+    public void setLoadingText(String loadingText) {
+        this.loadingText = loadingText;
+    }
+
+    public void setListenTopics(String listenTopics) {
+        this.listenTopics = listenTopics;
+    }
+
+    public void setAfterLoading(String afterLoading) {
+        this.afterLoading = afterLoading;
+    }
+
+    public void setBeforeLoading(String beforeLoading) {
+        this.beforeLoading = beforeLoading;
+    }
+
+    public void setExecuteScripts(String executeScripts) {
+        this.executeScripts = executeScripts;
+    }
+
+    public void setHandler(String handler) {
+        this.handler = handler;
+    }
+
+    public void setFormFilter(String formFilter) {
+        this.formFilter = formFilter;
+    }
+
+    public void setFormId(String formId) {
+        this.formId = formId;
+    }
+
+    public void setNotifyTopics(String notifyTopics) {
+        this.notifyTopics = notifyTopics;
+    }
+
+    public void setShowErrorTransportText(String showErrorTransportText) {
+        this.showErrorTransportText = showErrorTransportText;
+    }
+
+    /**
+     * @param indicator The indicator to set.
+     */
+    public void setIndicator(String indicator) {
+        this.indicator = indicator;
+    }
+
+    public void setShowLoadingText(String showLoadingText) {
+        this.showLoadingText = showLoadingText;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,62 @@
+/*
+ * $Id: AnchorTag.java 490079 2006-12-24 22:46:07Z husted $
+ *
+ * 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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Anchor;
+import org.apache.struts2.components.Component;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see Anchor
+ */
+public class AnchorTag extends AbstractRemoteCallUITag {
+
+	private static final long serialVersionUID = -1034616578492431113L;
+
+    protected String targets;
+    protected String preInvokeJS;
+
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new Anchor(stack, req, res);
+    }
+
+    protected void populateParams() {
+        super.populateParams();
+
+        Anchor link = (Anchor) component;
+        link.setTargets(targets);
+    }
+
+    public void setTargets(String targets) {
+        this.targets = targets;
+    }
+
+    @Deprecated()
+    public void setPreInvokeJS(String preInvokeJS) {
+        this.beforeLoading = preInvokeJS;
+    }
+}
+
+

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AutocompleterTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AutocompleterTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AutocompleterTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AutocompleterTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,171 @@
+/*
+ * $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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Autocompleter;
+import org.apache.struts2.components.Component;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see Autocompleter
+ */
+public class AutocompleterTag extends ComboBoxTag {
+    private static final long serialVersionUID = -1112470447573172581L;
+
+    protected String forceValidOption;
+    protected String searchType;
+    protected String autoComplete;
+    protected String delay;
+    protected String disabled;
+    protected String href;
+    protected String dropdownWidth;
+    protected String dropdownHeight;
+    protected String formId;
+    protected String formFilter;
+    protected String listenTopics;
+    protected String notifyTopics;
+    protected String indicator;
+    protected String loadOnTextChange;
+    protected String loadMinimumCount;
+    protected String showDownArrow;
+    protected String templateCssPath;
+    protected String iconPath;
+    protected String keyName;
+    protected String dataFieldName;
+    
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new Autocompleter(stack, req, res);
+    }
+
+    protected void populateParams() {
+        super.populateParams();
+
+        Autocompleter autocompleter = (Autocompleter) component;
+        autocompleter.setAutoComplete(autoComplete);
+        autocompleter.setDisabled(disabled);
+        autocompleter.setForceValidOption(forceValidOption);
+        autocompleter.setHref(href);
+        autocompleter.setDelay(delay);
+        autocompleter.setSearchType(searchType);
+        autocompleter.setDropdownHeight(dropdownHeight);
+        autocompleter.setDropdownWidth(dropdownWidth);
+        autocompleter.setFormFilter(formFilter);
+        autocompleter.setFormId(formId);
+        autocompleter.setListenTopics(listenTopics);
+        autocompleter.setNotifyTopics(notifyTopics);
+        autocompleter.setIndicator(indicator);
+        autocompleter.setLoadMinimumCount(loadMinimumCount);
+        autocompleter.setLoadOnTextChange(loadOnTextChange);
+        autocompleter.setShowDownArrow(showDownArrow);
+        autocompleter.setTemplateCssPath(templateCssPath);
+        autocompleter.setIconPath(iconPath);
+        autocompleter.setKeyName(keyName);
+        autocompleter.setDataFieldName(dataFieldName);
+    }
+
+    public void setAutoComplete(String autoComplete) {
+        this.autoComplete = autoComplete;
+    }
+
+    public void setDisabled(String disabled) {
+        this.disabled = disabled;
+    }
+
+    public void setForceValidOption(String forceValidOption) {
+        this.forceValidOption = forceValidOption;
+    }
+
+    public void setHref(String href) {
+        this.href = href;
+    }
+
+    public void setDelay(String searchDelay) {
+        this.delay = searchDelay;
+    }
+
+    public void setSearchType(String searchType) {
+        this.searchType = searchType;
+    }
+
+    public void setDropdownHeight(String height) {
+        this.dropdownHeight = height;
+    }
+
+    public void setDropdownWidth(String width) {
+        this.dropdownWidth = width;
+    }
+
+    public void setFormFilter(String formFilter) {
+      this.formFilter = formFilter;
+    }
+
+    public void setFormId(String formId) {
+      this.formId = formId;
+    }
+
+    public void setListenTopics(String listenTopics) {
+      this.listenTopics = listenTopics;
+    }
+
+    public void setNotifyTopics(String onValueChangedPublishTopic) {
+      this.notifyTopics = onValueChangedPublishTopic;
+    }
+
+    public void setIndicator(String indicator) {
+        this.indicator = indicator;
+    }
+
+    public void setLoadMinimumCount(String loadMinimumCount) {
+        this.loadMinimumCount = loadMinimumCount;
+    }
+
+    public String getLoadMinimumCount() {
+        return loadMinimumCount;
+    }
+
+    public void setLoadOnTextChange(String loadOnTextChange) {
+        this.loadOnTextChange = loadOnTextChange;
+    }
+
+    public void setShowDownArrow(String showDownArrow) {
+        this.showDownArrow = showDownArrow;
+    }
+
+    public void setTemplateCssPath(String templateCssPath) {
+        this.templateCssPath = templateCssPath;
+    }
+    
+    public void setIconPath(String iconPath) {
+        this.iconPath = iconPath;
+    }
+
+    public void setKeyName(String keyName) {
+        this.keyName = keyName;
+    }
+
+    public void setDataFieldName(String dataFieldName) {
+        this.dataFieldName = dataFieldName;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,139 @@
+/*
+ * $Id: DateTimePickerTag.java 508605 2007-02-16 21:56:50Z musachy $
+ *
+ * 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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.DateTimePicker;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see DateTimePicker
+ */
+public class DateTimePickerTag extends AbstractUITag {
+
+    private static final long serialVersionUID = 4054114507143447232L;
+
+    protected String displayWeeks;
+    protected String adjustWeeks;
+    protected String startDate;
+    protected String endDate;
+    protected String weekStartsOn;
+    protected String staticDisplay;
+    protected String dayWidth;
+    protected String language;
+    
+    protected String iconPath;
+    protected String formatLength;
+    protected String displayFormat;
+    protected String toggleType;
+    protected String toggleDuration;
+    protected String type;
+    protected String templateCssPath;
+
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new DateTimePicker(stack, req, res);
+    }
+
+    protected void populateParams() {
+        super.populateParams();
+
+        final DateTimePicker dateTimePicker = (DateTimePicker) component;
+        dateTimePicker.setAdjustWeeks(adjustWeeks);
+        dateTimePicker.setDayWidth(dayWidth);
+        dateTimePicker.setDisplayWeeks(displayWeeks);
+        dateTimePicker.setEndDate(endDate);
+        dateTimePicker.setStartDate(startDate);
+        dateTimePicker.setStaticDisplay(staticDisplay);
+        dateTimePicker.setWeekStartsOn(weekStartsOn);
+        dateTimePicker.setLanguage(language);
+        dateTimePicker.setIconPath(iconPath);
+        dateTimePicker.setFormatLength(formatLength);
+        dateTimePicker.setDisplayFormat(displayFormat);
+        dateTimePicker.setToggleType(toggleType);
+        dateTimePicker.setToggleDuration(toggleDuration);
+        dateTimePicker.setType(type);
+        dateTimePicker.setTemplateCssPath(templateCssPath);
+    }
+
+    public void setAdjustWeeks(String adjustWeeks) {
+        this.adjustWeeks = adjustWeeks;
+    }
+
+    public void setDayWidth(String dayWidth) {
+        this.dayWidth = dayWidth;
+    }
+
+    public void setDisplayWeeks(String displayWeeks) {
+        this.displayWeeks = displayWeeks;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public void setStaticDisplay(String staticDisplay) {
+        this.staticDisplay = staticDisplay;
+    }
+
+    public void setWeekStartsOn(String weekStartsOn) {
+        this.weekStartsOn = weekStartsOn;
+    }
+
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+    
+    public void setDisplayFormat(String displayFormat) {
+        this.displayFormat = displayFormat;
+    }
+
+    public void setFormatLength(String formatLength) {
+        this.formatLength = formatLength;
+    }
+
+    public void setIconPath(String iconPath) {
+        this.iconPath = iconPath;
+    }
+
+    public void setToggleDuration(String toggleDuration) {
+        this.toggleDuration = toggleDuration;
+    }
+
+    public void setToggleType(String toggleType) {
+        this.toggleType = toggleType;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+    
+    public void setTemplateCssPath(String templateCssPath) {
+        this.templateCssPath = templateCssPath;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DivTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DivTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DivTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DivTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,87 @@
+/*
+ * $Id: DivTag.java 511300 2007-02-24 16:41:38Z musachy $
+ *
+ * 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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.Div;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+public class DivTag extends AbstractRemoteCallUITag {
+
+    private static final long serialVersionUID = 5309231035916461758L;
+
+    protected String updateFreq;
+    protected String autoStart;
+    protected String delay;
+    protected String startTimerListenTopics;
+    protected String stopTimerListenTopics;
+    protected String refreshOnShow;
+    protected String separateScripts;
+    
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new Div(stack, req, res);
+    }
+
+    protected void populateParams() {
+        super.populateParams();
+
+        Div div = (Div) component;
+        div.setUpdateFreq(updateFreq);
+        div.setAutoStart(autoStart);
+        div.setDelay(delay);
+        div.setStartTimerListenTopics(startTimerListenTopics);
+        div.setStopTimerListenTopics(stopTimerListenTopics);
+        div.setRefreshOnShow(refreshOnShow);
+        div.setSeparateScripts(separateScripts);
+    }
+
+    public void setAutoStart(String autoStart) {
+        this.autoStart = autoStart;
+    }
+
+    public void setDelay(String delay) {
+        this.delay = delay;
+    }
+
+    public void setUpdateFreq(String updateInterval) {
+        this.updateFreq = updateInterval;
+    }
+
+    public void setStartTimerListenTopics(String startTimerListenTopic) {
+        this.startTimerListenTopics = startTimerListenTopic;
+    }
+
+    public void setStopTimerListenTopics(String stopTimerListenTopic) {
+        this.stopTimerListenTopics = stopTimerListenTopic;
+    }
+
+    public void setRefreshOnShow(String refreshOnShow) {
+        this.refreshOnShow = refreshOnShow;
+    }
+
+    public void setSeparateScripts(String separateScripts) {
+        this.separateScripts = separateScripts;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,184 @@
+/*
+ * $Id: SubmitTag.java 508285 2007-02-16 02:42:24Z musachy $
+ *
+ * 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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.Submit;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see Submit
+ */
+public class SubmitTag extends AbstractUITag {
+
+    private static final long serialVersionUID = 2179281109958301343L;
+
+    protected String action;
+    protected String method;
+    protected String align;
+    protected String type;
+    protected String href;
+    protected String listenTopics;
+    protected String notifyTopics;
+    protected String loadingText;
+    protected String errorText;
+    protected String executeScripts;
+    protected String handler;
+    protected String formId;
+    protected String formFilter;
+    protected String src;
+    protected String showErrorTransportText;
+    protected String indicator;
+    protected String showLoadingText;
+
+    //these two are called "preInvokeJS" and "onLoadJS" on the tld
+    //Names changed here to keep some consistency
+    protected String beforeLoading;
+    protected String afterLoading;
+
+    //this one is called "resultDivId" on the tld
+    protected String targets;
+
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new Submit(stack, req, res);
+    }
+
+    protected void populateParams() {
+        super.populateParams();
+
+        Submit submit = ((Submit) component);
+        submit.setAction(action);
+        submit.setMethod(method);
+        submit.setAlign(align);
+        submit.setType(type);
+        submit.setHref(href);
+        submit.setListenTopics(listenTopics);
+        submit.setLoadingText(loadingText);
+        submit.setErrorText(errorText);
+        submit.setAfterLoading(afterLoading);
+        submit.setBeforeLoading(beforeLoading);
+        submit.setExecuteScripts(executeScripts);
+        submit.setHandler(handler);
+        submit.setFormFilter(formFilter);
+        submit.setFormId(formId);
+        submit.setSrc(src);
+        submit.setTargets(targets);
+        submit.setNotifyTopics(notifyTopics);
+        submit.setShowErrorTransportText(showErrorTransportText);
+        submit.setIndicator(indicator);
+        submit.setShowLoadingText(showLoadingText);
+    }
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    public void setMethod(String method) {
+        this.method = method;
+    }
+
+    public void setAlign(String align) {
+        this.align = align;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public void setHref(String href) {
+        this.href = href;
+    }
+
+    public void setErrorText(String errorText) {
+        this.errorText = errorText;
+    }
+
+    public void setLoadingText(String loadingText) {
+        this.loadingText = loadingText;
+    }
+
+    public void setListenTopics(String listenTopics) {
+        this.listenTopics = listenTopics;
+    }
+
+    public void setExecuteScripts(String executeScripts) {
+        this.executeScripts = executeScripts;
+    }
+
+    public void setHandler(String handler) {
+        this.handler = handler;
+    }
+
+    public void setFormFilter(String formFilter) {
+        this.formFilter = formFilter;
+    }
+
+    public void setFormId(String formId) {
+        this.formId = formId;
+    }
+
+    public void setSrc(String src) {
+        this.src = src;
+    }
+
+    public void setTargets(String targets) {
+        this.targets = targets;
+    }
+
+    @Deprecated
+    public void setResultDivId(String id) {
+        this.targets = id;
+    }
+
+    @Deprecated
+    public void setOnLoadJS(String postJS) {
+        this.afterLoading = postJS;
+    }
+
+    @Deprecated
+    public void setPreInvokeJS(String preJS) {
+        this.beforeLoading = preJS;
+    }
+
+    public void setNotifyTopics(String notifyTopics) {
+        this.notifyTopics = notifyTopics;
+    }
+
+    public void setShowErrorTransportText(String showErrorTransportText) {
+        this.showErrorTransportText = showErrorTransportText;
+    }
+
+    public void setIndicator(String indicator) {
+        this.indicator = indicator;
+    }
+
+    public void setShowLoadingText(String showLoadingText) {
+        this.showLoadingText = showLoadingText;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,72 @@
+/*
+ * $Id: TabbedPanelTag.java 508575 2007-02-16 20:46:49Z musachy $
+ *
+ * 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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.TabbedPanel;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see TabbedPanel
+ */
+public class TabbedPanelTag extends AbstractClosingTag {
+
+    private static final long serialVersionUID = -4719930205515386252L;
+
+    private String selectedTab;
+    private String closeButton;
+    private String doLayout;
+    private String templateCssPath;
+
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new TabbedPanel(stack, req, res);
+    }
+
+    protected void populateParams() {
+        super.populateParams();
+        TabbedPanel tabbedPanel = (TabbedPanel) component;
+        tabbedPanel.setSelectedTab(selectedTab);
+        tabbedPanel.setCloseButton(closeButton);
+        tabbedPanel.setDoLayout(doLayout);
+        tabbedPanel.setLabelposition(labelPosition);
+        tabbedPanel.setTemplateCssPath(templateCssPath);
+    }
+
+    public void setSelectedTab(String selectedTab) {
+        this.selectedTab = selectedTab;
+    }
+
+    public void setCloseButton(String closeButton) {
+        this.closeButton = closeButton;
+    }
+
+    public void setDoLayout(String doLayout) {
+        this.doLayout = doLayout;
+    }
+
+    public void setTemplateCssPath(String templateCssPath) {
+        this.templateCssPath = templateCssPath;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeNodeTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeNodeTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeNodeTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeNodeTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,56 @@
+/*
+ * $Id: TreeNodeTag.java 471756 2006-11-06 15:01:43Z husted $
+ *
+ * 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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.TreeNode;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see TreeNode
+ */
+public class TreeNodeTag extends AbstractClosingTag {
+
+    private static final long serialVersionUID = 7340746943017900803L;
+
+
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new TreeNode(stack,req,res);
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    // NOTE: not necessary, label property is inherited, will be populated
+    // by super-class
+    /*protected void populateParams() {
+        if (label != null) {
+            TreeNode treeNode = (TreeNode)component;
+            treeNode.setLabel(label);
+        }
+        super.populateParams();
+    }*/
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeTag.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeTag.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeTag.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,305 @@
+/*
+ * $Id: TreeTag.java 471756 2006-11-06 15:01:43Z husted $
+ *
+ * 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.views.jsp.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.Tree;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see Tree
+ */
+public class TreeTag extends AbstractClosingTag {
+
+    private static final long serialVersionUID = 2735218501058548013L;
+
+    private String toggle;
+    private String treeSelectedTopic;
+    private String treeExpandedTopic;
+    private String treeCollapsedTopic;
+    private String rootNode;
+    private String childCollectionProperty;
+    private String nodeTitleProperty;
+    private String nodeIdProperty;
+    private String showRootGrid;
+
+    private String showGrid;
+    private String blankIconSrc;
+    private String gridIconSrcL;
+    private String gridIconSrcV;
+    private String gridIconSrcP;
+    private String gridIconSrcC;
+    private String gridIconSrcX;
+    private String gridIconSrcY;
+    private String expandIconSrcPlus;
+    private String expandIconSrcMinus;
+    private String iconWidth;
+    private String iconHeight;
+    private String toggleDuration;
+    private String templateCssPath;
+
+
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new Tree(stack,req,res);
+    }
+
+    protected void populateParams() {
+        super.populateParams();
+
+        Tree tree = (Tree) component;
+        if (childCollectionProperty != null)
+            tree.setChildCollectionProperty(childCollectionProperty);
+        if (nodeIdProperty != null)
+            tree.setNodeIdProperty(nodeIdProperty);
+        if (nodeTitleProperty != null)
+            tree.setNodeTitleProperty(nodeTitleProperty);
+        if (rootNode != null)
+            tree.setRootNode(rootNode);
+        if (toggle != null)
+            tree.setToggle(toggle);
+        if (treeCollapsedTopic != null)
+            tree.setTreeCollapsedTopic(treeCollapsedTopic);
+        if (treeExpandedTopic != null)
+            tree.setTreeExpandedTopic(treeExpandedTopic);
+        if (treeSelectedTopic != null)
+            tree.setTreeSelectedTopic(treeSelectedTopic);
+        if (showRootGrid != null)
+            tree.setShowRootGrid(showRootGrid);
+
+        if (showGrid != null)
+            tree.setShowGrid(showGrid);
+        if (blankIconSrc != null)
+            tree.setBlankIconSrc(blankIconSrc);
+        if (gridIconSrcL != null)
+            tree.setGridIconSrcL(gridIconSrcC);
+        if (gridIconSrcV != null)
+            tree.setGridIconSrcV(gridIconSrcV);
+        if (gridIconSrcP != null)
+            tree.setGridIconSrcP(gridIconSrcP);
+        if (gridIconSrcC != null)
+            tree.setGridIconSrcC(gridIconSrcC);
+        if (gridIconSrcX != null)
+            tree.setGridIconSrcX(gridIconSrcX);
+        if (gridIconSrcY != null)
+            tree.setGridIconSrcY(gridIconSrcY);
+        if (expandIconSrcPlus != null)
+            tree.setExpandIconSrcPlus(expandIconSrcPlus);
+        if (expandIconSrcMinus != null)
+            tree.setExpandIconSrcMinus(expandIconSrcMinus);
+        if (iconWidth != null)
+            tree.setIconWidth(iconWidth);
+        if (iconHeight != null)
+            tree.setIconHeight(iconHeight);
+        if (toggleDuration != null)
+            tree.setToggleDuration(toggleDuration);
+        if (templateCssPath != null)
+            tree.setTemplateCssPath(templateCssPath);
+    }
+
+    public String getToggle() {
+        return toggle;
+    }
+
+    public void setToggle(String toggle) {
+        this.toggle = toggle;
+    }
+
+    public String getTreeSelectedTopic() {
+        return treeSelectedTopic;
+    }
+
+    public void setTreeSelectedTopic(String treeSelectedTopic) {
+        this.treeSelectedTopic = treeSelectedTopic;
+    }
+
+    public String getTreeExpandedTopic() {
+        return treeExpandedTopic;
+    }
+
+    public void setTreeExpandedTopic(String treeExpandedTopic) {
+        this.treeExpandedTopic = treeExpandedTopic;
+    }
+
+    public String getTreeCollapsedTopic() {
+        return treeCollapsedTopic;
+    }
+
+    public void setTreeCollapsedTopic(String treeCollapsedTopic) {
+        this.treeCollapsedTopic = treeCollapsedTopic;
+    }
+
+    public String getRootNode() {
+        return rootNode;
+    }
+
+    public void setRootNode(String rootNode) {
+        this.rootNode = rootNode;
+    }
+
+    public String getChildCollectionProperty() {
+        return childCollectionProperty;
+    }
+
+    public void setChildCollectionProperty(String childCollectionProperty) {
+        this.childCollectionProperty = childCollectionProperty;
+    }
+
+    public String getNodeTitleProperty() {
+        return nodeTitleProperty;
+    }
+
+    public void setNodeTitleProperty(String nodeTitleProperty) {
+        this.nodeTitleProperty = nodeTitleProperty;
+    }
+
+    public String getNodeIdProperty() {
+        return nodeIdProperty;
+    }
+
+    public void setNodeIdProperty(String nodeIdProperty) {
+        this.nodeIdProperty = nodeIdProperty;
+    }
+
+    public String getShowRootGrid() {
+        return showRootGrid;
+    }
+
+    public void setShowRootGrid(String showRootGrid) {
+        this.showRootGrid = showRootGrid;
+    }
+
+    public String getBlankIconSrc() {
+        return blankIconSrc;
+    }
+
+    public void setBlankIconSrc(String blankIconSrc) {
+        this.blankIconSrc = blankIconSrc;
+    }
+
+    public String getExpandIconSrcMinus() {
+        return expandIconSrcMinus;
+    }
+
+    public void setExpandIconSrcMinus(String expandIconSrcMinus) {
+        this.expandIconSrcMinus = expandIconSrcMinus;
+    }
+
+    public String getExpandIconSrcPlus() {
+        return expandIconSrcPlus;
+    }
+
+    public void setExpandIconSrcPlus(String expandIconSrcPlus) {
+        this.expandIconSrcPlus = expandIconSrcPlus;
+    }
+
+    public String getGridIconSrcC() {
+        return gridIconSrcC;
+    }
+
+    public void setGridIconSrcC(String gridIconSrcC) {
+        this.gridIconSrcC = gridIconSrcC;
+    }
+
+    public String getGridIconSrcL() {
+        return gridIconSrcL;
+    }
+
+    public void setGridIconSrcL(String gridIconSrcL) {
+        this.gridIconSrcL = gridIconSrcL;
+    }
+
+    public String getGridIconSrcP() {
+        return gridIconSrcP;
+    }
+
+    public void setGridIconSrcP(String gridIconSrcP) {
+        this.gridIconSrcP = gridIconSrcP;
+    }
+
+    public String getGridIconSrcV() {
+        return gridIconSrcV;
+    }
+
+    public void setGridIconSrcV(String gridIconSrcV) {
+        this.gridIconSrcV = gridIconSrcV;
+    }
+
+    public String getGridIconSrcX() {
+        return gridIconSrcX;
+    }
+
+    public void setGridIconSrcX(String gridIconSrcX) {
+        this.gridIconSrcX = gridIconSrcX;
+    }
+
+    public String getGridIconSrcY() {
+        return gridIconSrcY;
+    }
+
+    public void setGridIconSrcY(String gridIconSrcY) {
+        this.gridIconSrcY = gridIconSrcY;
+    }
+
+    public String getIconHeight() {
+        return iconHeight;
+    }
+
+    public void setIconHeight(String iconHeight) {
+        this.iconHeight = iconHeight;
+    }
+
+    public String getIconWidth() {
+        return iconWidth;
+    }
+
+    public void setIconWidth(String iconWidth) {
+        this.iconWidth = iconWidth;
+    }
+
+    public String getTemplateCssPath() {
+        return templateCssPath;
+    }
+
+    public void setTemplateCssPath(String templateCssPath) {
+        this.templateCssPath = templateCssPath;
+    }
+
+    public String getToggleDuration() {
+        return toggleDuration;
+    }
+
+    public void setToggleDuration(String toggleDuration) {
+        this.toggleDuration = toggleDuration;
+    }
+
+    public String getShowGrid() {
+        return showGrid;
+    }
+
+    public void setShowGrid(String showGrid) {
+        this.showGrid = showGrid;
+    }
+}
+

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/AutocompleterDirective.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/AutocompleterDirective.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/AutocompleterDirective.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/AutocompleterDirective.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,46 @@
+/*
+ * $Id: AutocompleterDirective.java 502294 2007-02-01 17:28:00Z niallp $
+ *
+ * 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.views.velocity.components;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Autocompleter;
+import org.apache.struts2.components.Bean;
+import org.apache.struts2.components.Component;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see Autocompleter
+ */
+public class AutocompleterDirective extends AbstractDirective {
+
+    protected Component getBean(ValueStack stack, HttpServletRequest req,
+            HttpServletResponse res) {
+        return new Autocompleter(stack, req, res);
+    }
+
+    public String getBeanName() {
+        return "autocompleter";
+    }
+
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,40 @@
+/*
+ * $Id: DateTimePickerDirective.java 493867 2007-01-07 22:26:23Z mrdon $
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.views.velocity.components;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.DateTimePicker;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see DateTimePicker
+ */
+public class DateTimePickerDirective extends TextFieldDirective {
+
+    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new DateTimePicker(stack, req, res);
+    }
+
+    public String getBeanName() {
+        return "datetimepicker";
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DivDirective.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DivDirective.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DivDirective.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DivDirective.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,46 @@
+/*
+ * $Id: DivDirective.java 494148 2007-01-08 18:41:13Z mrdon $
+ *
+ * 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.views.velocity.components;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.Div;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see Div
+ */
+public class DivDirective extends AbstractDirective {
+    public String getBeanName() {
+        return "div";
+    }
+
+    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new Div(stack, req, res);
+    }
+
+    public int getType() {
+        return BLOCK;
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TabbedPanelDirective.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TabbedPanelDirective.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TabbedPanelDirective.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TabbedPanelDirective.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,42 @@
+/*
+ * $Id: TabbedPanelDirective.java 471756 2006-11-06 15:01:43Z husted $
+ *
+ * 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.views.velocity.components;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.TabbedPanel;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * @see TabbedPanel
+ */
+public class TabbedPanelDirective extends AbstractDirective {
+    public String getBeanName() {
+        return "tabbedpanel";
+    }
+
+    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new TabbedPanel(stack, req, res);
+    }
+}

Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeDirective.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeDirective.java?view=auto&rev=514083
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeDirective.java (added)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeDirective.java Fri Mar  2 21:48:54 2007
@@ -0,0 +1,43 @@
+/*
+ * $Id: TreeDirective.java 471756 2006-11-06 15:01:43Z husted $
+ *
+ * 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.views.velocity.components;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.components.Component;
+import org.apache.struts2.components.Tree;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * <code>TreeDirective</code>
+ * @see Tree
+ */
+public class TreeDirective  extends AbstractDirective {
+    public String getBeanName() {
+        return "tree";
+    }
+
+    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+        return new Tree(stack, req, res);
+    }
+}