You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2015/05/22 12:59:14 UTC
[47/50] struts git commit: Moves deprecated plugins to struts-archive
repo
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java
deleted file mode 100644
index 814a510..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * $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.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: notice -->
- * The "head" tag renders required JavaScript code to configure Dojo and is required in order to use
- * any of the tags included in the Dojo plugin.</p>
- * <!-- END SNIPPET: notice -->
- *
- * <!-- START SNIPPET: javadoc -->
- * <p></p>
- *
- * <p>To debug javascript errors set the "debug" attribute to true, which will display Dojo
- * (and Struts) warning and error messages at the bottom of the page. Core Dojo files are by default
- * compressed, to improve loading time, which makes them very hard to read. To debug Dojo and Struts
- * widgets, set the "compressed" attribute to true. Make sure to turn this option off before
- * moving your project into production, as uncompressed files will take longer to download.
- * </p>
- * <p>For troubleshooting javascript problems the following configuration is recommended:</p>
- * <pre>
- * <sx:head debug="true" cache="false" compressed="false" />
- * </pre>
- *
- * <p>Dojo files are loaded as required by the Dojo loading mechanism. The problem with this
- * approach is that the files are not cached by the browser, so reloading a page or navigating
- * to a different page that uses the same widgets will cause the files to be reloaded. To solve
- * this problem a custom Dojo profile is distributed with the Dojo plugin. This profile contains
- * the files required by the tags in the Dojo plugin, all in one file (524Kb), which is cached
- * by the browser. This file will take longer to load by the browser but it will be downloaded
- * only once. By default the "cache" attribute is set to false.</p>
- *
- * <p>Some tags like the "datetimepicker" can use different locales, to use a locale
- * that is different from the request locale, it must be specified on the "extraLocales"
- * attribute. This attribute can contain a comma separated list of locale names. From
- * Dojo's documentation:</p>
- *
- * <p>
- * The locale is a short string, defined by the host environment, which conforms to RFC 3066
- * (http://www.ietf.org/rfc/rfc3066.txt) used in the HTML specification.
- * It consists of short identifiers, typically two characters
- * long which are case-insensitive. Note that Dojo uses dash separators, not underscores like
- * Java (e.g. "en-us", not "en_US"). Typically country codes are used in the optional second
- * identifier, and additional variants may be specified. For example, Japanese is "ja";
- * Japanese in Japan is "ja-jp". Notice that the lower case is intentional -- while Dojo
- * will often convert all locales to lowercase to normalize them, it is the lowercase that
- * must be used when defining your resources.
- * </p>
- *
- * <p>The "locale" attribute configures Dojo's locale:</p>
- *
- * <p>"The locale Dojo uses on a page may be overridden by setting djConfig.locale. This may be
- * done to accomodate applications with a known user profile or server pages which do manual
- * assembly and assume a certain locale. You may also set djConfig.extraLocale to load
- * localizations in addition to your own, in case you want to specify a particular
- * translation or have multiple languages appear on your page."</p>
- *
- * <p>To improve loading time, the property "parseContent" is set to false by default. This property will
- * instruct Dojo to only build widgets using specific element ids. If the property is set to true
- * Dojo will scan the whole document looking for widgets.</p>
- *
- * <p>Dojo 0.4.3 is distributed with the Dojo plugin, to use a different Dojo version, the
- * "baseRelativePath" attribute can be set to the URL of the Dojo root folder on your application.
- * </p>
- * <!-- END SNIPPET: javadoc -->
- *
- * <p/> <b>Examples</b>
- *
- * <pre>
- * <!-- START SNIPPET: example1 -->
- * <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
- * <head>
- * <title>My page</title>
- * <sx:head/>
- * </head>
- * <!-- END SNIPPET: example1 -->
- * </pre>
- *
- * <pre>
- * <!-- START SNIPPET: example3 -->
- * <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
- * <head>
- * <title>My page</title>
- * <sx:head debug="true" extraLocales="en-us,nl-nl,de-de"/>
- * </head>
- * <!-- END SNIPPET: example3 -->
- * </pre>
- *
- */
-@StrutsTag(name="head", tldBodyContent="empty", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.HeadTag",
- description="Render a chunk of HEAD for your HTML file")
-@StrutsTagSkipInheritance
-public class Head extends org.apache.struts2.components.Head {
- public static final String TEMPLATE = "head";
- public static final String PARSE_CONTENT = "struts.dojo.head.parseContent";
-
- private String debug;
- private String compressed;
- private String baseRelativePath;
- private String extraLocales;
- private String locale;
- private String cache;
- private String parseContent;
-
- public Head(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
- super(stack, request, response);
- }
-
- protected String getDefaultTemplate() {
- return TEMPLATE;
- }
-
- public void evaluateParams() {
- super.evaluateParams();
-
- if (this.debug != null)
- addParameter("debug", findValue(this.debug, Boolean.class));
- if (this.compressed != null)
- addParameter("compressed", findValue(this.compressed, Boolean.class));
- if (this.baseRelativePath != null)
- addParameter("baseRelativePath", findString(this.baseRelativePath));
- if (this.extraLocales != null) {
- String locales = findString(this.extraLocales);
- addParameter("extraLocales", locales.split(","));
- }
- if (this.locale != null)
- addParameter("locale", findString(this.locale));
- if (this.cache != null)
- addParameter("cache", findValue(this.cache, Boolean.class));
- if (this.parseContent != null) {
- Boolean shouldParseContent = (Boolean) findValue(this.parseContent, Boolean.class);
- addParameter("parseContent", shouldParseContent);
- stack.getContext().put(PARSE_CONTENT, shouldParseContent);
- } else {
- addParameter("parseContent", false);
- stack.getContext().put(PARSE_CONTENT, false);
- }
- }
-
- @Override
- @StrutsTagSkipInheritance
- public void setTheme(String theme) {
- super.setTheme(theme);
- }
-
- @Override
- public String getTheme() {
- return "ajax";
- }
-
- public boolean isDebug() {
- return debug != null && Boolean.parseBoolean(debug);
- }
-
- @StrutsTagAttribute(description="Enable Dojo debug messages", defaultValue="false", type="Boolean")
- public void setDebug(String debug) {
- this.debug = debug;
- }
-
- @StrutsTagAttribute(description="Use compressed version of dojo.js", defaultValue="true", type="Boolean")
- public void setCompressed(String compressed) {
- this.compressed = compressed;
- }
-
- @StrutsTagAttribute(description="Context relative path of Dojo distribution folder", defaultValue="/struts/dojo")
- public void setBaseRelativePath(String baseRelativePath) {
- this.baseRelativePath = baseRelativePath;
- }
-
- @StrutsTagAttribute(description="Comma separated list of locale names to be loaded by Dojo, locale names must be specified as in RFC3066")
- public void setExtraLocales(String extraLocales) {
- this.extraLocales = extraLocales;
- }
-
- @StrutsTagAttribute(description="Default locale to be used by Dojo, locale name must be specified as in RFC3066")
- public void setLocale(String locale) {
- this.locale = locale;
- }
-
- @StrutsTagAttribute(description="Use Struts Dojo profile, which contains all Struts widgets in one file, making it possible to be chached by " +
- "the browser", defaultValue="true", type="Boolean")
- public void setCache(String cache) {
- this.cache = cache;
- }
-
- @StrutsTagAttribute(description="Parse the whole document for widgets", defaultValue="false", type="Boolean")
- public void setParseContent(String parseContent) {
- this.parseContent = parseContent;
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java
deleted file mode 100644
index a65afb2..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * $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.components;
-
-
-public interface RemoteBean {
-
- void setListenTopics(String topics);
-
- void setNotifyTopics(String topics);
-
- void setHref(String href);
-
- void setErrorText(String errorText);
-
- void setAfterNotifyTopics(String afterNotifyTopics);
-
- void setBeforeNotifyTopics(String beforeNotifyTopics);
-
- void setErrorNotifyTopics(String errorNotifyTopics);
-
- void setExecuteScripts(String executeScripts);
-
- void setLoadingText(String loadingText);
-
- void setHandler(String handler);
-
- void setFormFilter(String formFilter);
-
- void setFormId(String formId);
-
- void setShowErrorTransportText(String showError);
-
- void setShowLoadingText(String showLoadingText);
-
- void setIndicator(String indicator);
-
- void setName(String name);
-
- void setCssStyle(String style);
-
- void setCssClass(String cssClass);
-
- void setHighlightColor(String color);
-
- void setHighlightDuration(String color);
-
- void setSeparateScripts(String separateScripts);
-
- void setTransport(String transport);
-
- void setParseContent(String parseContent);
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java
deleted file mode 100644
index 815b070..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * $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.components;
-
-import java.io.Writer;
-import java.util.Random;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.Form;
-import org.apache.struts2.components.FormButton;
-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;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * Renders a submit button that can submit a form asynchronously.
- * The submit can have three different types of rendering:
- * <ul>
- * <li>input: renders as html <input type="submit"...></li>
- * <li>image: renders as html <input type="image"...></li>
- * <li>button: renders as html <button type="submit"...></li>
- * </ul>
- * Please note that the button type has advantages by adding the possibility to seperate the submitted value from the
- * text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0
- * <!-- END SNIPPET: javadoc -->
- *
- * <p>Examples</p>
- * <!-- START SNIPPET: example1 -->
- * <sx:submit value="%{'Submit'}" />
- * <!-- END SNIPPET: example1 -->
- *
- * <!-- START SNIPPET: example2 -->
- * <sx:submit type="image" value="%{'Submit'}" label="Submit the form" src="submit.gif"/>
- * <!-- END SNIPPET: example2 -->
-
- * <!-- START SNIPPET: example3 -->
- * <sx:submit type="button" value="%{'Submit'}" label="Submit the form"/>
- * <!-- END SNIPPET: example3 -->
- *
- * <!-- START SNIPPET: example4 -->
- * <div id="div1">Div 1</div>
- * <s:url id="ajaxTest" value="/AjaxTest.action"/>
- *
- * <sx:submit id="link1" href="%{ajaxTest}" target="div1" />
- * <!-- END SNIPPET: example4 -->
- *
- * <!-- START SNIPPET: example5 -->
- * <s:form id="form" action="AjaxTest">
- * <input type="textbox" name="data">
- * <sx:submit />
- * </s:form>
- * <!-- END SNIPPET: example5 -->
- *
- * <!-- START SNIPPET: example6 -->
- * <s:form id="form" action="AjaxTest">
- * <input type="textbox" name="data">
- * </s:form>
- *
- * <sx:submit formId="form" />
- * <!-- END SNIPPET: example6 -->
- *
- * <!-- START SNIPPET: example7 -->
- * <script type="text/javascript">
- * dojo.event.topic.subscribe("/before", function(event, widget){
- * alert('inside a topic event. before request');
- * //event: set event.cancel = true, to cancel request
- * //widget: widget that published the topic
- * });
- * </script>
- *
- * <sx:submit beforeNotifyTopics="/before" />
- * <!-- END SNIPPET: example7 -->
- *
- * <!-- START SNIPPET: example8 -->
- * <script type="text/javascript">
- * dojo.event.topic.subscribe("/after", function(data, request, widget){
- * alert('inside a topic event. after request');
- * //data : text returned from request(the html)
- * //request: XMLHttpRequest object
- * //widget: widget that published the topic
- * });
- * </script>
- *
- * <sx:submit afterNotifyTopics="/after" highlightColor="red" href="%{#ajaxTest}" />
- * <!-- END SNIPPET: example8 -->
- *
- * <!-- START SNIPPET: example9 -->
- * <script type="text/javascript">
- * dojo.event.topic.subscribe("/error", function(error, request, widget){
- * alert('inside a topic event. on error');
- * //error : error object (error.message has the error message)
- * //request: XMLHttpRequest object
- * //widget: widget that published the topic
- * });
- * </script>
- *
- * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/>
- * <sx:submit errorNotifyTopics="/error" indicator="ind1" href="%{#ajaxTest}" />
- * <!-- END SNIPPET: example9 -->
- */
-@StrutsTag(name="submit", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.SubmitTag", description="Render a submit button")
-public class Submit extends FormButton implements RemoteBean {
-
- private static final Logger LOG = LoggerFactory.getLogger(Submit.class);
- private final static transient Random RANDOM = new Random();
-
- final public static String OPEN_TEMPLATE = "submit";
- final public static String TEMPLATE = "submit-close";
-
- protected String href;
- protected String errorText;
- protected String executeScripts;
- protected String loadingText;
- protected String listenTopics;
- protected String handler;
- protected String formId;
- protected String formFilter;
- protected String src;
- protected String notifyTopics;
- protected String showErrorTransportText;
- protected String indicator;
- protected String showLoadingText;
- protected String targets;
- protected String beforeNotifyTopics;
- protected String afterNotifyTopics;
- protected String errorNotifyTopics;
- protected String highlightColor;
- protected String highlightDuration;
- protected String validate;
- protected String ajaxAfterValidation;
- protected String separateScripts;
- protected String transport;
- protected String parseContent;
-
- public Submit(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
- super(stack, request, response);
- }
-
- protected String getDefaultTemplate() {
- return TEMPLATE;
- }
-
- @Override
- public String getDefaultOpenTemplate() {
- return OPEN_TEMPLATE;
- }
-
- public void evaluateParams() {
- if ((key == null) && (value == null)) {
- value = "Submit";
- }
-
- if (((key != null)) && (value == null)) {
- this.value = "%{getText('"+key +"')}";
- }
-
- super.evaluateParams();
- }
-
- public void evaluateExtraParams() {
- super.evaluateExtraParams();
-
- if (href != null)
- addParameter("href", findString(href));
- if (errorText != null)
- addParameter("errorText", findString(errorText));
- if (loadingText != null)
- addParameter("loadingText", findString(loadingText));
- if (executeScripts != null)
- addParameter("executeScripts", findValue(executeScripts, Boolean.class));
- if (listenTopics != null)
- addParameter("listenTopics", findString(listenTopics));
- if (notifyTopics != null)
- addParameter("notifyTopics", findString(notifyTopics));
- if (handler != null)
- addParameter("handler", findString(handler));
- if (formId != null)
- addParameter("formId", findString(formId));
- if (formFilter != null)
- addParameter("formFilter", findString(formFilter));
- if (src != null)
- addParameter("src", findString(src));
- if (indicator != null)
- addParameter("indicator", findString(indicator));
- if (targets != null)
- addParameter("targets", findString(targets));
- if (showLoadingText != null)
- addParameter("showLoadingText", findString(showLoadingText));
- if (showLoadingText != null)
- addParameter("showLoadingText", findString(showLoadingText));
- if (beforeNotifyTopics != null)
- addParameter("beforeNotifyTopics", findString(beforeNotifyTopics));
- if (afterNotifyTopics != null)
- addParameter("afterNotifyTopics", findString(afterNotifyTopics));
- if (errorNotifyTopics != null)
- addParameter("errorNotifyTopics", findString(errorNotifyTopics));
- if (highlightColor != null)
- addParameter("highlightColor", findString(highlightColor));
- if (highlightDuration != null)
- addParameter("highlightDuration", findString(highlightDuration));
- if (separateScripts != null)
- addParameter("separateScripts", findValue(separateScripts, Boolean.class));
- if (transport != null)
- addParameter("transport", findString(transport));
- if (parseContent != null)
- addParameter("parseContent", findValue(parseContent, Boolean.class));
-
- Boolean validateValue = false;
- if (validate != null) {
- validateValue = (Boolean) findValue(validate, Boolean.class);
- addParameter("validate", validateValue);
- }
-
- Form form = (Form) findAncestor(Form.class);
- if (form != null)
- addParameter("parentTheme", form.getTheme());
-
- if (ajaxAfterValidation != null)
- addParameter("ajaxAfterValidation", findValue(ajaxAfterValidation, Boolean.class));
-
- // generate a random ID if not explicitly set and not parsing the content
- Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
- boolean generateId = (parseContent != null ? !parseContent : true);
-
- addParameter("pushId", generateId);
- if ((this.id == null || this.id.length() == 0) && generateId) {
- // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
- // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT
- int nextInt = RANDOM.nextInt();
- nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);
- this.id = "widget_" + String.valueOf(nextInt);
- addParameter("id", this.id);
- }
- }
-
- @Override
- @StrutsTagSkipInheritance
- public void setTheme(String theme) {
- super.setTheme(theme);
- }
-
- @Override
- public String getTheme() {
- return "ajax";
- }
-
- /**
- * Indicate whether the concrete button supports the type "image".
- *
- * @return <tt>true</tt> to indicate type image is supported.
- */
- protected boolean supportsImageType() {
- return true;
- }
-
- /**
- * Overrides to be able to render body in a template rather than always before the template
- */
- public boolean end(Writer writer, String body) {
- evaluateParams();
- try {
- addParameter("body", body);
-
- mergeTemplate(writer, buildTemplateName(template, getDefaultTemplate()));
- } catch (Exception e) {
- LOG.error("error when rendering", e);
- }
- finally {
- popComponentStack();
- }
-
- return false;
- }
-
- @StrutsTagAttribute(description="Topic that will trigger the remote call")
- public void setListenTopics(String listenTopics) {
- this.listenTopics = listenTopics;
- }
-
- @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.")
- public void setHref(String href) {
- this.href = href;
- }
-
- @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content")
- public void setErrorText(String errorText) {
- this.errorText = errorText;
- }
-
- @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false")
- public void setExecuteScripts(String executeScripts) {
- this.executeScripts = executeScripts;
- }
-
- @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...")
- public void setLoadingText(String loadingText) {
- this.loadingText = loadingText;
- }
-
- @StrutsTagAttribute(description="Javascript function name that will make the request")
- public void setHandler(String handler) {
- this.handler = handler;
- }
-
- @StrutsTagAttribute(description="Function name used to filter the fields of the form.")
- public void setFormFilter(String formFilter) {
- this.formFilter = formFilter;
- }
-
- @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters")
- public void setFormId(String formId) {
- this.formId = formId;
- }
-
- @StrutsTagAttribute(description="Supply an image src for <i>image</i> type submit button. Will have no effect for types <i>input</i> and <i>button</i>.")
- public void setSrc(String src) {
- this.src = src;
- }
-
- @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated")
- public void setTargets(String targets) {
- this.targets = targets;
- }
-
- @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors")
- public void setNotifyTopics(String notifyTopics) {
- this.notifyTopics = notifyTopics;
- }
-
- @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true")
- public void setShowErrorTransportText(String showErrorTransportText) {
- this.showErrorTransportText = showErrorTransportText;
- }
-
- @StrutsTagAttribute(description="Set indicator")
- public void setIndicator(String indicator) {
- this.indicator = indicator;
- }
-
- @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false")
- public void setShowLoadingText(String showLoadingText) {
- this.showLoadingText = showLoadingText;
- }
-
- @StrutsTagAttribute(description="The css class to use for element")
- public void setCssClass(String cssClass) {
- super.setCssClass(cssClass);
- }
-
- @StrutsTagAttribute(description="The css style to use for element")
- public void setCssStyle(String cssStyle) {
- super.setCssStyle(cssStyle);
- }
-
- @StrutsTagAttribute(description="The id to use for the element")
- public void setId(String id) {
- super.setId(id);
- }
-
- @StrutsTagAttribute(description="The name to set for element")
- public void setName(String name) {
- super.setName(name);
- }
-
- @StrutsTagAttribute(description="The type of submit to use. Valid values are <i>input</i>, " +
- "<i>button</i> and <i>image</i>.", defaultValue="input")
- public void setType(String type) {
- super.setType(type);
- }
-
- @StrutsTagAttribute(description="Preset the value of input element.")
- public void setValue(String value) {
- super.setValue(value);
- }
-
- @StrutsTagAttribute(description="Label expression used for rendering a element specific label")
- public void setLabel(String label) {
- super.setLabel(label);
- }
-
- @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)")
- public void setAfterNotifyTopics(String afterNotifyTopics) {
- this.afterNotifyTopics = afterNotifyTopics;
- }
-
- @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request")
- public void setBeforeNotifyTopics(String beforeNotifyTopics) {
- this.beforeNotifyTopics = beforeNotifyTopics;
- }
-
- @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)")
- public void setErrorNotifyTopics(String errorNotifyTopics) {
- this.errorNotifyTopics = errorNotifyTopics;
- }
-
- @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute",
- defaultValue = "none")
- public void setHighlightColor(String highlightColor) {
- this.highlightColor = highlightColor;
- }
-
- @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set",
- defaultValue = "1000")
- public void setHighlightDuration(String highlightDuration) {
- this.highlightDuration = highlightDuration;
- }
-
- @StrutsTagAttribute(description = "Perform Ajax validation. 'ajaxValidation' interceptor must be applied to action", type="Boolean",
- defaultValue = "false")
- public void setValidate(String validate) {
- this.validate = validate;
- }
-
- @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'", type="Boolean",
- defaultValue = "false")
- public void setAjaxAfterValidation(String ajaxAfterValidation) {
- this.ajaxAfterValidation = ajaxAfterValidation;
- }
-
- @StrutsTagSkipInheritance
- public void setAction(String action) {
- super.setAction(action);
- }
-
- @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true")
- public void setSeparateScripts(String separateScripts) {
- this.separateScripts = separateScripts;
- }
-
- @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport")
- public void setTransport(String transport) {
- this.transport = transport;
- }
-
- @StrutsTagAttribute(description="Parse returned HTML for Dojo widgets", defaultValue="true", type="Boolean")
- public void setParseContent(String parseContent) {
- this.parseContent = parseContent;
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java
deleted file mode 100644
index c16cb6a..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * $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.components;
-
-import com.opensymphony.xwork2.util.ValueStack;
-import org.apache.struts2.components.ClosingUIBean;
-import org.apache.struts2.views.annotations.StrutsTag;
-import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Random;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote
- * content (refreshed each time the user selects that tab).</p>
- * If the useSelectedTabCookie attribute is set to true, the id of the selected tab is saved in a cookie on activation.
- * When coming back to this view, the cookie is read and the tab will be activated again, unless an actual value for the
- * selectedTab attribute is specified.</p>
- * If you want to use the cookie feature, please be sure that you provide a unique id for your tabbedpanel component,
- * since this will also be the identifying name component of the stored cookie.</p>
- * <!-- END SNIPPET: javadoc -->
- *
- * <p/> <b>Examples</b>
- * <p/>
- *
- * <!-- START SNIPPET: example1 -->
- * <sx:head />
- * <sx:tabbedpanel id="test" >
- * <sx:div id="one" label="one" theme="ajax" labelposition="top" >
- * This is the first pane<br/>
- * <s:form>
- * <s:textfield name="tt" label="Test Text"/> <br/>
- * <s:textfield name="tt2" label="Test Text2"/>
- * </s:form>
- * </sx:div>
- * <sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
- * This is the remote tab
- * </sx:div>
- * </sx:tabbedpanel>
- * <!-- END SNIPPET: example1 -->
- *
- * <!-- START SNIPPET: example2 -->
- * <sx:head />
- * <script type="text/javascript">
- * dojo.event.topic.subscribe("/beforeSelect", function(event, tab, tabContainer){
- * event.cancel = true;
- * });
- * </script>
- *
- * <sx:tabbedpanel id="test" beforeSelectTabNotifyTopics="/beforeSelect">
- * <sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
- * One Tab
- * </sx:div>
- * <sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
- * Another tab
- * </sx:div>
- * </sx:tabbedpanel>
- * <!-- END SNIPPET: example2 -->
- */
-@StrutsTag(name="tabbedpanel", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.")
-public class TabbedPanel extends ClosingUIBean {
- public static final String TEMPLATE = "tabbedpanel";
- public static final String TEMPLATE_CLOSE = "tabbedpanel-close";
- final private static String COMPONENT_NAME = TabbedPanel.class.getName();
- private final static transient Random RANDOM = new Random();
-
- protected String selectedTab;
- protected String closeButton;
- protected String doLayout ;
- protected String templateCssPath;
- protected String beforeSelectTabNotifyTopics;
- protected String afterSelectTabNotifyTopics;
- protected String disabledTabCssClass;
- protected String useSelectedTabCookie;
-
- public TabbedPanel(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
- super(stack, request, response);
- }
-
-
- protected void evaluateExtraParams() {
- super.evaluateExtraParams();
-
- if (selectedTab != null)
- addParameter("selectedTab", findString(selectedTab));
- if (closeButton != null)
- addParameter("closeButton", findString(closeButton));
- addParameter("doLayout", doLayout != null ? findValue(doLayout, Boolean.class) : Boolean.FALSE);
- if (labelPosition != null) {
- //dojo has some weird name for label positions
- if(labelPosition.equalsIgnoreCase("left"))
- labelPosition = "left-h";
- if(labelPosition.equalsIgnoreCase("right"))
- labelPosition = "right-h";
- addParameter("labelPosition", null);
- addParameter("labelPosition", labelPosition);
- }
- if (templateCssPath != null)
- addParameter("templateCssPath", findString(templateCssPath));
- if (beforeSelectTabNotifyTopics!= null)
- addParameter("beforeSelectTabNotifyTopics", findString(beforeSelectTabNotifyTopics));
- if (afterSelectTabNotifyTopics!= null)
- addParameter("afterSelectTabNotifyTopics", findString(afterSelectTabNotifyTopics));
- if (disabledTabCssClass!= null)
- addParameter("disabledTabCssClass", findString(disabledTabCssClass));
- if(useSelectedTabCookie != null) {
- addParameter("useSelectedTabCookie", findString(useSelectedTabCookie));
- }
-
- // generate a random ID if not explicitly set and not parsing the content
- Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
- boolean generateId = (parseContent != null ? !parseContent : true);
-
- addParameter("pushId", generateId);
- if ((this.id == null || this.id.length() == 0) && generateId) {
- // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
- // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT
- int nextInt = RANDOM.nextInt();
- nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);
- this.id = "widget_" + String.valueOf(nextInt);
- addParameter("id", this.id);
- }
- }
-
- @Override
- @StrutsTagSkipInheritance
- public void setTheme(String theme) {
- super.setTheme(theme);
- }
-
- @Override
- public String getTheme() {
- return "ajax";
- }
-
- public String getDefaultOpenTemplate() {
- return TEMPLATE;
- }
-
- protected String getDefaultTemplate() {
- return TEMPLATE_CLOSE;
- }
-
- public String getComponentName() {
- return COMPONENT_NAME;
- }
-
- @StrutsTagAttribute(description="The id to assign to the component.", required=true)
- public void setId(String id) {
- // This is required to override tld generation attributes to required=true
- super.setId(id);
- }
-
-
- @StrutsTagAttribute(description=" The id of the tab that will be selected by default")
- public void setSelectedTab(String selectedTab) {
- this.selectedTab = selectedTab;
- }
-
- @StrutsTagAttribute(description="Deprecated. Use 'closable' on each div(tab)")
- public void setCloseButton(String closeButton) {
- this.closeButton = closeButton;
- }
-
- @StrutsTagAttribute(description="If doLayout is false, the tab container's height equals the height of the currently selected tab", type="Boolean", defaultValue="false")
- public void setDoLayout(String doLayout) {
- this.doLayout = doLayout;
- }
-
- @StrutsTagAttribute(description="Template css path")
- public void setTemplateCssPath(String templateCssPath) {
- this.templateCssPath = templateCssPath;
- }
-
-
- @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (before it is selected)" +
- "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget." +
- "The event can be cancelled setting to 'true' the 'cancel' property " +
- "of the third parameter passed to the topics.")
- public void setBeforeSelectTabNotifyTopics(String selectedTabNotifyTopics) {
- this.beforeSelectTabNotifyTopics = selectedTabNotifyTopics;
- }
-
- @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (after it is selected)." +
- "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.")
- public void setAfterSelectTabNotifyTopics(String afterSelectTabNotifyTopics) {
- this.afterSelectTabNotifyTopics = afterSelectTabNotifyTopics;
- }
-
- @StrutsTagAttribute(description="Css class to be applied to the tab button of disabled tabs", defaultValue="strutsDisabledTab")
- public void setDisabledTabCssClass(String disabledTabCssClass) {
- this.disabledTabCssClass = disabledTabCssClass;
- }
-
- @StrutsTagAttribute(required = false, defaultValue = "false", description = "If set to true, the id of the last selected " +
- "tab will be stored in cookie. If the view is rendered, it will be tried to read this cookie and activate " +
- "the corresponding tab on success, unless overridden by the selectedTab attribute. The cookie name is \"Struts2TabbedPanel_selectedTab_\"+id.")
- public void setUseSelectedTabCookie( String useSelectedTabCookie ) {
- this.useSelectedTabCookie = useSelectedTabCookie;
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java
deleted file mode 100644
index c61dd70..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * $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.components;
-
-import java.util.Random;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.views.annotations.StrutsTag;
-
-import com.opensymphony.xwork2.util.ValueStack;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * Render Dojo Editor2 widget
- * <!-- END SNIPPET: javadoc -->
- *
- */
-@StrutsTag(name="textarea", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TextareaTag", description="Renders Dojo Editor2 widget")
-public class TextArea extends org.apache.struts2.components.TextArea {
- private final static transient Random RANDOM = new Random();
-
- public TextArea(ValueStack stack, HttpServletRequest request,
- HttpServletResponse response) {
- super(stack, request, response);
- }
-
- public void evaluateExtraParams() {
- super.evaluateExtraParams();
-
- // generate a random ID if not explicitly set and not parsing the content
- Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
- boolean generateId = (parseContent != null ? !parseContent : true);
-
- addParameter("pushId", generateId);
- if ((this.id == null || this.id.length() == 0) && generateId) {
- // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
- // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT
- int nextInt = RANDOM.nextInt();
- nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);
- this.id = "widget_" + String.valueOf(nextInt);
- addParameter("id", this.id);
- }
- }
-
- @Override
- public String getTheme() {
- return "ajax";
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java
deleted file mode 100644
index 123a5c0..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java
+++ /dev/null
@@ -1,551 +0,0 @@
-/*
- * $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.components;
-
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.ClosingUIBean;
-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(recommended), such that it could be looked up using
- * javascript if necessary. The "id" attribute is required if the "selectedNotifyTopic" or the
- * "href" attributes are going to be used.<p/>
- *
- * <!-- END SNIPPET: javadoc -->
- *
- * <!-- START SNIPPET: example1 -->
- * <s:tree id="..." label="...">
- * <s:treenode id="..." label="..." />
- * <s:treenode id="..." label="...">
- * <s:treenode id="..." label="..." />
- * <s:treenode id="..." label="..." />
- * </s:treenode>
- * <s:treenode id="..." label="..." />
- * </s:tree>
- * <!-- END SNIPPET: example1 -->
- *
- * <!-- START SNIPPET: example2 -->
- * <s:tree
- * id="..."
- * rootNode="..."
- * nodeIdProperty="..."
- * nodeTitleProperty="..."
- * childCollectionProperty="..." />
- * <!-- END SNIPPET: example2 -->
- *
- * <!-- START SNIPPET: example3 -->
- * <s:url id="nodesUrl" namespace="/nodecorate" action="getNodes" />
- * <div style="float:left; margin-right: 50px;">
- * <sx:tree id="tree" href="%{#nodesUrl}" />
- * </div>
- *
- * On this example the url specified on the "href" attibute will be called to load
- * the elements on the root. The response is expected to be a JSON array of objects like:
- * [
- * {
- * label: "Node 1",
- * hasChildren: false,
- * id: "Node1"
- * },
- * {
- * label: "Node 2",
- * hasChildren: true,
- * id: "Node2"
- * },
- * ]
- *
- * "label" is the text that will be displayed for the node. "hasChildren" marks the node has
- * having children or not (if true, a plus icon will be assigned to the node so it can be
- * expanded). The "id" attribute will be used to load the children of the node, when the node
- * is expanded. When a node is expanded a request will be made to the url in the "href" attribute
- * and the node's "id" will be passed in the parameter "nodeId".
- *
- * The children collection for a node will be loaded only once, to reload the children of a
- * node, use the "reload()" function of the treenode widget. To reload the children nodes of "Node1"
- * from the example above use the following javascript:
- *
- * dojo.widget.byId("Node1").reload();
- * <!-- END SNIPPET: example3 -->
- */
-@StrutsTag(name="tree", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeTag", description="Render a tree widget.")
-public class Tree extends ClosingUIBean {
-
- private static final String TEMPLATE = "tree-close";
- private static final String OPEN_TEMPLATE = "tree";
- private final static transient Random RANDOM = new Random();
-
- protected String toggle;
- protected String selectedNotifyTopics;
- protected String expandedNotifyTopics;
- protected String collapsedNotifyTopics;
- protected String rootNodeAttr;
- protected String childCollectionProperty;
- protected String nodeTitleProperty;
- protected String nodeIdProperty;
- protected String showRootGrid;
-
- protected String showGrid;
- protected String blankIconSrc;
- protected String gridIconSrcL;
- protected String gridIconSrcV;
- protected String gridIconSrcP;
- protected String gridIconSrcC;
- protected String gridIconSrcX;
- protected String gridIconSrcY;
- protected String expandIconSrcPlus;
- protected String expandIconSrcMinus;
- protected String iconWidth;
- protected String iconHeight;
- protected String toggleDuration;
- protected String templateCssPath;
- protected String href;
- protected String errorNotifyTopics;
-
- private List<String> childrenIds;
-
- 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 && (href == null)) {
- if ((rootNodeAttr == null)
- || (childCollectionProperty == null)
- || (nodeTitleProperty == null)
- || (nodeIdProperty == null)) {
- fieldError("label","The TreeTag requires either a value for 'label' or 'href' or ALL of 'rootNode', " +
- "'childCollectionProperty', 'nodeTitleProperty', and 'nodeIdProperty'", null);
- }
- }
- return result;
- }
-
- protected void evaluateExtraParams() {
- super.evaluateExtraParams();
-
- if (toggle != null) {
- addParameter("toggle", findString(toggle));
- } else {
- addParameter("toggle", "fade");
- }
-
- if (selectedNotifyTopics != null) {
- addParameter("selectedNotifyTopics", findString(selectedNotifyTopics));
- }
-
- if (expandedNotifyTopics != null) {
- addParameter("expandedNotifyTopics", findString(expandedNotifyTopics));
- }
-
- if (collapsedNotifyTopics != null) {
- addParameter("collapsedNotifyTopics", findString(collapsedNotifyTopics));
- }
-
- 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));
- }
- if (href != null)
- addParameter("href", findString(href));
- if (errorNotifyTopics != null)
- addParameter("errorNotifyTopics", findString(errorNotifyTopics));
-
- // generate a random ID if not explicitly set and not parsing the content
- Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
- boolean generateId = (parseContent != null ? !parseContent : true);
-
- addParameter("pushId", generateId);
- if ((this.id == null || this.id.length() == 0) && generateId) {
- // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
- // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT
- int nextInt = RANDOM.nextInt();
- nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);
- this.id = "widget_" + String.valueOf(nextInt);
- addParameter("id", this.id);
- }
-
- if (this.childrenIds != null)
- addParameter("childrenIds", this.childrenIds);
- }
-
- public void addChildrenId(String id) {
- if (this.childrenIds == null)
- this.childrenIds = new ArrayList<String>();
- this.childrenIds.add(id);
- }
-
- @Override
- @StrutsTagSkipInheritance
- public void setTheme(String theme) {
- super.setTheme(theme);
- }
-
- @Override
- public String getTheme() {
- return "ajax";
- }
-
- 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;
- }
-
- @StrutsTagAttribute(description="Deprecated. Use 'selectedNotifyTopics' instead.")
- public void setTreeSelectedTopic(String selectedNotifyTopic) {
- this.selectedNotifyTopics = selectedNotifyTopic;
- }
-
- @StrutsTagAttribute(description="Deprecated. Use 'expandedNotifyTopics' instead.")
- public void setTreeExpandedTopics(String expandedNotifyTopic) {
- this.expandedNotifyTopics = expandedNotifyTopic;
- }
-
- @StrutsTagAttribute(description="Deprecated. Use 'collapsedNotifyTopics' instead.")
- public void setTreeCollapsedTopics(String collapsedNotifyTopic) {
- this.collapsedNotifyTopics = collapsedNotifyTopic;
- }
-
- 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;
- }
-
- @StrutsTagAttribute(description="The css class to use for element")
- public void setCssClass(String cssClass) {
- super.setCssClass(cssClass);
- }
-
- @StrutsTagAttribute(description="The css style to use for element")
- public void setCssStyle(String cssStyle) {
- super.setCssStyle(cssStyle);
- }
-
- @StrutsTagAttribute(description="The id to use for the element")
- public void setId(String id) {
- super.setId(id);
- }
-
- @StrutsTagAttribute(description="The name to set for element")
- public void setName(String name) {
- super.setName(name);
- }
-
- @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" +
- " is collapsed. An object with a 'node' property will be passed as parameter to the topics.")
- public void setCollapsedNotifyTopics(String collapsedNotifyTopics) {
- this.collapsedNotifyTopics = collapsedNotifyTopics;
- }
-
- @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" +
- " is expanded. An object with a 'node' property will be passed as parameter to the topics.")
- public void setExpandedNotifyTopics(String expandedNotifyTopics) {
- this.expandedNotifyTopics= expandedNotifyTopics;
- }
-
- @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" +
- " is selected. An object with a 'node' property will be passed as parameter to the topics.")
- public void setSelectedNotifyTopics(String selectedNotifyTopics) {
- this.selectedNotifyTopics = selectedNotifyTopics;
- }
-
- @StrutsTagAttribute(description="Url used to load the list of children nodes for an specific node, whose id will be " +
- "passed as a parameter named 'nodeId' (empty for root)")
- public void setHref(String href) {
- this.href = href;
- }
-
- @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)." +
- "Only valid if 'href' is set")
- public void setErrorNotifyTopics(String errorNotifyTopics) {
- this.errorNotifyTopics = errorNotifyTopics;
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java
deleted file mode 100644
index e652769..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * $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.components;
-
-import java.util.Random;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.ClosingUIBean;
-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 constructed 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 -->
- *
- * <-- Creating tree statically using hard-coded data. -->
- * <s:tree id="..." label="...">
- * <s:treenode id="..." label="..." />
- * <s:treenode id="..." label="...">
- * <s:treenode id="..." label="..." />
- * <s:treenode id="..." label="..." />
- * </s:treenode>
- * <s:treenode id="..." label="..." />
- * </s:tree>
- *
- * <-- Creating tree dynamically using data from backing action. -->
- * <s:tree
- * id="..."
- * rootNode="..."
- * nodeIdProperty="..."
- * nodeTitleProperty="..."
- * childCollectionProperty="..." />
- *
- * <!-- END SNIPPET: example -->
- * </pre>
- *
- */
-@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.")
-public class TreeNode extends ClosingUIBean {
- private static final String TEMPLATE = "treenode-close";
- private static final String OPEN_TEMPLATE = "treenode";
- private final static transient Random RANDOM = new Random();
-
- public TreeNode(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
- super(stack, request, response);
- }
-
- @Override
- @StrutsTagSkipInheritance
- public void setTheme(String theme) {
- super.setTheme(theme);
- }
-
- @Override
- public String getTheme() {
- return "ajax";
- }
-
- public String getDefaultOpenTemplate() {
- return OPEN_TEMPLATE;
- }
-
- protected String getDefaultTemplate() {
- return TEMPLATE;
- }
-
- protected void evaluateExtraParams() {
- super.evaluateExtraParams();
-
- // generate a random ID if not explicitly set and not parsing the content
- Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT);
- boolean generateId = (parseContent != null ? !parseContent : true);
-
- addParameter("pushId", generateId);
- if ((this.id == null || this.id.length() == 0) && generateId) {
- // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
- // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT
- int nextInt = RANDOM.nextInt();
- nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);
- this.id = "widget_" + String.valueOf(nextInt);
- addParameter("id", this.id);
- }
-
- Tree parentTree = (Tree) findAncestor(Tree.class);
- parentTree.addChildrenId(this.id);
- }
-
- @StrutsTagAttribute(description="Label expression used for rendering tree node label.", required=true)
- public void setLabel(String label) {
- super.setLabel(label);
- }
-
- @StrutsTagAttribute(description="The css class to use for element")
- public void setCssClass(String cssClass) {
- super.setCssClass(cssClass);
- }
-
- @StrutsTagAttribute(description="The css style to use for element")
- public void setCssStyle(String cssStyle) {
- super.setCssStyle(cssStyle);
- }
-
- @StrutsTagAttribute(description="The id to use for the element")
- public void setId(String id) {
- super.setId(id);
- }
-
- @StrutsTagAttribute(description="The name to set for element")
- public void setName(String name) {
- super.setName(name);
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java
deleted file mode 100644
index a8439bf..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * $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;
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.dojo.views.freemarker.tags.DojoModels;
-import org.apache.struts2.dojo.views.velocity.components.AnchorDirective;
-import org.apache.struts2.dojo.views.velocity.components.AutocompleterDirective;
-import org.apache.struts2.dojo.views.velocity.components.BindDirective;
-import org.apache.struts2.dojo.views.velocity.components.DateTimePickerDirective;
-import org.apache.struts2.dojo.views.velocity.components.DivDirective;
-import org.apache.struts2.dojo.views.velocity.components.HeadDirective;
-import org.apache.struts2.dojo.views.velocity.components.SubmitDirective;
-import org.apache.struts2.dojo.views.velocity.components.TabbedPanelDirective;
-import org.apache.struts2.dojo.views.velocity.components.TextAreaDirective;
-import org.apache.struts2.dojo.views.velocity.components.TreeDirective;
-import org.apache.struts2.dojo.views.velocity.components.TreeNodeDirective;
-import org.apache.struts2.views.TagLibraryDirectiveProvider;
-
-import com.opensymphony.xwork2.util.ValueStack;
-import org.apache.struts2.views.TagLibraryModelProvider;
-
-public class DojoTagLibrary implements TagLibraryDirectiveProvider, TagLibraryModelProvider {
-
- public Object getModels(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
-
- return new DojoModels(stack, req, res);
- }
-
- public List<Class> getDirectiveClasses() {
- Class[] directives = new Class[] {
- DateTimePickerDirective.class,
- DivDirective.class,
- AutocompleterDirective.class,
- AnchorDirective.class,
- SubmitDirective.class,
- TabbedPanelDirective.class,
- TreeDirective.class,
- TreeNodeDirective.class,
- HeadDirective.class,
- BindDirective.class,
- TextAreaDirective.class
- };
- return Arrays.asList(directives);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java
deleted file mode 100644
index 42dd5fb..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * $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.freemarker.tags;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.Component;
-import org.apache.struts2.dojo.components.Anchor;
-import org.apache.struts2.views.freemarker.tags.TagModel;
-
-import com.opensymphony.xwork2.util.ValueStack;
-
-/**
- * @see Anchor
- */
-public class AnchorModel extends TagModel {
-
- public AnchorModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- super(stack, req, res);
- }
-
- @Override
- protected Component getBean() {
- return new Anchor(stack, req, res);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java
deleted file mode 100644
index 69783d4..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $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.freemarker.tags;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.Component;
-import org.apache.struts2.dojo.components.Autocompleter;
-import org.apache.struts2.views.freemarker.tags.TagModel;
-
-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);
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java
deleted file mode 100644
index 9805b6f..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * $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.freemarker.tags;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.Component;
-import org.apache.struts2.dojo.components.Bind;
-import org.apache.struts2.views.freemarker.tags.TagModel;
-
-import com.opensymphony.xwork2.util.ValueStack;
-
-/**
- * @see Bind
- */
-public class BindModel extends TagModel {
- public BindModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- super(stack, req, res);
- }
-
- protected Component getBean() {
- return new Bind(stack, req, res);
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java
deleted file mode 100644
index 0e74885..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $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.freemarker.tags;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.Component;
-import org.apache.struts2.dojo.components.DateTimePicker;
-import org.apache.struts2.views.freemarker.tags.TextFieldModel;
-
-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);
- }
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java
deleted file mode 100644
index 0d7d8af..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $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.freemarker.tags;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.Component;
-import org.apache.struts2.dojo.components.Div;
-import org.apache.struts2.views.freemarker.tags.TagModel;
-
-import com.opensymphony.xwork2.util.ValueStack;
-
-
-/**
- * @see Div
- */
-public class DivModel extends TagModel {
-
- public DivModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- super(stack, req, res);
- }
-
- @Override
- protected Component getBean() {
- return new Div(stack, req, res);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/17d73d21/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java
----------------------------------------------------------------------
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java
deleted file mode 100644
index c094662..0000000
--- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * $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.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 autocompleter;
- protected DivModel div;
- protected AnchorModel a;
- protected SubmitModel submit;
- protected BindModel bind;
- protected HeadModel head;
- protected TextAreaModel textarea;
-
- 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 BindModel getBind() {
- if (bind == null) {
- bind = new BindModel(stack, req, res);
- }
-
- return bind;
- }
-
- public TextAreaModel getTextarea() {
- if (textarea == null) {
- textarea = new TextAreaModel(stack, req, res);
- }
-
- return textarea;
- }
-
- public HeadModel getHead() {
- if (head == null) {
- head = new HeadModel(stack, req, res);
- }
-
- return head;
- }
-
- public DateTimePickerModel getDatetimepicker() {
- if (dateTimePicker == null) {
- dateTimePicker = new DateTimePickerModel(stack, req, res);
- }
-
- return dateTimePicker;
- }
-
- public AutocompleterModel getAutocompleter() {
- if (autocompleter == null) {
- autocompleter = new AutocompleterModel(stack, req, res);
- }
-
- return autocompleter;
- }
-
- public TabbedPanelModel getTabbedpanel() {
- 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;
- }
-}