+ * 'resultDivId' Deprecated. Use targets.
+ * 'targets' is a list of element ids whose content will be updated with the
+ * text returned from request.
+ * 'errorText' is the text that will be displayed when there is an error making the request.
+ * 'onLoadJS' Deprecated. Use 'notifyTopics'.
+ * 'preInvokeJS' Deprecated. Use 'notifyTopics'.
+ * 'executeScripts' if set to true will execute javascript sections in the returned text.
+ * 'loadingText' is the text that will be displayed on the 'targets' elements while making the
+ * request.
+ * 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
+ * and dom node are passed as parameters).
+ * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
+ * in the request.
+ * 'formFilter' is the name of a function which will be used to filter the fields that will be
+ * seralized. This function takes as a parameter the element and returns true if the element
+ * should be included.
+ * 'listenTopics' comma separated list of topics names, that will trigger a request
+ * 'indicator' element to be shown while the request executing
+ * 'showErrorTransportText': whether errors should be displayed (on 'targets')
+ * 'showLoadingText' show loading text on targets
+ * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:
+ *
+ *
data: html or json object when type='load' or type='error'
+ *
type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails
+ *
request: request javascript object, when type='load' or type='error'
+ *
+ */
+@StrutsTag(name="a", tldTagClass="org.apache.struts2.views.jsp.ui.AnchorTag", description="Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets")
+public class Anchor extends AbstractRemoteCallUIBean {
+ public static final String OPEN_TEMPLATE = "a";
+ public static final String TEMPLATE = "a-close";
+ public static final String COMPONENT_NAME = Anchor.class.getName();
+
+ protected String targets;
+
+ public Anchor(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+ super(stack, request, response);
+ }
+
+ public String getDefaultOpenTemplate() {
+ return OPEN_TEMPLATE;
+ }
+
+ protected String getDefaultTemplate() {
+ return TEMPLATE;
+ }
+
+ public void evaluateExtraParams() {
+ super.evaluateExtraParams();
+
+ if(targets != null)
+ addParameter("targets", findString(targets));
+ }
+
+ @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated")
+ public void setTargets(String targets) {
+ this.targets = targets;
+ }
+
+ @StrutsTagAttribute(name="onLoadJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute after reload")
+ public void setAfterLoading(String afterLoading) {
+ this.afterLoading = afterLoading;
+ }
+
+
+ @StrutsTagAttribute(name="preInvokeJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute before reload")
+ public void setBeforeLoading(String beforeLoading) {
+ this.beforeLoading = beforeLoading;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java b/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java
new file mode 100644
index 000000000..d63522dcc
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/components/Autocompleter.java
@@ -0,0 +1,302 @@
+/*
+ * $Id: Autocompleter.java 510785 2007-02-23 03:05:33Z 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.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;
+
+/**
+ *
+ *
The autocomplete tag is a combobox that can autocomplete text entered on the input box.
+ * When used on the "simple" theme, the autocompleter can be used like the ComboBox.
+ * When used on the "ajax" theme, the list can be retieved from an action.
+ *
+ *
+ * THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED
+ *
+ *
href
+ *
errorText
+ *
listenTopics
+ *
notifyTopics
+ *
listenTopics
+ *
formId
+ *
formFilter
+ *
indicator
+ *
loadOnTextChange
+ *
loadMinimumCount
+ *
showDownArrow
+ *
searchType
+ *
+ * 'dropdownWidth' width in pixels of the drodpdown, same as autocompleter's width by default
+ * 'dropdownHeight' height in pixels of the drodown, 120 px by default
+ * 'forceValidOption' if invalid option is selected, clear autocompleter's text when focus is lost
+ * 'autoComplete', if true, make suggestions on the textbox
+ * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
+ * in the request.
+ * 'formFilter' is the name of a function which will be used to filter the fields that will be
+ * seralized. This function takes as a parameter the element and returns true if the element
+ * should be included.
+ * 'listenTopics' comma separated list of topics names, that will trigger a request
+ * 'indicator' element to be shown while the request executing
+ * 'showErrorTransportText': whether errors should be displayed (on 'targets')
+ * 'loadOnTextChange' options will be reloaded everytime a character is typed on the textbox
+ * 'loadMinimumCount' minimum number of characters that will force the content to be loaded
+ * 'showDownError' show or hide the down arrow button
+ * 'searchType' how the search must be performed, options are: "startstring", "startword" and "substring"
+ * 'keyName' name of the field to which the selected key will be assigned
+ * 'iconPath' path of icon used for the dropdown
+ * 'templateCssPath' path to css file used to customize Dojo's widget
+ * 'dataFieldName' name of the field to be used as the list in the returned JSON string
+ * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:
+ *
+ *
data: selected value when type='valuechanged'
+ *
type: 'before' before the request is made, 'valuechanged' when selection changes, 'load' when the request succeeds, or 'error' when it fails
+ *
request: request javascript object, when type='load' or type='error'
+ *<s:autocompleter name="test" list="{'apple','banana','grape','pear'}" autoComplete="false"/>
+ *
+ *
+ */
+@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities")
+@StrutsTagSkipInheritance
+public class Autocompleter extends ComboBox {
+ public static final String TEMPLATE = "autocompleter";
+ final private static String COMPONENT_NAME = Autocompleter.class.getName();
+
+ 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 Autocompleter(ValueStack stack, HttpServletRequest request,
+ HttpServletResponse response) {
+ super(stack, request, response);
+ }
+
+ protected String getDefaultTemplate() {
+ return TEMPLATE;
+ }
+
+ public String getComponentName() {
+ return COMPONENT_NAME;
+ }
+
+
+ public void evaluateExtraParams() {
+ super.evaluateExtraParams();
+
+ if (forceValidOption != null)
+ addParameter("forceValidOption", findValue(forceValidOption,
+ Boolean.class));
+ if (searchType != null) {
+ String type = findString(searchType);
+ if(type != null)
+ addParameter("searchType", type.toUpperCase());
+ }
+ if (autoComplete != null)
+ addParameter("autoComplete", findValue(autoComplete, Boolean.class));
+ if (delay != null)
+ addParameter("delay", findValue(delay, Integer.class));
+ if (disabled != null)
+ addParameter("disabled", findValue(disabled, Boolean.class));
+ if (href != null) {
+ addParameter("href", findString(href));
+ addParameter("mode", "remote");
+ }
+ if (dropdownHeight != null)
+ addParameter("dropdownHeight", findValue(dropdownHeight, Integer.class));
+ if (dropdownWidth != null)
+ addParameter("dropdownWidth", findValue(dropdownWidth, Integer.class));
+ if (formFilter != null)
+ addParameter("formFilter", findString(formFilter));
+ if (formId != null)
+ addParameter("formId", findString(formId));
+ if (listenTopics != null)
+ addParameter("listenTopics", findString(listenTopics));
+ if (notifyTopics != null)
+ addParameter("notifyTopics", findString(notifyTopics));
+ if (indicator != null)
+ addParameter("indicator", findString(indicator));
+ if (loadOnTextChange != null)
+ addParameter("loadOnTextChange", findValue(loadOnTextChange, Boolean.class));
+ if (loadMinimumCount != null)
+ addParameter("loadMinimumCount", findValue(loadMinimumCount, Integer.class));
+ if (showDownArrow != null)
+ addParameter("showDownArrow", findValue(showDownArrow, Boolean.class));
+ else
+ addParameter("showDownArrow", Boolean.TRUE);
+ if(templateCssPath != null)
+ addParameter("templateCssPath", findString(templateCssPath));
+ if(iconPath != null)
+ addParameter("iconPath", findString(iconPath));
+ if(dataFieldName != null)
+ addParameter("dataFieldName", findString(dataFieldName));
+ if(keyName != null)
+ addParameter("keyName", findString(keyName));
+ else {
+ keyName = name + "Key";
+ addParameter("keyName", findString(keyName));
+ }
+
+ String keyNameExpr = "%{" + keyName + "}";
+ addParameter("key", findString(keyNameExpr));
+ }
+
+ protected Object findListValue() {
+ return (list != null) ? findValue(list, Object.class) : null;
+ }
+
+ @StrutsTagAttribute(description="Whether autocompleter should make suggestion on the textbox", type="Boolean", defaultValue="false")
+ public void setAutoComplete(String autoComplete) {
+ this.autoComplete = autoComplete;
+ }
+
+ @StrutsTagAttribute(description="Enable or disable autocompleter", type="Boolean", defaultValue="false")
+ public void setDisabled(String disabled) {
+ this.disabled = disabled;
+ }
+
+ @StrutsTagAttribute(description="Force selection to be one of the options", type="Boolean", defaultValue="false")
+ public void setForceValidOption(String forceValidOption) {
+ this.forceValidOption = forceValidOption;
+ }
+
+ @StrutsTagAttribute(description="The URL used to load the options")
+ public void setHref(String href) {
+ this.href = href;
+ }
+
+ @StrutsTagAttribute(description="Delay before making the search", type="Integer", defaultValue="100")
+ public void setDelay(String searchDelay) {
+ this.delay = searchDelay;
+ }
+
+ @StrutsTagAttribute(description="how the search must be performed, options are: 'startstring', 'startword' " +
+ "and 'substring'", defaultValue="stringstart")
+ public void setSearchType(String searchType) {
+ this.searchType = searchType;
+ }
+
+ @StrutsTagAttribute(description="Dropdown's height in pixels", type="Integer", defaultValue="120")
+ public void setDropdownHeight(String height) {
+ this.dropdownHeight = height;
+ }
+
+ @StrutsTagAttribute(description="Dropdown's width", type="Integer", defaultValue="same as textbox")
+ public void setDropdownWidth(String width) {
+ this.dropdownWidth = width;
+ }
+
+ @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="Topic that will trigger a reload")
+ public void setListenTopics(String listenTopics) {
+ this.listenTopics = listenTopics;
+ }
+
+ @StrutsTagAttribute(description="Topics that will be published when content is reloaded")
+ public void setNotifyTopics(String onValueChangedPublishTopic) {
+ this.notifyTopics = onValueChangedPublishTopic;
+ }
+
+ @StrutsTagAttribute(description="Id of element that will be shown while request is made")
+ public void setIndicator(String indicator) {
+ this.indicator = indicator;
+ }
+
+ @StrutsTagAttribute(description="Minimum number of characters that will force the content to be loaded", type="Integer", defaultValue="3")
+ public void setLoadMinimumCount(String loadMinimumCount) {
+ this.loadMinimumCount = loadMinimumCount;
+ }
+
+ @StrutsTagAttribute(description="Options will be reloaded everytime a character is typed on the textbox", type="Boolean", defaultValue="true")
+ public void setLoadOnTextChange(String loadOnType) {
+ this.loadOnTextChange = loadOnType;
+ }
+
+ @StrutsTagAttribute(description="Show or hide the down arrow button", type="Boolean", defaultValue="true")
+ public void setShowDownArrow(String showDownArrow) {
+ this.showDownArrow = showDownArrow;
+ }
+
+ // Override as not required
+ @StrutsTagAttribute(description="Iteratable source to populate from.")
+ public void setList(String list) {
+ super.setList(list);
+ }
+
+ @StrutsTagAttribute(description="Template css path")
+ public void setTemplateCssPath(String templateCssPath) {
+ this.templateCssPath = templateCssPath;
+ }
+
+ @StrutsTagAttribute(description="Path to icon used for the dropdown")
+ public void setIconPath(String iconPath) {
+ this.iconPath = iconPath;
+ }
+
+ @StrutsTagAttribute(description="Name of the field to which the selected key will be assigned")
+ public void setKeyName(String keyName) {
+ this.keyName = keyName;
+ }
+
+ @StrutsTagAttribute(description="Name of the field in the returned JSON object that contains the data array", defaultValue="Value specified in 'name'")
+ public void setDataFieldName(String dataFieldName) {
+ this.dataFieldName = dataFieldName;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java b/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java
new file mode 100644
index 000000000..ab7b01915
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/components/DateTimePicker.java
@@ -0,0 +1,324 @@
+/*
+ * $Id: DateTimePicker.java 512580 2007-02-28 02:48:06Z 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.components;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+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;
+
+/**
+ *
+ *
+ * Renders a date/time picker in a dropdown container.
+ *
+ *
+ * A stand-alone DateTimePicker widget that makes it easy to select a date/time, or increment by week, month,
+ * and/or year.
+ *
+ *
+ *
+ * It is possible to customize the user-visible formatting with either the
+ * 'formatLength' (long, short, medium or full) or 'displayFormat' attributes. By defaulty current
+ * locale will be used.
+ *
+ *
+ * Syntax supported by 'displayFormat' is (http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns):-
+ *
+ *
+ *
Format
+ *
Description
+ *
+ *
+ *
d
+ *
Day of the month
+ *
+ *
+ *
D
+ *
Day of year
+ *
+ *
+ *
M
+ *
Month - Use one or two for the numerical month, three for the abbreviation, or four for the full name, or 5 for the narrow name.
+ *
+ *
+ *
h
+ *
Hour [1-12].
+ *
+ *
+ *
H
+ *
Hour [0-23].
+ *
+ *
+ *
m
+ *
Minute. Use one or two for zero padding.
+ *
+ *
+ *
s
+ *
Second. Use one or two for zero padding.
+ *
+ *
+ *
+ *
+ * The value sent to the server is
+ * typically a locale-independent value in a hidden field as defined by the name
+ * attribute. RFC3339 representation is the format used.
+ *
+ *
+ */
+@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker")
+@StrutsTagSkipInheritance
+public class DateTimePicker extends UIBean {
+
+ final public static String TEMPLATE = "datetimepicker";
+ final private static SimpleDateFormat RFC3339_FORMAT = new SimpleDateFormat(
+ "yyyy-MM-dd'T'HH:mm:ss");
+ final protected static Log LOG = LogFactory.getLog(DateTimePicker.class);
+
+ protected String iconPath;
+ protected String formatLength;
+ protected String displayFormat;
+ protected String toggleType;
+ protected String toggleDuration;
+ protected String type;
+
+ 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 templateCssPath;
+
+ public DateTimePicker(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+ super(stack, request, response);
+ }
+
+ protected String getDefaultTemplate() {
+ return TEMPLATE;
+ }
+
+ public void evaluateParams() {
+ super.evaluateParams();
+
+ if(displayWeeks != null)
+ addParameter("displayWeeks", findString(displayWeeks));
+ if(adjustWeeks != null)
+ addParameter("adjustWeeks", findValue(adjustWeeks, Boolean.class));
+ if(startDate != null)
+ addParameter("startDate", findString(startDate));
+ if(endDate != null)
+ addParameter("endDate", findString(endDate));
+ if(weekStartsOn != null)
+ addParameter("weekStartsOn", findString(weekStartsOn));
+ if(staticDisplay != null)
+ addParameter("staticDisplay", findValue(staticDisplay, Boolean.class));
+ if(dayWidth != null)
+ addParameter("dayWidth", findValue(dayWidth, Integer.class));
+ if(language != null)
+ addParameter("language", findString(language));
+ if(value != null)
+ addParameter("value", findString(value));
+ if(iconPath != null)
+ addParameter("iconPath", findString(iconPath));
+ if(formatLength != null)
+ addParameter("formatLength", findString(formatLength));
+ if(displayFormat != null)
+ addParameter("displayFormat", findString(displayFormat));
+ if(toggleType != null)
+ addParameter("toggleType", findString(toggleType));
+ if(toggleDuration != null)
+ addParameter("toggleDuration", findValue(toggleDuration,
+ Integer.class));
+ if(type != null)
+ addParameter("type", findString(type));
+ else
+ addParameter("type", "date");
+ if(templateCssPath != null)
+ addParameter("templateCssPath", findString(templateCssPath));
+
+ // format the value to RFC 3399
+ if(parameters.containsKey("value")) {
+ parameters.put("nameValue", format(parameters.get("value")));
+ } else {
+ if(name != null) {
+ String expr = name;
+ if(altSyntax()) {
+ expr = "%{" + expr + "}";
+ }
+ addParameter("nameValue", format(findValue(expr)));
+ }
+ }
+ }
+
+ @StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," +
+ " 42 day format is used", type="Boolean", defaultValue="false")
+ public void setAdjustWeeks(String adjustWeeks) {
+ this.adjustWeeks = adjustWeeks;
+ }
+
+ @StrutsTagAttribute(description="How to render the names of the days in the header(narrow, abbr or wide)", defaultValue="narrow")
+ public void setDayWidth(String dayWidth) {
+ this.dayWidth = dayWidth;
+ }
+
+ @StrutsTagAttribute(description="Total weeks to display", type="Integer", defaultValue="6")
+ public void setDisplayWeeks(String displayWeeks) {
+ this.displayWeeks = displayWeeks;
+ }
+
+ @StrutsTagAttribute(description="Last available date in the calendar set", type="Date", defaultValue="2941-10-12")
+ public void setEndDate(String endDate) {
+ this.endDate = endDate;
+ }
+
+ @StrutsTagAttribute(description="First available date in the calendar set", type="Date", defaultValue="1492-10-12")
+ public void setStartDate(String startDate) {
+ this.startDate = startDate;
+ }
+
+ @StrutsTagAttribute(description="Disable all incremental controls, must pick a date in the current display", type="Boolean", defaultValue="false")
+ public void setStaticDisplay(String staticDisplay) {
+ this.staticDisplay = staticDisplay;
+ }
+
+ @StrutsTagAttribute(description="Adjusts the first day of the week 0==Sunday..6==Saturday", type="Integer", defaultValue="0")
+ public void setWeekStartsOn(String weekStartsOn) {
+ this.weekStartsOn = weekStartsOn;
+ }
+
+ @StrutsTagAttribute(description="Language to display this widget in", defaultValue="brower's specified preferred language")
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ @StrutsTagAttribute(description="A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy")
+ public void setDisplayFormat(String displayFormat) {
+ this.displayFormat = displayFormat;
+ }
+
+ @StrutsTagAttribute(description="Type of formatting used for visual display. Possible values are " +
+ "long, short, medium or full", defaultValue="short")
+ public void setFormatLength(String formatLength) {
+ this.formatLength = formatLength;
+ }
+
+ @StrutsTagAttribute(description="Path to icon used for the dropdown")
+ public void setIconPath(String iconPath) {
+ this.iconPath = iconPath;
+ }
+
+ @StrutsTagAttribute(description="Duration of toggle in milliseconds", type="Integer", defaultValue="100")
+ public void setToggleDuration(String toggleDuration) {
+ this.toggleDuration = toggleDuration;
+ }
+
+ @StrutsTagAttribute(description="Defines the type of the picker on the dropdown. Possible values are 'date'" +
+ " for a DateTimePicker, and 'time' for a timePicker", defaultValue="date")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @StrutsTagAttribute(description="oggle type of the dropdown. Possible values are plain,wipe,explode,fade", defaultValue="plain")
+ public void setToggleType(String toggleType) {
+ this.toggleType = toggleType;
+ }
+
+ @StrutsTagAttribute(description="Template css path")
+ public void setTemplateCssPath(String templateCssPath) {
+ this.templateCssPath = templateCssPath;
+ }
+
+ private String format(Object obj) {
+ if(obj == null)
+ return null;
+
+ if(obj instanceof Date) {
+ return RFC3339_FORMAT.format((Date) obj);
+ } else {
+ // try to parse a date
+ String dateStr = obj.toString();
+ if(dateStr.equalsIgnoreCase("today"))
+ return RFC3339_FORMAT.format(new Date());
+
+ try {
+ Date date = null;
+ if(this.displayFormat != null) {
+ SimpleDateFormat format = new SimpleDateFormat(
+ (String) getParameters().get("displayFormat"));
+ date = format.parse(dateStr);
+ return RFC3339_FORMAT.format(date);
+ } else {
+ // last resource to assume already in correct/default format
+ return dateStr;
+ }
+ } catch (ParseException e) {
+ LOG.error("Could not parse date", e);
+ return dateStr;
+ }
+ }
+ }
+
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java b/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java
new file mode 100644
index 000000000..dca049b38
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/components/Div.java
@@ -0,0 +1,193 @@
+/*
+ * $Id: Div.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.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 com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ *
+ * The div tag when used on the ajax theme, provides a remote call
+ * from the current page to update a section of content without having to refresh the entire page.
+ *
+ * It creates a HTML <DIV /> that obtains it's content via a remote XMLHttpRequest call via
+ * the dojo framework.
+ *
+ *
+ *
+ * THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED
+ *
+ *
href
+ *
errorText
+ *
afterLoading
+ *
executeScripts
+ *
loadingText
+ *
listenTopics
+ *
handler
+ *
formId
+ *
formFilter
+ *
targets
+ *
notifyTopics
+ *
showErrorTransportText
+ *
indicator
+ *
+ * 'targets' is a list of element ids whose content will be updated with the
+ * text returned from request.
+ * 'href' needs to be set as an url tag reference value.
+ * 'errorText' is the text that will be displayed when there is an error making the request.
+ * 'afterLoading' Deprecated. Use 'notifyTopics'.
+ * 'executeScripts' if set to true will execute javascript sections in the returned text.
+ * 'loadingText' is the text that will be displayed on the 'targets' elements while making the
+ * request.
+ * 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
+ * and dom node are passed as parameters).
+ * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
+ * in the request.
+ * 'formFilter' is the name of a function which will be used to filter the fields that will be
+ * seralized. This function takes as a parameter the element and returns true if the element
+ * should be included.
+ * 'updateFreq' sets(in milliseconds) the update interval.
+ * 'autoStart' if set to true(true by default) starts the timer automatically
+ * 'startTimerListenTopics' is a comma-separated list of topics used to start the timer
+ * 'stopTimerListenTopics' is a comma-separated list of topics used to stop the timer
+ * 'listenTopics' comma separated list of topics names, that will trigger a request
+ * 'indicator' element to be shown while the request executing
+ * 'showErrorTransportText': whether errors should be displayed (on 'targets')
+ * 'showLoadingText' show loading text on targets
+ * 'separateScript' Run scripts in a separate scope, unique for each Div
+ * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:
+ *
+ *
data: html or json object when type='load' or type='error'
+ *
type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails
+ *
request: request javascript object, when type='load' or type='error'
+ *
+ *
+ */
+@StrutsTag(name="div", tldTagClass="org.apache.struts2.views.jsp.ui.DivTag", description="Render HTML div providing content from remote call via AJAX")
+public class Div extends AbstractRemoteCallUIBean {
+
+ public static final String TEMPLATE = "div";
+ public static final String TEMPLATE_CLOSE = "div-close";
+ public static final String COMPONENT_NAME = Div.class.getName();
+
+ protected String updateFreq;
+ protected String autoStart;
+ protected String delay;
+ protected String startTimerListenTopics;
+ protected String stopTimerListenTopics;
+ protected String refreshOnShow;
+ protected String separateScripts;
+
+ public Div(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+ super(stack, request, response);
+ }
+
+ public String getDefaultOpenTemplate() {
+ return TEMPLATE;
+ }
+
+ protected String getDefaultTemplate() {
+ return TEMPLATE_CLOSE;
+ }
+
+ public void evaluateExtraParams() {
+ super.evaluateExtraParams();
+
+ if (updateFreq != null)
+ addParameter("updateFreq", findValue(updateFreq, Integer.class));
+ if (autoStart != null)
+ addParameter("autoStart", findValue(autoStart, Boolean.class));
+ if (refreshOnShow != null)
+ addParameter("refreshOnShow", findValue(refreshOnShow, Boolean.class));
+ if (delay != null)
+ addParameter("delay", findValue(delay, Integer.class));
+ if (startTimerListenTopics != null)
+ addParameter("startTimerListenTopics", findString(startTimerListenTopics));
+ if (stopTimerListenTopics != null)
+ addParameter("stopTimerListenTopics", findString(stopTimerListenTopics));
+ if (separateScripts != null)
+ addParameter("separateScripts", findValue(separateScripts, Boolean.class));
+ }
+
+ @StrutsTagAttribute(description="Start timer automatically", type="Boolean", defaultValue="true")
+ public void setAutoStart(String autoStart) {
+ this.autoStart = autoStart;
+ }
+
+ @StrutsTagAttribute(description="How long to wait before fetching the content (in milliseconds)", type="Integer")
+ public void setDelay(String delay) {
+ this.delay = delay;
+ }
+
+ @StrutsTagAttribute(description="How often to reload the content (in milliseconds)", type="Integer")
+ public void setUpdateFreq(String updateInterval) {
+ this.updateFreq = updateInterval;
+ }
+
+ @StrutsTagAttribute(description="Topics that will start the timer (for autoupdate)")
+ public void setStartTimerListenTopics(String startTimerListenTopic) {
+ this.startTimerListenTopics = startTimerListenTopic;
+ }
+
+ @StrutsTagAttribute(description="Topics that will stop the timer (for autoupdate)")
+ public void setStopTimerListenTopics(String stopTimerListenTopic) {
+ this.stopTimerListenTopics = stopTimerListenTopic;
+ }
+
+ @StrutsTagAttribute(description="Content will be loaded when div becomes visible, used only inside tabbedPanel", type="Boolean", defaultValue="false")
+ public void setRefreshOnShow(String refreshOnShow) {
+ this.refreshOnShow = refreshOnShow;
+ }
+
+ @StrutsTagAttribute(description="Deprecated. Use 'notifyTopics'. Javascript code execute after reload")
+ public void setAfterLoading(String afterLoading) {
+ this.afterLoading = afterLoading;
+ }
+
+ @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each Div", defaultValue="true")
+ public void setSeparateScripts(String separateScripts) {
+ this.separateScripts = separateScripts;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java b/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java
new file mode 100644
index 000000000..656183ad4
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/components/RemoteUICallBean.java
@@ -0,0 +1,54 @@
+/*
+ * $Id: RemoteUICallBean.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.components;
+
+
+public interface RemoteUICallBean {
+
+ void setListenTopics(String topics);
+
+ void setNotifyTopics(String topics);
+
+ void setHref(String href);
+
+ void setErrorText(String errorText);
+
+ void setAfterLoading(String afterLoading);
+
+ void setBeforeLoading(String beforeLoading);
+
+ 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);
+
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java b/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java
new file mode 100644
index 000000000..78b74b826
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/components/Submit.java
@@ -0,0 +1,340 @@
+/*
+ * $Id: Submit.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.components;
+
+import java.io.Writer;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+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;
+
+/**
+ *
+ * Render a submit button. The submit tag is used together with the form tag to provide asynchronous form submissions.
+ * The submit can have three different types of rendering:
+ *
+ *
input: renders as html <input type="submit"...>
+ *
image: renders as html <input type="image"...>
+ *
button: renders as html <button type="submit"...>
+ *
+ * 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
+ *
+ *
+ * Examples
+ *
+ *
+ * Render an button submit:
+ * <s:submit type="button" value="%{'Submit'}" label="Submit the form"/>
+ *
+ *
+ *
+ *
+ * THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED
+ *
+ *
href
+ *
errorText
+ *
listenTopics
+ *
notifyTopics
+ *
executeScripts
+ *
loadingText
+ *
listenTopics
+ *
handler
+ *
formId
+ *
formFilter
+ *
targets
+ *
showErrorTransportText
+ *
targets
+ *
indicator
+ *
+ * 'resultDivId' Deprecated. Use targets.
+ * 'targets' is a list of element ids whose content will be updated with the
+ * text returned from request.
+ * 'errorText' is the text that will be displayed when there is an error making the request.
+ * 'onLoadJS' Deprecated. Use 'notifyTopics'.
+ * 'preInvokeJS' Deprecated. Use 'notifyTopics'.
+ * 'executeScripts' if set to true will execute javascript sections in the returned text.
+ * 'loadingText' is the text that will be displayed on the 'targets' elements while making the
+ * request.
+ * 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
+ * and dom node are passed as parameters).
+ * 'formId' is the id of the html form whose fields will be seralized and passed as parameters
+ * in the request.
+ * 'formFilter' is the name of a function which will be used to filter the fields that will be
+ * seralized. This function takes as a parameter the element and returns true if the element
+ * should be included.
+ * 'listenTopics' comma separated list of topics names, that will trigger a request
+ * 'indicator' element to be shown while the request executing
+ * 'showErrorTransportText': whether errors should be displayed (on 'targets')
+ * 'showLoadingText' show loading text on targets
+ * 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:
+ *
+ *
data: html or json object when type='load' or type='error'
+ *
type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails
+ *
request: request javascript object, when type='load' or type='error'
+ *
+ *
+ *
+ *
+ * Show the results in another div. If you want your results to be shown in
+ * a div, use the resultDivId where the id is the id of the div you want them
+ * shown in. This is an inner HTML approah. Your results get jammed into
+ * the div for you. Here is a sample of this approach:
+ *
+ *
+ *
+ *
+ */
+@StrutsTag(name="submit", tldTagClass="org.apache.struts2.views.jsp.ui.SubmitTag", description="Render a submit button")
+@StrutsTagSkipInheritance
+public class Submit extends FormButton implements RemoteUICallBean {
+
+ private static final Log LOG = LogFactory.getLog(Submit.class);
+
+ final public static String TEMPLATE = "submit";
+
+ 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;
+ //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 Submit(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+ super(stack, request, response);
+ }
+
+ protected String getDefaultTemplate() {
+ return 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 (afterLoading != null)
+ addParameter("afterLoading", findString(afterLoading));
+ if (beforeLoading != null)
+ addParameter("beforeLoading", findString(beforeLoading));
+ 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));
+ }
+
+ /**
+ * Indicate whether the concrete button supports the type "image".
+ *
+ * @return true 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 theme to use for the element. This tag will usually use the ajax theme.")
+ public void setTheme(String theme) {
+ super.setTheme(theme);
+ }
+
+ @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(name="onLoadJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute after reload")
+ public void setAfterLoading(String afterLoading) {
+ this.afterLoading = afterLoading;
+ }
+
+
+ @StrutsTagAttribute(name="preInvokeJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute before reload")
+ public void setBeforeLoading(String beforeLoading) {
+ this.beforeLoading = beforeLoading;
+ }
+
+ @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 image type submit button. Will have no effect for types input and button.")
+ 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="Topics that will published when the remote call completes")
+ 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="true")
+ public void setShowLoadingText(String showLoadingText) {
+ this.showLoadingText = showLoadingText;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/components/TabbedPanel.java b/plugins/dojo/src/main/java/org/apache/struts2/components/TabbedPanel.java
new file mode 100644
index 000000000..abc08d838
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/components/TabbedPanel.java
@@ -0,0 +1,137 @@
+/*
+ * $Id: TabbedPanel.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.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;
+
+/**
+ *
+ * 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).
+ *
+ *
+ * Examples
+ *
+ *
+ * The following is an example of a tabbedpanel and panel tag utilizing local and remote content.
+ *
+ *
+ *
+ * <s:tabbedPanel id="test" >
+ * <s: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>
+ * </s:div>
+ * <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
+ * This is the remote tab
+ * </s:div>
+ * </s:tabbedPanel>
+ *
+ *
+ *
+ */
+@StrutsTag(name="tabbedPanel", tldTagClass="org.apache.struts2.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.")
+@StrutsTagSkipInheritance
+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();
+
+ protected String selectedTab;
+ protected String closeButton;
+ protected String doLayout ;
+ protected String templateCssPath;
+
+ 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));
+ }
+
+ 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="Where the close button will be placed, possible values are 'tab' and 'pane'")
+ 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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java b/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java
new file mode 100644
index 000000000..ce0fb429b
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/components/Tree.java
@@ -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;
+
+/**
+ *
+ *
+ * Renders a tree widget with AJAX support.
+ *
+ * The id attribute is normally specified, such that it could be looked up using
+ * javascript if necessary.
+ *
+ *
+ *
+ * Examples
+ *
+ *
+ *
+ */
+@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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/DojoTagLibrary.java b/plugins/dojo/src/main/java/org/apache/struts2/views/DojoTagLibrary.java
new file mode 100644
index 000000000..829e3dc8f
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/DojoTagLibrary.java
@@ -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 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
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/AutocompleterModel.java b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/AutocompleterModel.java
new file mode 100644
index 000000000..38d139003
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/AutocompleterModel.java
@@ -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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java
new file mode 100644
index 000000000..18bd2a22a
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java
@@ -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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DojoModels.java b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DojoModels.java
new file mode 100644
index 000000000..72d3447c3
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/DojoModels.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TabbedPanelModel.java b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TabbedPanelModel.java
new file mode 100644
index 000000000..ac0ae5e40
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TabbedPanelModel.java
@@ -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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeModel.java b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeModel.java
new file mode 100644
index 000000000..763e1ee77
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeModel.java
@@ -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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeNodeModel.java b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeNodeModel.java
new file mode 100644
index 000000000..2c1ecd757
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/freemarker/tags/TreeNodeModel.java
@@ -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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRemoteCallUITag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRemoteCallUITag.java
new file mode 100644
index 000000000..f21d9e18c
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRemoteCallUITag.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java
new file mode 100644
index 000000000..346269f1b
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java
@@ -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;
+ }
+}
+
+
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AutocompleterTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AutocompleterTag.java
new file mode 100644
index 000000000..57ae71a7e
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/AutocompleterTag.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java
new file mode 100644
index 000000000..290696846
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DivTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DivTag.java
new file mode 100644
index 000000000..5c965b07c
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/DivTag.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java
new file mode 100644
index 000000000..f12bd511e
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java
new file mode 100644
index 000000000..11b9aec93
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeNodeTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeNodeTag.java
new file mode 100644
index 000000000..d845ce42e
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeNodeTag.java
@@ -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();
+ }*/
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeTag.java b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeTag.java
new file mode 100644
index 000000000..2fc8fbebe
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/jsp/ui/TreeTag.java
@@ -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;
+ }
+}
+
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/AutocompleterDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/AutocompleterDirective.java
new file mode 100644
index 000000000..58c0afc0e
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/AutocompleterDirective.java
@@ -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";
+ }
+
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java
new file mode 100644
index 000000000..e0b208815
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java
@@ -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";
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DivDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DivDirective.java
new file mode 100644
index 000000000..71df9da19
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/DivDirective.java
@@ -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;
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TabbedPanelDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TabbedPanelDirective.java
new file mode 100644
index 000000000..cd2106b4e
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TabbedPanelDirective.java
@@ -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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeDirective.java
new file mode 100644
index 000000000..933e904e6
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeDirective.java
@@ -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;
+
+/**
+ * TreeDirective
+ * @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);
+ }
+}
diff --git a/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeNodeDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeNodeDirective.java
new file mode 100644
index 000000000..8f8876a21
--- /dev/null
+++ b/plugins/dojo/src/main/java/org/apache/struts2/views/velocity/components/TreeNodeDirective.java
@@ -0,0 +1,44 @@
+/*
+ * $Id: TreeNodeDirective.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.TreeNode;
+
+import com.opensymphony.xwork2.util.ValueStack;
+
+/**
+ * TreeNodeDirective
+ * @see TreeNode
+ */
+public class TreeNodeDirective extends AbstractDirective {
+ public String getBeanName() {
+ return "treenode";
+ }
+
+ protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+ return new TreeNode(stack, req, res);
+ }
+}
+
diff --git a/plugins/dojo/src/main/resources/META-INF/README.txt b/plugins/dojo/src/main/resources/META-INF/README.txt
new file mode 100644
index 000000000..71cb1b7ed
--- /dev/null
+++ b/plugins/dojo/src/main/resources/META-INF/README.txt
@@ -0,0 +1,3 @@
+TLD file is generated inside META-INF after compilation.
+If META-INF is empty, Maven will not copy it to the "target/classes" folder.
+Please do not remove META-INF, or this file.
\ No newline at end of file
diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/CommonFunctions.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/CommonFunctions.js
new file mode 100644
index 000000000..dfcf587fa
--- /dev/null
+++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/CommonFunctions.js
@@ -0,0 +1,52 @@
+
+/**
+ * Methods for the tabbed component
+ */
+var unselectedClass = "tab_default tab_unselected";
+var unselectedContentsClass = "tab_contents_hidden";
+var unselectedOverClass = "tab_default tab_unselected tab_unselected_over";
+var selectedClass = "tab_default tab_selected";
+var selectedContentsClass = "tab_contents_header";
+
+function mouseIn(tab) {
+ var className = tab.className;
+ if (className.indexOf('unselected') > -1) {
+ className = unselectedOverClass;
+ tab.className = className;
+ }
+}
+
+function mouseOut(tab) {
+ var className = tab.className;
+ if (className.indexOf('unselected') > -1) {
+ className = unselectedClass;
+ tab.className = className;
+ }
+}
+
+/**
+ * Checks whether the current form include an ajax-ified submit button, if so
+ * we return true (otherwise false).
+ *
+ * @param form the HTML form element to check
+ */
+function isAjaxFormSubmit( form ) {
+ // we check whether this exists
+ //
+ var thisForm = document.getElementById(form.id);
+ var matchUrl = /\s+dojoAttachPoint/;
+ if( thisForm.innerHTML.match(matchUrl) ) {
+ return false;
+ }
+ for( i=0; i
+
+Depending on the edition that you have downloaded, this base dojo.js file may or
+may not include the modules you wish to use in your application. The files which
+have been "baked in" to the dojo.js that is part of your distribution are listed
+in the file build.txt that is part of the top-level directory that is created
+when you unpack the archive. To ensure modules you wish to use are available,
+use dojo.require() to request them. A very rich application might include:
+
+
+
+
+Note that only those modules which are *not* already "baked in" to dojo.js by
+the edition's build process are requested by dojo.require(). This helps make
+your application faster without forcing you to use a build tool while in
+development. See "Building Dojo" and "Working From Source" for more details.
+
+
+Compatibility
+-------------
+
+In addition to it's suite of unit-tests for core system components, Dojo has
+been tested on almost every modern browser, including:
+
+ - IE 5.5+
+ - Mozilla 1.5+, Firefox 1.0+
+ - Safari 1.3.9+
+ - Konqueror 3.4+
+ - Opera 8.5+
+
+Note that some widgets and features may not perform exactly the same on every
+browser due to browser implementation differences.
+
+For those looking to use Dojo in non-browser environments, please see "Working
+From Source".
+
+
+Documentation and Getting Help
+------------------------------
+
+Articles outlining major Dojo systems are linked from:
+
+ http://dojotoolkit.org/docs/
+
+Toolkit APIs are listed in outline form at:
+
+ http://dojotoolkit.org/docs/apis/
+
+And documented in full at:
+
+ http://manual.dojotoolkit.org/
+
+The project also maintains a JotSpot Wiki at:
+
+ http://dojo.jot.com/
+
+A FAQ has been extracted from mailing list traffic:
+
+ http://dojo.jot.com/FAQ
+
+And the main Dojo user mailing list is archived and made searchable at:
+
+ http://news.gmane.org/gmane.comp.web.dojo.user/
+
+You can sign up for this list, which is a great place to ask questions, at:
+
+ http://dojotoolkit.org/mailman/listinfo/dojo-interest
+
+The Dojo developers also tend to hang out in IRC and help people with Dojo
+problems. You're most likely to find them at:
+
+ irc.freenode.net #dojo
+
+Note that 2PM Wed PST in this channel is reserved for a weekly meeting between
+project developers, although anyone is welcome to participate.
+
+
+Working From Source
+-------------------
+
+The core of Dojo is a powerful package system that allows developers to optimize
+Dojo for deployment while using *exactly the same* application code in
+development. Therefore, working from source is almost exactly like working from
+a pre-built edition. Pre-built editions are significantly faster to load than
+working from source, but are not as flexible when in development.
+
+There are multiple ways to get the source. Nightly snapshots of the Dojo source
+repository are available at:
+
+ http://archive.dojotoolkit.org/nightly.tgz
+
+Anonymous Subversion access is also available:
+
+ %> svn co http://svn.dojotoolkit.org/dojo/trunk/ dojo
+
+Each of these sources will include some extra directories not included in the
+pre-packaged editions, including command-line tests and build tools for
+constructing your own packages.
+
+Running the command-line unit test suite requires Ant 1.6. If it is installed
+and in your path, you can run the tests using:
+
+ %> cd buildscripts
+ %> ant test
+
+The command-line test harness makes use of Rhino, a JavaScript interpreter
+written in Java. Once you have a copy of Dojo's source tree, you have a copy of
+Rhino. From the root directory, you can use Rhino interactively to load Dojo:
+
+ %> java -jar buildscripts/lib/js.jar
+ Rhino 1.5 release 3 2002 01 27
+ js> load("dojo.js");
+ js> print(dojo);
+ [object Object]
+ js> quit();
+
+This environment is wonderful for testing raw JavaScript functionality in, or
+even for scripting your system. Since Rhino has full access to anything in
+Java's classpath, the sky is the limit!
+
+Building Dojo
+-------------
+
+Dojo requires Ant 1.6.x in order to build correctly. While using Dojo from
+source does *NOT* require that you make a build, speeding up your application by
+constructing a custom profile build does.
+
+Once you have Ant and a source snapshot of Dojo, you can make your own profile
+build ("edition") which includes only those modules your application uses by
+customizing one of the files in:
+
+ [dojo]/buildscripts/profiles/
+
+These files are named *.profile.js and each one contains a list of modules to
+include in a build. If we created a new profile called "test.profile.js", we
+could then make a profile build using it by doing:
+
+ %> cd buildscripts
+ %> ant -Dprofile=test -Ddocless=true release intern-strings
+
+If the build is successful, your newly minted and compressed profile build will
+be placed in [dojo]/release/dojo/
+
+-------------------------------------------------------------------------------
+Copyright (c) 2004-2006, The Dojo Foundation, All Rights Reserved
+
+vim:ts=4:et:tw=80:shiftwidth=4:
diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/Storage_version6.swf b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/Storage_version6.swf
new file mode 100644
index 0000000000000000000000000000000000000000..c97b14c9210ebb365c18d66473793066a9862129
GIT binary patch
literal 1963
zcmV;c2UPe&S5pR^5dZ*q+N@YhZ`;@vJ|wTCE8B4r#|dMPoWzqj6U}6lWLmU9I?2TK
zYt$yBAWgdHq695n*-R)>ASoy6rn8%@ycEy^UG)#Ni$OOmISV(MiGx
z7jU-xmkMY6@Nex2q?^u>A0E0s?1pc`z4r-=0@rT__}zEA47|WgJlFSr%V0Q4!0q*R
zT;D%L$#BFHh>yc}9hM|sa1=w=XKuu|f62x%L~IbAFz`dS$9mwzitFci^e75P0q#X%
zm_RpTZo>8k!({v_Jn`6$?+u}c#T;ut!wcXswV9pO(y`Obufs>$qyoGwfa-!|w9N?tqETW^7R7hP$f>22T2|EZTxvy8
zD|4w-QR!T2RZ**RsSAp_FiV~GVi9+ip~CM3U8?B(>yjWWBSBBOE?fM0<$xd7a-Joz
zeYI_VhnqIn3v|W87cC9V>3skLN_EKUMaRXjTz|yC2=F}~^6T@xHo3(4uMtDaUlsDN
zx4BSygJ@q$dDnzO^K_NpT~Y_#3;Lm|<$nO@(dkXWv)1IPTo-x0A%w}Z>*D!Q?WuX5
z`-Z9l{;Y8~4Dn!@)j
zf$v%o-{(X3*|J&X$3FZ_|M3Oro??Fvqy@ZpPY^-eL!aenjIg?!t|fZ+<8C+@xIwSY
z+};@WJ3I3ADL@ioFLY)Y`tdj3fJJgv5QdxxluojBal~*0m@zRxbk$}I4me(bco}dH
z1}r%ad*HL+2#pee>I9>~c7#yqMn|Io3lLA8h$W*aknoD5i9p#*4Gtr$?*&CI&E0fz
zkzbj4P97n|+xWOW3Ig=UIYt+K_KOY|3PU%F86HuenIQp*~#(4?pu+Zd{S~okq?J%%-YO%6Yqra6h6aj
z_t<;8k2AwzoJ4%!xIa5i6y}G2me0)(#u`2fAgSjdiGzgVsl(q=u)tmH<+ggmn^96X
zLkKOm1*IbRXbJ4BL%tSmpi1c`XIS_H?+}uc_a<=<7e)VnSkSbjG)b;YR@Nf5w2h*%
zx~W*MAWNmkZ?-O*t>n7gwv}&JGR)Uy(aBDdl_F84_`B3J0~@ez=P4s8@9}|xhY&u^Ne7P+L|v>{1TYij*LKwgN5-ttCgrw8tc}s!2IUQOF12wMVcaU
z%Co|ujX9Mvb&P^45jjMdqL503LfVjpRGME%x3YWjr+f_mx-d@(@Kz(w!V|1LeOdOM&g{mJID8kEX)-d&2U+pXF9;ajvp?{;HJ^M3PrIy>c=AI;T^U
z4*~|M2>%JC_qi+8Liw(fY8s7CvK)p`@J-Ks(_1nSVsf6o&ce~Vs-<1ooVo8fEb_WX
zL4Q5tE%Jd3FQm1mEVz?d@S8&El!S`CK!TmvjiA|XO1g=ELoBt1J#{V1KLN_0WZP)i6T+yV@5T9P(=W$fYd!)@Gt
x_04u?$9c8gv>-Y5;_QzR@dH~#mIIururICl?6)#b(E$Gi009600|4zOWUj4GDMZrj-Ph@`A5zpXe{oH$PGBzByKob)kiou|ikGD2<1
zkdgu&7!YWYl9^DXN>X;*Rd$n=mO`g!SN(uu7V`z|4|G$Y>jDGx9}2kVo_k4AvNTD7
zdLi@Pd!F~a?|V?@KS0s|7)`*Ia)y8D5x~Fw1pYjqyoJB`wO^_1>(zI9-Sl(Y?pt@~
zePDWyZs#5RU(>55oK0?wbF`0!vIT=dDs|gE)NN>bZr}!|O%p7~3M}2WerJM#DEoSF
z1a&jm4!?KaH$Bt$^Nt_rwhfMH8vdK6p$7sLaN7%Z-kVjZ*}8uOrsN6dnd^qJg)|OP
z3-HaL&}tl--lkV?HB2Y)p?cJE-i6C;Jf&>J5)&`6Wec?ov+5eA6h8Xg)7ND@D$B#nD2`<*esXLVBd3_FKrza
zgN_0W7BZPXDe%`cUnCZ2tIfFcs`L2s4f<`dqk#rYDc~ZJ6$@3utieAMf=nk3OiS@i
zzQCqCPT*oH(KX*(
zDJu;>(OyAILvjt22E}1PZ)|_^dT_)~V3SV*m
zd&nthNm4maF>smWCm=0Z;NHp4G>t8kIKjW1aVlEB4k*Sj)#&$X2_+cGc2v+*C7;<9
zzR#7`)NKy1D7eo+XB@N!f-@SRkY{)t=|p*rUl4}Fo6(f~F5ba}xEC$F7u=ffMMEwsii74@J%7+go&PGYLeZw%vs}qOFa8I_
z{6_8ijk-_kb7VvBdGu-S;q8d+8znCEpU-+igbOGyA-dn?E**>%pWupd$@nBI10D&R0qz&vV7Xh|UP_
zO5w%(W}R1J_+vMEWvVQR>qepq5gr$}(p`rfUx|25Q*t5JV
z0IbR&MY%^pxi3WV6qUdm?a44u3|{fShRy`A+iVRPt6iFR4#@6q#HTdr9_W0EeV7GjjNbLgXpQ
z@~j{r$ACQ#DZVK2sCzEGNzL}KBM;ID;Xzn8UPuwB&hV)~WO__#(|m`smEj$s^X!L`
zO^K*dw1l{z&8OMU2$xo4Us6TI^buCSB8G-W=^Vt^k&t6Ymd1`meC#L(u7@8uXndFA
zfFJ*zcnINUI9d!IJYr)8+M#C@zy=@uBliTm%K)2R90Y7r_xSd&%u^rR-G+M{HT4x=
zLVby-bTU^e7PV~H8&p6LA>I{x51)8F6wl66h!6zlfCPoC@cG0j~`L|Iv(Beg^YFu^pc
zMfhKMqayozc{(CbM+TmzK+;)$Rq8v3kgRy0a`HCOub-#`pdmk4G)-)&mwV#B~?QSufxvge`aVqL&O
zA#8byJ#??0gItUtZ}mW4%ge?!g1jyug#f&tRTZ|B(z?c2mhEbyPgqLH#b_c7k8eb2
zk=@*+_B)v%rn6iSb~9po^;_!bsX@Or0Ai6Krh4`k3RffM?B+se6ov{r(q0Jr+R(}|
z+dhIHv2Cxav3`#dy$F#g1i$7(0MQVHR)|pQ|Kh=t8EapNn*B(F7m)@^zXts#;iLL_
zGlkUCg1Xj2{ljqTVW_UYi2CjBeZAp9N3AN_bBSzsTZ1S3@b*G9pQ&t(=Ci+_@#1?Y
z+`L-~T~SlRiyjqb)CQYz^M5hp#_(Ifwx>NF-f^SKJy9WR;Our^cD;OJ>M!!Su*hF$
z>qYUkz#ho2MRqH!?~1JNi&Wp0czy4C>pPpgqjC6;KO~m>-vPsFAAb)Nb$D+N+pAO4
zd(G=>i%vTmkGst!cO?4&TW&^s47JOsviPT`nwEzFBQ~R&WZ)&pp|8sZg~fw%H@j
zSFUZ~=D-%9LZ#ahfU;h?PQGV-g!s6*!`qdY9ycsKYf8OpEvFh-u0uM6;?r}Tr#l7;
zd=v!DjrH}R8m%{5hwJn@D6VE*s`00w*prZ=k3Y!Sbu_Df#qQee^c7U
z>+M|`F3J|zCcM>;b-(Ia&0r(;8Y%VWy+V)5w^w0xt-s{QYWzcGP>sI>+?^6kVJe+y
zd=yl9e2oIV!(bpK=?jXnl9!B^ypf1n>7K-t0Eiz5d_M+TgEW~rN)Ft9I)1HVjk6(u@CCzJGK3*p2cj^yh*Z%CY^fU|4
z)gAo&cnwXy_j1){
+dh.modulesLoadedListeners.push(function(){
+obj[_3d]();
+});
+}
+}
+if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
+dh.callLoaded();
+}
+};
+dojo.addOnUnload=function(obj,_40){
+var dh=dojo.hostenv;
+if(arguments.length==1){
+dh.unloadListeners.push(obj);
+}else{
+if(arguments.length>1){
+dh.unloadListeners.push(function(){
+obj[_40]();
+});
+}
+}
+};
+dojo.hostenv.modulesLoaded=function(){
+if(this.post_load_){
+return;
+}
+if(this.loadUriStack.length==0&&this.getTextStack.length==0){
+if(this.inFlightCount>0){
+dojo.debug("files still in flight!");
+return;
+}
+dojo.hostenv.callLoaded();
+}
+};
+dojo.hostenv.callLoaded=function(){
+if(typeof setTimeout=="object"){
+setTimeout("dojo.hostenv.loaded();",0);
+}else{
+dojo.hostenv.loaded();
+}
+};
+dojo.hostenv.getModuleSymbols=function(_42){
+var _43=_42.split(".");
+for(var i=_43.length;i>0;i--){
+var _45=_43.slice(0,i).join(".");
+if((i==1)&&!this.moduleHasPrefix(_45)){
+_43[0]="../"+_43[0];
+}else{
+var _46=this.getModulePrefix(_45);
+if(_46!=_45){
+_43.splice(0,i,_46);
+break;
+}
+}
+}
+return _43;
+};
+dojo.hostenv._global_omit_module_check=false;
+dojo.hostenv.loadModule=function(_47,_48,_49){
+if(!_47){
+return;
+}
+_49=this._global_omit_module_check||_49;
+var _4a=this.findModule(_47,false);
+if(_4a){
+return _4a;
+}
+if(dj_undef(_47,this.loading_modules_)){
+this.addedToLoadingCount.push(_47);
+}
+this.loading_modules_[_47]=1;
+var _4b=_47.replace(/\./g,"/")+".js";
+var _4c=_47.split(".");
+var _4d=this.getModuleSymbols(_47);
+var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
+var _4f=_4d[_4d.length-1];
+var ok;
+if(_4f=="*"){
+_47=_4c.slice(0,-1).join(".");
+while(_4d.length){
+_4d.pop();
+_4d.push(this.pkgFileName);
+_4b=_4d.join("/")+".js";
+if(_4e&&_4b.charAt(0)=="/"){
+_4b=_4b.slice(1);
+}
+ok=this.loadPath(_4b,!_49?_47:null);
+if(ok){
+break;
+}
+_4d.pop();
+}
+}else{
+_4b=_4d.join("/")+".js";
+_47=_4c.join(".");
+var _51=!_49?_47:null;
+ok=this.loadPath(_4b,_51);
+if(!ok&&!_48){
+_4d.pop();
+while(_4d.length){
+_4b=_4d.join("/")+".js";
+ok=this.loadPath(_4b,_51);
+if(ok){
+break;
+}
+_4d.pop();
+_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
+if(_4e&&_4b.charAt(0)=="/"){
+_4b=_4b.slice(1);
+}
+ok=this.loadPath(_4b,_51);
+if(ok){
+break;
+}
+}
+}
+if(!ok&&!_49){
+dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
+}
+}
+if(!_49&&!this["isXDomain"]){
+_4a=this.findModule(_47,false);
+if(!_4a){
+dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
+}
+}
+return _4a;
+};
+dojo.hostenv.startPackage=function(_52){
+var _53=String(_52);
+var _54=_53;
+var _55=_52.split(/\./);
+if(_55[_55.length-1]=="*"){
+_55.pop();
+_54=_55.join(".");
+}
+var _56=dojo.evalObjPath(_54,true);
+this.loaded_modules_[_53]=_56;
+this.loaded_modules_[_54]=_56;
+return _56;
+};
+dojo.hostenv.findModule=function(_57,_58){
+var lmn=String(_57);
+if(this.loaded_modules_[lmn]){
+return this.loaded_modules_[lmn];
+}
+if(_58){
+dojo.raise("no loaded module named '"+_57+"'");
+}
+return null;
+};
+dojo.kwCompoundRequire=function(_5a){
+var _5b=_5a["common"]||[];
+var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
+for(var x=0;x<_5c.length;x++){
+var _5e=_5c[x];
+if(_5e.constructor==Array){
+dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
+}else{
+dojo.hostenv.loadModule(_5e);
+}
+}
+};
+dojo.require=function(_5f){
+dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
+};
+dojo.requireIf=function(_60,_61){
+var _62=arguments[0];
+if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
+var _63=[];
+for(var i=1;i0;i--){
+_73.push(_72.slice(0,i).join("-"));
+}
+_73.push(false);
+if(_70){
+_73.reverse();
+}
+for(var j=_73.length-1;j>=0;j--){
+var loc=_73[j]||"ROOT";
+var _77=_71(loc);
+if(_77){
+break;
+}
+}
+};
+dojo.hostenv.localesGenerated;
+dojo.hostenv.registerNlsPrefix=function(){
+dojo.registerModulePath("nls","nls");
+};
+dojo.hostenv.preloadLocalizations=function(){
+if(dojo.hostenv.localesGenerated){
+dojo.hostenv.registerNlsPrefix();
+function preload(_78){
+_78=dojo.hostenv.normalizeLocale(_78);
+dojo.hostenv.searchLocalePath(_78,true,function(loc){
+for(var i=0;i1){
+var _98=_97[1];
+var _99=_98.split("&");
+for(var x in _99){
+var sp=_99[x].split("=");
+if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
+var opt=sp[0].substr(9);
+try{
+djConfig[opt]=eval(sp[1]);
+}
+catch(e){
+djConfig[opt]=sp[1];
+}
+}
+}
+}
+}
+if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
+var _9d=document.getElementsByTagName("script");
+var _9e=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
+for(var i=0;i<_9d.length;i++){
+var src=_9d[i].getAttribute("src");
+if(!src){
+continue;
+}
+var m=src.match(_9e);
+if(m){
+var _a2=src.substring(0,m.index);
+if(src.indexOf("bootstrap1")>-1){
+_a2+="../";
+}
+if(!this["djConfig"]){
+djConfig={};
+}
+if(djConfig["baseScriptUri"]==""){
+djConfig["baseScriptUri"]=_a2;
+}
+if(djConfig["baseRelativePath"]==""){
+djConfig["baseRelativePath"]=_a2;
+}
+break;
+}
+}
+}
+var dr=dojo.render;
+var drh=dojo.render.html;
+var drs=dojo.render.svg;
+var dua=(drh.UA=navigator.userAgent);
+var dav=(drh.AV=navigator.appVersion);
+var t=true;
+var f=false;
+drh.capable=t;
+drh.support.builtin=t;
+dr.ver=parseFloat(drh.AV);
+dr.os.mac=dav.indexOf("Macintosh")>=0;
+dr.os.win=dav.indexOf("Windows")>=0;
+dr.os.linux=dav.indexOf("X11")>=0;
+drh.opera=dua.indexOf("Opera")>=0;
+drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
+drh.safari=dav.indexOf("Safari")>=0;
+var _aa=dua.indexOf("Gecko");
+drh.mozilla=drh.moz=(_aa>=0)&&(!drh.khtml);
+if(drh.mozilla){
+drh.geckoVersion=dua.substring(_aa+6,_aa+14);
+}
+drh.ie=(document.all)&&(!drh.opera);
+drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
+drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
+drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
+drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
+var cm=document["compatMode"];
+drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
+dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
+dr.vml.capable=drh.ie;
+drs.capable=f;
+drs.support.plugin=f;
+drs.support.builtin=f;
+var _ac=window["document"];
+var tdi=_ac["implementation"];
+if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
+drs.capable=t;
+drs.support.builtin=t;
+drs.support.plugin=f;
+}
+if(drh.safari){
+var tmp=dua.split("AppleWebKit/")[1];
+var ver=parseFloat(tmp.split(" ")[0]);
+if(ver>=420){
+drs.capable=t;
+drs.support.builtin=t;
+drs.support.plugin=f;
+}
+}
+})();
+dojo.hostenv.startPackage("dojo.hostenv");
+dojo.render.name=dojo.hostenv.name_="browser";
+dojo.hostenv.searchIds=[];
+dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
+dojo.hostenv.getXmlhttpObject=function(){
+var _b0=null;
+var _b1=null;
+try{
+_b0=new XMLHttpRequest();
+}
+catch(e){
+}
+if(!_b0){
+for(var i=0;i<3;++i){
+var _b3=dojo.hostenv._XMLHTTP_PROGIDS[i];
+try{
+_b0=new ActiveXObject(_b3);
+}
+catch(e){
+_b1=e;
+}
+if(_b0){
+dojo.hostenv._XMLHTTP_PROGIDS=[_b3];
+break;
+}
+}
+}
+if(!_b0){
+return dojo.raise("XMLHTTP not available",_b1);
+}
+return _b0;
+};
+dojo.hostenv._blockAsync=false;
+dojo.hostenv.getText=function(uri,_b5,_b6){
+if(!_b5){
+this._blockAsync=true;
+}
+var _b7=this.getXmlhttpObject();
+function isDocumentOk(_b8){
+var _b9=_b8["status"];
+return Boolean((!_b9)||((200<=_b9)&&(300>_b9))||(_b9==304));
+}
+if(_b5){
+var _ba=this,_bb=null,gbl=dojo.global();
+var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
+_b7.onreadystatechange=function(){
+if(_bb){
+gbl.clearTimeout(_bb);
+_bb=null;
+}
+if(_ba._blockAsync||(xhr&&xhr._blockAsync)){
+_bb=gbl.setTimeout(function(){
+_b7.onreadystatechange.apply(this);
+},10);
+}else{
+if(4==_b7.readyState){
+if(isDocumentOk(_b7)){
+_b5(_b7.responseText);
+}
+}
+}
+};
+}
+_b7.open("GET",uri,_b5?true:false);
+try{
+_b7.send(null);
+if(_b5){
+return null;
+}
+if(!isDocumentOk(_b7)){
+var err=Error("Unable to load "+uri+" status:"+_b7.status);
+err.status=_b7.status;
+err.responseText=_b7.responseText;
+throw err;
+}
+}
+catch(e){
+this._blockAsync=false;
+if((_b6)&&(!_b5)){
+return null;
+}else{
+throw e;
+}
+}
+this._blockAsync=false;
+return _b7.responseText;
+};
+dojo.hostenv.defaultDebugContainerId="dojoDebug";
+dojo.hostenv._println_buffer=[];
+dojo.hostenv._println_safe=false;
+dojo.hostenv.println=function(_bf){
+if(!dojo.hostenv._println_safe){
+dojo.hostenv._println_buffer.push(_bf);
+}else{
+try{
+var _c0=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
+if(!_c0){
+_c0=dojo.body();
+}
+var div=document.createElement("div");
+div.appendChild(document.createTextNode(_bf));
+_c0.appendChild(div);
+}
+catch(e){
+try{
+document.write("