mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
Compare commits
86 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de154978ca | |||
| e3a6004b6d | |||
| 1e769cc3b3 | |||
| 299579aef2 | |||
| 85c9e4c171 | |||
| 6d3cceca00 | |||
| 2154ad8513 | |||
| fa754949ab | |||
| 9d71021b14 | |||
| b6be295074 | |||
| 13e6ae21d4 | |||
| 1e73567cec | |||
| 8fa480d66b | |||
| 8910d90721 | |||
| db2bf7b4e3 | |||
| 77cb215263 | |||
| 51d985b3b7 | |||
| 3563fe21e7 | |||
| 8f589c03db | |||
| bb8d0bf28a | |||
| 09f11dac5c | |||
| fbe7fe226f | |||
| 4e78cfce78 | |||
| 004ab6c47c | |||
| ff7144ca42 | |||
| ae053fb669 | |||
| f621683dc1 | |||
| 209965eff0 | |||
| 0a64f616e8 | |||
| 6f97753eec | |||
| 46dd4d4ca6 | |||
| 98d4313537 | |||
| 231e27fd5e | |||
| 08f5faf1af | |||
| 1be016ae02 | |||
| 0a6c72e0c7 | |||
| dceee365c0 | |||
| eca621ef35 | |||
| fdcfcb8c15 | |||
| 422c84f511 | |||
| 16939ed8b1 | |||
| b39e1f24c2 | |||
| a1e9ba6aa4 | |||
| 7da5f114b4 | |||
| 4fd5d2ab15 | |||
| fe3d2c2228 | |||
| e75a5ae946 | |||
| a4e91a9581 | |||
| 5c1593c02e | |||
| 28a98b5757 | |||
| df14a287d0 | |||
| 60391db64f | |||
| 6692879894 | |||
| 9452a5c591 | |||
| a181296a17 | |||
| 94d7466015 | |||
| c6c51c6ba4 | |||
| f13243a2bf | |||
| b2496a566c | |||
| 756c2f58d5 | |||
| cac778c170 | |||
| 66479bc36e | |||
| e023f033af | |||
| 8199b1a3b7 | |||
| d078084107 | |||
| c990786a59 | |||
| 3f7dd2ef82 | |||
| 7d8dfff8a1 | |||
| 129e4559ce | |||
| ff9bfe3bd4 | |||
| e163098224 | |||
| dd200c173c | |||
| d7189a6648 | |||
| 2cab82fafc | |||
| 1472a49a0f | |||
| 5e3464d467 | |||
| d60e674046 | |||
| 6e81a692b7 | |||
| fbedbdedbe | |||
| 1a2bd58e65 | |||
| 421ff8d068 | |||
| 0e7dbe0b62 | |||
| ae4e489d9e | |||
| dcc79d485d | |||
| 75b379d5d4 | |||
| cb580fe614 |
-54
@@ -1,54 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.apache.struts</groupId>
|
|
||||||
<artifactId>struts2-parent</artifactId>
|
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<groupId>org.apache.struts</groupId>
|
|
||||||
<artifactId>struts2-api</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>Struts 2 API</name>
|
|
||||||
|
|
||||||
<scm>
|
|
||||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/api/</connection>
|
|
||||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/api/</developerConnection>
|
|
||||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/api/</url>
|
|
||||||
</scm>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.servlet</groupId>
|
|
||||||
<artifactId>servlet-api</artifactId>
|
|
||||||
<version>2.4</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
<!-- has to be compile for StrutsTestCase, which is part of the base package so others can write unit tests -->
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.easymock</groupId>
|
|
||||||
<artifactId>easymock</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
<version>2.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<showPackage>false</showPackage>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default action interface. Provided purely for user convenience. Struts does not require actions to implement any
|
|
||||||
* interfaces. Actions need only implement a public, no argument method which returns {@code String}. If a user does
|
|
||||||
* not specify a method name, Struts defaults to {@code execute()}.
|
|
||||||
*
|
|
||||||
* <p>For example:
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* static import ResultNames.*;
|
|
||||||
*
|
|
||||||
* public class MyAction <b>implements Action</b> {
|
|
||||||
*
|
|
||||||
* public String execute() {
|
|
||||||
* return SUCCESS;
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* <p>is equivalent to:
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* static import ResultNames.*;
|
|
||||||
*
|
|
||||||
* public class MyAction {
|
|
||||||
*
|
|
||||||
* public String execute() {
|
|
||||||
* return SUCCESS;
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface Action {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Executes this action.
|
|
||||||
*
|
|
||||||
* @return result name which matches a result name from the action mapping in the configuration file. See {@link
|
|
||||||
* ResultNames} for common suggestions.
|
|
||||||
*/
|
|
||||||
String execute();
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implemented by actions which may need to record errors or messages.
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* static import ResultNames.*;
|
|
||||||
*
|
|
||||||
* public class SetName implements MessageAware {
|
|
||||||
*
|
|
||||||
* Messages messages;
|
|
||||||
* String name;
|
|
||||||
*
|
|
||||||
* public String execute() {
|
|
||||||
* return SUCCESS;
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* public void setName(String name) {
|
|
||||||
* if ("".equals(name))
|
|
||||||
* messages.forField("name").addError("name.required");
|
|
||||||
*
|
|
||||||
* this.name = name;
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* public void setMessages(Messages messages) {
|
|
||||||
* this.messages = messages;
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface MessageAware {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets messages.
|
|
||||||
*
|
|
||||||
* @param messages messages
|
|
||||||
*/
|
|
||||||
void setMessages(Messages messages);
|
|
||||||
}
|
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Collection of messages. Supports nesting messages by field name.
|
|
||||||
*
|
|
||||||
* <p>Uses keys when adding instead of actual messages to decouple code from messages.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface Messages {
|
|
||||||
|
|
||||||
// TODO: Use Object[] for args instead of String[].
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Message severity.
|
|
||||||
*/
|
|
||||||
public enum Severity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Informational messages.
|
|
||||||
*/
|
|
||||||
INFO,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Warning messages.
|
|
||||||
*/
|
|
||||||
WARN,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Error messages.
|
|
||||||
*/
|
|
||||||
ERROR,
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets nested messages for the given field.
|
|
||||||
*
|
|
||||||
* <p>Supports dot notation to represent nesting. For example:
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* messages.forField("foo").forField("bar") == messages.forField("foo.bar")
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @param fieldName name of the field
|
|
||||||
* @return nested {@code Messages} for given field name
|
|
||||||
*/
|
|
||||||
Messages forField(String fieldName);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets map of field name to messages for that field.
|
|
||||||
*
|
|
||||||
* @return map of field name to {@code Messages}
|
|
||||||
*/
|
|
||||||
Map<String, Messages> forFields();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds informational message.
|
|
||||||
*
|
|
||||||
* @param key message key
|
|
||||||
* @see Severity.INFO
|
|
||||||
*/
|
|
||||||
void addInformation(String key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds informational message.
|
|
||||||
*
|
|
||||||
* @param key message key
|
|
||||||
* @param arguments message arguments
|
|
||||||
* @see Severity.INFO
|
|
||||||
*/
|
|
||||||
void addInformation(String key, String... arguments);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds warning message.
|
|
||||||
*
|
|
||||||
* @param key message key
|
|
||||||
* @see Severity.WARN
|
|
||||||
*/
|
|
||||||
void addWarning(String key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds warning message.
|
|
||||||
*
|
|
||||||
* @param key message key
|
|
||||||
* @param arguments message arguments
|
|
||||||
* @see Severity.WARN
|
|
||||||
*/
|
|
||||||
void addWarning(String key, String... arguments);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds error message.
|
|
||||||
*
|
|
||||||
* @param key message key
|
|
||||||
* @see Severity.ERROR
|
|
||||||
*/
|
|
||||||
void addError(String key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds error message.
|
|
||||||
*
|
|
||||||
* @param key message key
|
|
||||||
* @param arguments message arguments
|
|
||||||
* @see Severity.ERROR
|
|
||||||
*/
|
|
||||||
void addError(String key, String... arguments);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds message.
|
|
||||||
*
|
|
||||||
* @param severity message severity
|
|
||||||
* @param key message key
|
|
||||||
*/
|
|
||||||
void add(Severity severity, String key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds request-scoped message.
|
|
||||||
*
|
|
||||||
* @param severity message severity
|
|
||||||
* @param key message key
|
|
||||||
* @param arguments message arguments
|
|
||||||
*/
|
|
||||||
void add(Severity severity, String key, String... arguments);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets set of severities for which this {@code Messages} instance has messages. Not recursive.
|
|
||||||
*
|
|
||||||
* @return unmodifiable set of {@link Severity} sorted from least to most severe
|
|
||||||
*/
|
|
||||||
Set<Severity> getSeverities();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets message strings for the given severity. Not recursive.
|
|
||||||
*
|
|
||||||
* @param severity message severity
|
|
||||||
* @return unmodifiable list of messages
|
|
||||||
*/
|
|
||||||
List<String> forSeverity(Severity severity);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets error message strings for this {@code Messages} instance. Not recursive.
|
|
||||||
*
|
|
||||||
* @return unmodifiable list of messages
|
|
||||||
*/
|
|
||||||
List<String> getErrors();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets error message strings for this {@code Messages} instance. Not recursive.
|
|
||||||
*
|
|
||||||
* @return unmodifiable list of messages
|
|
||||||
*/
|
|
||||||
List<String> getWarnings();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets informational message strings for this {@code Messages} instance. Not recursive.
|
|
||||||
*
|
|
||||||
* @return unmodifiable list of messages
|
|
||||||
*/
|
|
||||||
List<String> getInformation();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this or a nested {@code Messages} instance has error messages.
|
|
||||||
*
|
|
||||||
* @see Severity.ERROR
|
|
||||||
*/
|
|
||||||
boolean hasErrors();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this or a nested {@code Messages} instance has warning messages.
|
|
||||||
*
|
|
||||||
* @see Severity.WARN
|
|
||||||
*/
|
|
||||||
boolean hasWarnings();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this or a nested {@code Messages} instance has informational messages.
|
|
||||||
*
|
|
||||||
* @see Severity.INFO
|
|
||||||
*/
|
|
||||||
boolean hasInformation();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this and all nested {@code Messages} instances have no messages.
|
|
||||||
*/
|
|
||||||
boolean isEmpty();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this and all nested {@code Messages} instances have no messages for the given severity.
|
|
||||||
*
|
|
||||||
* @param severity message severity
|
|
||||||
*/
|
|
||||||
boolean isEmpty(Severity severity);
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Commonly used result names returned by action methods.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public final class ResultNames {
|
|
||||||
|
|
||||||
private ResultNames() {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The action executed successfully.
|
|
||||||
*/
|
|
||||||
public static final String SUCCESS = "success";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The action requires more input, i.e. a validation error occurred.
|
|
||||||
*/
|
|
||||||
public static final String INPUT = "input";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The action requires the user to log in before executing.
|
|
||||||
*/
|
|
||||||
public static final String LOGIN = "login";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The action execution failed irrecoverably.
|
|
||||||
*/
|
|
||||||
public static final String ERROR = "error";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The action executed successfully, but do not execute a result.
|
|
||||||
*/
|
|
||||||
public static final String NONE = "none";
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2;
|
|
||||||
|
|
||||||
import org.apache.struts2.MessageAware;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implemented by actions which wish to execute some validation logic before their action method. Useful for
|
|
||||||
* cross-field validations.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface Validatable extends MessageAware {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validates input. Executes before action method.
|
|
||||||
*/
|
|
||||||
public void validate();
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.servlet;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implemented by actions which need direct access to the request parameters.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface ParameterAware {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets parameters.
|
|
||||||
*
|
|
||||||
* @param parameters map of parameter name to parameter values
|
|
||||||
*/
|
|
||||||
void setParameters(Map<String, String[]> parameters);
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.servlet;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implemented by actions which need direct access to the servlet request.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface ServletRequestAware {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the servlet request.
|
|
||||||
*
|
|
||||||
* @param request servlet request.
|
|
||||||
*/
|
|
||||||
void setServletRequest(HttpServletRequest request);
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.servlet;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implemented by actions which need direct access to the servlet response.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface ServletResponseAware {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the servlet response.
|
|
||||||
*
|
|
||||||
* @param response servlet response
|
|
||||||
*/
|
|
||||||
void setServletResponse(HttpServletResponse response);
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.spi;
|
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Context of an action execution.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface ActionContext {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets action instance.
|
|
||||||
*/
|
|
||||||
Object getAction();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets action method.
|
|
||||||
*/
|
|
||||||
Method getMethod();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets action name.
|
|
||||||
*/
|
|
||||||
String getActionName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the path for the action's namespace.
|
|
||||||
*/
|
|
||||||
String getNamespacePath();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the {@link Result} instance for the action.
|
|
||||||
*
|
|
||||||
* @return {@link Result} instance or {@code null} if we don't have a result yet.
|
|
||||||
*/
|
|
||||||
Result getResult();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a result interceptor for the action. Enables executing code before and after a result, executing an
|
|
||||||
* alternate result, etc.
|
|
||||||
*/
|
|
||||||
void addResultInterceptor(Result interceptor);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets context of action which chained to us.
|
|
||||||
*
|
|
||||||
* @return context of previous action or {@code null} if this is the first action in the chain
|
|
||||||
*/
|
|
||||||
ActionContext getPrevious();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets context of action which this action chained to.
|
|
||||||
*
|
|
||||||
* @return context of next action or {@code null} if we haven't chained to another action yet or this is the last
|
|
||||||
* action in the chain.
|
|
||||||
*/
|
|
||||||
ActionContext getNext();
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.spi;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Intercepts an action request.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface Interceptor {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Intercepts an action request.
|
|
||||||
*
|
|
||||||
* @param requestContext current request context
|
|
||||||
*/
|
|
||||||
String intercept(RequestContext requestContext) throws Exception;
|
|
||||||
}
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.spi;
|
|
||||||
|
|
||||||
import org.apache.struts2.Messages;
|
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
|
||||||
import javax.servlet.http.Cookie;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request context. A single request may span multiple actions with action chaining.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface RequestContext {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets context of the currently executing action.
|
|
||||||
*
|
|
||||||
* @return current action context
|
|
||||||
*/
|
|
||||||
ActionContext getActionContext();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convenience method. Equivalent to {@code getActionContext().getAction()}.
|
|
||||||
*
|
|
||||||
* @return currently executing action
|
|
||||||
*/
|
|
||||||
Object getAction();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets map of request parameters.
|
|
||||||
*/
|
|
||||||
Map<String, String[]> getParameterMap();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets map of request attributes.
|
|
||||||
*/
|
|
||||||
Map<String, Object> getAttributeMap();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets map of session attributes.
|
|
||||||
*/
|
|
||||||
Map<String, Object> getSessionMap();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets map of application (servlet context) attributes.
|
|
||||||
*/
|
|
||||||
Map<String, Object> getApplicationMap();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Finds cookies with the given name,
|
|
||||||
*/
|
|
||||||
List<Cookie> findCookiesForName(String name);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets locale.
|
|
||||||
*/
|
|
||||||
Locale getLocale();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets locale. Stores the locale in the session for future requests.
|
|
||||||
*/
|
|
||||||
void setLocale(Locale locale);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets messages.
|
|
||||||
*/
|
|
||||||
Messages getMessages();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the servlet request.
|
|
||||||
*/
|
|
||||||
HttpServletRequest getServletRequest();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the servlet response.
|
|
||||||
*/
|
|
||||||
HttpServletResponse getServletResponse();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the servlet context.
|
|
||||||
*/
|
|
||||||
ServletContext getServletContext();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value stack.
|
|
||||||
*/
|
|
||||||
ValueStack getValueStack();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invokes the next interceptor or the action method if no more interceptors remain.
|
|
||||||
*
|
|
||||||
* @return result name
|
|
||||||
* @throws IllegalStateException if already invoked or called from the action
|
|
||||||
*/
|
|
||||||
String proceed() throws Exception;
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.spi;
|
|
||||||
|
|
||||||
import org.apache.struts2.spi.RequestContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implemented by actions that need access to the current {@link org.apache.struts2.spi.RequestContext}. Use
|
|
||||||
* judiciously.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface RequestContextAware {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets {@link org.apache.struts2.spi.RequestContext}.
|
|
||||||
*
|
|
||||||
* @param requestContext
|
|
||||||
*/
|
|
||||||
void setRequestContext(RequestContext requestContext);
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.spi;
|
|
||||||
|
|
||||||
import org.apache.struts2.spi.RequestContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The result of an action request. Struts creates a new {@code Result} instance for each request.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface Result {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Executes result.
|
|
||||||
*
|
|
||||||
* @param requestContext
|
|
||||||
*/
|
|
||||||
void execute(RequestContext requestContext) throws Exception;
|
|
||||||
}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.struts2.spi;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A central fixture of the Struts framework, the {@code ValueStack} is a stack which contains the actions
|
|
||||||
* which have executed in addition to other objects. Users can get and set values on the stack using expressions. The
|
|
||||||
* {@code ValueStack} will search down the stack starting with the most recent objects until it finds an object to
|
|
||||||
* which the expression can apply.
|
|
||||||
*
|
|
||||||
* @author crazybob@google.com (Bob Lee)
|
|
||||||
*/
|
|
||||||
public interface ValueStack extends Iterable<Object> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the top, most recent object from the stack without changing the stack.
|
|
||||||
*
|
|
||||||
* @return the top object
|
|
||||||
*/
|
|
||||||
Object peek();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes the top, most recent object from the stack.
|
|
||||||
*
|
|
||||||
* @return the top object
|
|
||||||
*/
|
|
||||||
Object pop();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pushes an object onto the stack.
|
|
||||||
*
|
|
||||||
* @param o
|
|
||||||
*/
|
|
||||||
void push(Object o);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a shallow copy of this stack.
|
|
||||||
*
|
|
||||||
* @return a new stack which contains the same objects as this one
|
|
||||||
*/
|
|
||||||
ValueStack clone();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Queries the stack. Starts with the top, most recent object. If the expression can apply to the object, this
|
|
||||||
* method returns the result of evaluating the expression. If the expression does not apply, this method moves
|
|
||||||
* down the stack to the next object and repeats. Returns {@code null} if the expression doesn't apply to any
|
|
||||||
* objects.
|
|
||||||
*
|
|
||||||
* @param expression
|
|
||||||
* @return the evaluation of the expression against the first applicable object in the stack
|
|
||||||
*/
|
|
||||||
Object get(String expression);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Queries the stack and converts the result to the specified type. Starts with the top, most recent object. If
|
|
||||||
* the expression can apply to the object, this method returns the result of evaluating the expression converted
|
|
||||||
* to the specified type. If the expression does not apply, this method moves down the stack to the next object
|
|
||||||
* and repeats. Returns {@code null} if the expression doesn't apply to any objects.
|
|
||||||
*
|
|
||||||
* @param expression
|
|
||||||
* @param asType the type to convert the result to
|
|
||||||
* @return the evaluation of the expression against the first applicable object in the stack converted to the
|
|
||||||
* specified type
|
|
||||||
*/
|
|
||||||
<T> T get(String expression, Class<T> asType);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Queries the stack and converts the result to a {@code String}. Starts with the top, most recent object. If the
|
|
||||||
* expression can apply to the object, this method returns the result of evaluating the expression converted to a
|
|
||||||
* {@code String}. If the expression does not apply, this method moves down the stack to the next object and
|
|
||||||
* repeats. Returns {@code null} if the expression doesn't apply to any objects.
|
|
||||||
*
|
|
||||||
* @param expression
|
|
||||||
* @return the evaluation of the expression against the first applicable object in the stack converted to a {@code
|
|
||||||
* String}
|
|
||||||
*/
|
|
||||||
String getString(String expression);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets a value on an object from the stack. This method starts at the top, most recent object. If the expression
|
|
||||||
* applies to that object, this methods sets the given value on that object using the expression and converting
|
|
||||||
* the type as necessary. If the expression does not apply, this method moves to the next object and repeats.
|
|
||||||
*
|
|
||||||
* @param expression
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
void set(String expression, Object value);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of object on the stack.
|
|
||||||
*
|
|
||||||
* @return size of stack
|
|
||||||
*/
|
|
||||||
int size();
|
|
||||||
}
|
|
||||||
@@ -1,174 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
Apache Struts
|
|
||||||
Copyright 2000-2007 The Apache Software Foundation
|
|
||||||
|
|
||||||
This product includes software developed by
|
|
||||||
The Apache Software Foundation (http://www.apache.org/).
|
|
||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-apps</artifactId>
|
<artifactId>struts2-apps</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-blank</artifactId>
|
<artifactId>struts2-blank</artifactId>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<action name="Login_*" method="{1}" class="example.Login">
|
<action name="Login_*" method="{1}" class="example.Login">
|
||||||
<result name="input">/example/Login.jsp</result>
|
<result name="input">/example/Login.jsp</result>
|
||||||
<result type="redirectAction">Menu</result>
|
<result type="redirect-action">Menu</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action name="*" class="example.ExampleSupport">
|
<action name="*" class="example.ExampleSupport">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-apps</artifactId>
|
<artifactId>struts2-apps</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-mailreader</artifactId>
|
<artifactId>struts2-mailreader</artifactId>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</interceptor-stack>
|
</interceptor-stack>
|
||||||
|
|
||||||
<interceptor-stack name="user-submit" >
|
<interceptor-stack name="user-submit" >
|
||||||
<interceptor-ref name="tokenSession" />
|
<interceptor-ref name="token-session" />
|
||||||
<interceptor-ref name="user"/>
|
<interceptor-ref name="user"/>
|
||||||
</interceptor-stack>
|
</interceptor-stack>
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<global-results>
|
<global-results>
|
||||||
<result name="error">/pages/Error.jsp</result>
|
<result name="error">/pages/Error.jsp</result>
|
||||||
<result name="invalid.token">/pages/Error.jsp</result>
|
<result name="invalid.token">/pages/Error.jsp</result>
|
||||||
<result name="login" type="redirectAction">Login_input</result>
|
<result name="login" type="redirect-action">Login_input</result>
|
||||||
</global-results>
|
</global-results>
|
||||||
|
|
||||||
<global-exception-mappings>
|
<global-exception-mappings>
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action name="Logout" class="mailreader2.Logout">
|
<action name="Logout" class="mailreader2.Logout">
|
||||||
<result type="redirectAction">Welcome</result>
|
<result type="redirect-action">Welcome</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action name="Login_*" method="{1}" class="mailreader2.Login">
|
<action name="Login_*" method="{1}" class="mailreader2.Login">
|
||||||
<result name="input">/Login.jsp</result>
|
<result name="input">/Login.jsp</result>
|
||||||
<result name="cancel" type="redirectAction">Welcome</result>
|
<result name="cancel" type="redirect-action">Welcome</result>
|
||||||
<result type="redirectAction">MainMenu</result>
|
<result type="redirect-action">MainMenu</result>
|
||||||
<result name="expired" type="chain">ChangePassword</result>
|
<result name="expired" type="chain">ChangePassword</result>
|
||||||
<exception-mapping
|
<exception-mapping
|
||||||
exception="org.apache.struts.apps.mailreader.dao.ExpiredPasswordException"
|
exception="org.apache.struts.apps.mailreader.dao.ExpiredPasswordException"
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<action name="Registration_*" method="{1}" class="mailreader2.Registration">
|
<action name="Registration_*" method="{1}" class="mailreader2.Registration">
|
||||||
<result name="input">/Registration.jsp</result>
|
<result name="input">/Registration.jsp</result>
|
||||||
<result type="redirectAction">MainMenu</result>
|
<result type="redirect-action">MainMenu</result>
|
||||||
<interceptor-ref name="guest"/>
|
<interceptor-ref name="guest"/>
|
||||||
</action>
|
</action>
|
||||||
</package>
|
</package>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<global-results>
|
<global-results>
|
||||||
<result name="input">/Subscription.jsp</result>
|
<result name="input">/Subscription.jsp</result>
|
||||||
<result type="redirectAction">Registration_input</result>
|
<result type="redirect-action">Registration_input</result>
|
||||||
</global-results>
|
</global-results>
|
||||||
|
|
||||||
<action name="Subscription_save" method="save" class="mailreader2.Subscription">
|
<action name="Subscription_save" method="save" class="mailreader2.Subscription">
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-parent</artifactId>
|
<artifactId>struts2-parent</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-apps</artifactId>
|
<artifactId>struts2-apps</artifactId>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ For more on getting started with Struts, see
|
|||||||
|
|
||||||
WARNING - Additional configuration required for deployment
|
WARNING - Additional configuration required for deployment
|
||||||
|
|
||||||
Due to difference in portlet container implementations, the portlet
|
Due to difference in portlet contrainer implementations, the porlet
|
||||||
WAR is not ready-to-run. Extract the portlet WAR, and then copy the
|
WAR is not ready-to-run. Extract the porlet WAR, and then copy the
|
||||||
contents of apps/portlet/src/main/etc/<your_portal_server>/ into the
|
contents of apps/portlet/src/main/etc/<your_portal_server>/ into the
|
||||||
WAR's WEB-INF directory.
|
WAR's WEB-INF directory.
|
||||||
|
|
||||||
|
|||||||
+1
-32
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-apps</artifactId>
|
<artifactId>struts2-apps</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-portlet</artifactId>
|
<artifactId>struts2-portlet</artifactId>
|
||||||
@@ -18,37 +18,6 @@
|
|||||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/portlet/</url>
|
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/portlet/</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>pluto</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- configure maven-war-plugin to use updated web.xml -->
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<!-- bind 'pluto:assemble' goal to 'process-resources' lifecycle -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.pluto</groupId>
|
|
||||||
<artifactId>maven-pluto-plugin</artifactId>
|
|
||||||
<version>1.1.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>generate-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>assemble</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>portlet-api</groupId>
|
<groupId>portlet-api</groupId>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-apps</artifactId>
|
<artifactId>struts2-apps</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-showcase</artifactId>
|
<artifactId>struts2-showcase</artifactId>
|
||||||
@@ -38,12 +38,6 @@
|
|||||||
<version>${pom.version}</version>
|
<version>${pom.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.struts</groupId>
|
|
||||||
<artifactId>struts2-dojo-plugin</artifactId>
|
|
||||||
<version>${pom.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-jsf-plugin</artifactId>
|
<artifactId>struts2-jsf-plugin</artifactId>
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param className the className to set
|
* @param className the className to set
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
<interceptor-ref name="createSession" />
|
<interceptor-ref name="createSession" />
|
||||||
<interceptor-ref name="exception"/>
|
<interceptor-ref name="exception"/>
|
||||||
<interceptor-ref name="alias"/>
|
<interceptor-ref name="alias"/>
|
||||||
<interceptor-ref name="servletConfig"/>
|
<interceptor-ref name="servlet-config"/>
|
||||||
<interceptor-ref name="prepare"/>
|
<interceptor-ref name="prepare"/>
|
||||||
<interceptor-ref name="i18n"/>
|
<interceptor-ref name="i18n"/>
|
||||||
<interceptor-ref name="chain"/>
|
<interceptor-ref name="chain"/>
|
||||||
<interceptor-ref name="debugging"/>
|
<interceptor-ref name="debugging"/>
|
||||||
<interceptor-ref name="modelDriven"/>
|
<interceptor-ref name="model-driven"/>
|
||||||
<interceptor-ref name="fileUpload"/>
|
<interceptor-ref name="fileUpload"/>
|
||||||
<interceptor-ref name="staticParams"/>
|
<interceptor-ref name="static-params"/>
|
||||||
<interceptor-ref name="params"/>
|
<interceptor-ref name="params"/>
|
||||||
<interceptor-ref name="conversionError"/>
|
<interceptor-ref name="conversionError"/>
|
||||||
<interceptor-ref name="validation">
|
<interceptor-ref name="validation">
|
||||||
@@ -77,14 +77,14 @@
|
|||||||
<interceptor-ref name="createSession" />
|
<interceptor-ref name="createSession" />
|
||||||
<interceptor-ref name="exception"/>
|
<interceptor-ref name="exception"/>
|
||||||
<interceptor-ref name="alias"/>
|
<interceptor-ref name="alias"/>
|
||||||
<interceptor-ref name="servletConfig"/>
|
<interceptor-ref name="servlet-config"/>
|
||||||
<interceptor-ref name="prepare"/>
|
<interceptor-ref name="prepare"/>
|
||||||
<interceptor-ref name="i18n"/>
|
<interceptor-ref name="i18n"/>
|
||||||
<interceptor-ref name="chain"/>
|
<interceptor-ref name="chain"/>
|
||||||
<interceptor-ref name="debugging"/>
|
<interceptor-ref name="debugging"/>
|
||||||
<interceptor-ref name="modelDriven"/>
|
<interceptor-ref name="model-driven"/>
|
||||||
<interceptor-ref name="fileUpload"/>
|
<interceptor-ref name="fileUpload"/>
|
||||||
<interceptor-ref name="staticParams"/>
|
<interceptor-ref name="static-params"/>
|
||||||
<interceptor-ref name="params"/>
|
<interceptor-ref name="params"/>
|
||||||
<interceptor-ref name="conversionError"/>
|
<interceptor-ref name="conversionError"/>
|
||||||
<interceptor-ref name="validation">
|
<interceptor-ref name="validation">
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
<result name="input">enterPersonInfo.jsp</result>
|
<result name="input">enterPersonInfo.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showPersonJspCode">
|
<action name="showPersonJspCode">
|
||||||
<result type="plainText">/conversion/enterPersonInfo.jsp</result>
|
<result type="plaintext">/conversion/enterPersonInfo.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showPersonActionJavaCode">
|
<action name="showPersonActionJavaCode">
|
||||||
<result type="plainText">/conversion/PersonAction.java.txt</result>
|
<result type="plaintext">/conversion/PersonAction.java.txt</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showPersonJavaCode">
|
<action name="showPersonJavaCode">
|
||||||
<result type="plainText">/conversion/Person.java.txt</result>
|
<result type="plaintext">/conversion/Person.java.txt</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
|
||||||
@@ -37,13 +37,13 @@
|
|||||||
<result name="input">enterAddressInfo.jsp</result>
|
<result name="input">enterAddressInfo.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showAddressJspCode">
|
<action name="showAddressJspCode">
|
||||||
<result type="plainText">/conversion/enterAddressInfo.jsp</result>
|
<result type="plaintext">/conversion/enterAddressInfo.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showAddressActionJavaCode">
|
<action name="showAddressActionJavaCode">
|
||||||
<result type="plainText">/conversion/AddressAction.java.txt</result>
|
<result type="plaintext">/conversion/AddressAction.java.txt</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showAddressJavaCode">
|
<action name="showAddressJavaCode">
|
||||||
<result type="plainText">/conversion/Address.java.txt</result>
|
<result type="plaintext">/conversion/Address.java.txt</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
|
||||||
@@ -56,19 +56,19 @@
|
|||||||
<result name="input">enterOperations.jsp</result>
|
<result name="input">enterOperations.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showEnumJspCode">
|
<action name="showEnumJspCode">
|
||||||
<result type="plainText">/conversion/enterOperations.jsp</result>
|
<result type="plaintext">/conversion/enterOperations.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showOperationsEnumJavaCode">
|
<action name="showOperationsEnumJavaCode">
|
||||||
<result type="plainText">/conversion/OperationsEnum.java.txt</result>
|
<result type="plaintext">/conversion/OperationsEnum.java.txt</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showOperationEnumActionJavaCode">
|
<action name="showOperationEnumActionJavaCode">
|
||||||
<result type="plainText">/conversion/OperationsEnumAction.java.txt</result>
|
<result type="plaintext">/conversion/OperationsEnumAction.java.txt</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showEnumTypeConverterJavaCode">
|
<action name="showEnumTypeConverterJavaCode">
|
||||||
<result type="plainText">/conversion/EnumTypeConverter.java.txt</result>
|
<result type="plaintext">/conversion/EnumTypeConverter.java.txt</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="showOperationsEnumActionConversionProperties">
|
<action name="showOperationsEnumActionConversionProperties">
|
||||||
<result type="plainText">/conversion/OperationsEnumActionConversion.txt</result>
|
<result type="plaintext">/conversion/OperationsEnumActionConversion.txt</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
</package>
|
</package>
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
</interceptor>
|
</interceptor>
|
||||||
|
|
||||||
<interceptor-stack name="integration">
|
<interceptor-stack name="integration">
|
||||||
<interceptor-ref name="staticParams"/>
|
<interceptor-ref name="static-params"/>
|
||||||
<interceptor-ref name="gangsterForm"/>
|
<interceptor-ref name="gangsterForm"/>
|
||||||
<interceptor-ref name="modelDriven"/>
|
<interceptor-ref name="model-driven"/>
|
||||||
<interceptor-ref name="actionForm-reset"/>
|
<interceptor-ref name="actionForm-reset"/>
|
||||||
<interceptor-ref name="basicStack"/>
|
<interceptor-ref name="basicStack"/>
|
||||||
<interceptor-ref name="gangsterValidation"/>
|
<interceptor-ref name="gangsterValidation"/>
|
||||||
@@ -46,3 +46,4 @@
|
|||||||
|
|
||||||
</package>
|
</package>
|
||||||
</struts>
|
</struts>
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<result>/tags/non-ui/actionTag/includedPage3.jsp</result>
|
<result>/tags/non-ui/actionTag/includedPage3.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="lookAtSource">
|
<action name="lookAtSource">
|
||||||
<result type="plainText">/tags/non-ui/actionTag/showActionTagDemo.jsp</result>
|
<result type="plaintext">/tags/non-ui/actionTag/showActionTagDemo.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
</package>
|
</package>
|
||||||
|
|
||||||
@@ -104,10 +104,10 @@
|
|||||||
<result type="freemarker">/tags/non-ui/actionPrefix/redirectActionPrefix.ftl</result>
|
<result type="freemarker">/tags/non-ui/actionPrefix/redirectActionPrefix.ftl</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="redirectActionPrefixAction">
|
<action name="redirectActionPrefixAction">
|
||||||
<result type="redirect">redirectActionPrefix</result>
|
<result type="redirect-action">redirectActionPrefix</result>
|
||||||
</action>
|
</action>
|
||||||
<action name="viewSource">
|
<action name="viewSource">
|
||||||
<result type="plainText">/tags/non-ui/actionPrefix/actionPrefixExample.ftl</result>
|
<result type="plaintext">/tags/non-ui/actionPrefix/actionPrefixExample.ftl</result>
|
||||||
</action>
|
</action>
|
||||||
</package>
|
</package>
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<action name="showComponentTagExampleCode">
|
<action name="showComponentTagExampleCode">
|
||||||
<result type="plainText">/tags/ui/componentTagExample.jsp</result>
|
<result type="plaintext">/tags/ui/componentTagExample.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
</package>
|
</package>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<action name="transfer3" class="org.apache.struts2.showcase.token.TokenAction">
|
<action name="transfer3" class="org.apache.struts2.showcase.token.TokenAction">
|
||||||
<interceptor-ref name="defaultStack"/>
|
<interceptor-ref name="defaultStack"/>
|
||||||
<interceptor-ref name="tokenSession"/>
|
<interceptor-ref name="token-session"/>
|
||||||
<result name="invalid.token">doublePost.jsp</result>
|
<result name="invalid.token">doublePost.jsp</result>
|
||||||
<result name="success" type="redirect">transferDone.jsp</result>
|
<result name="success" type="redirect">transferDone.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
<include file="struts-hangman.xml" />
|
<include file="struts-hangman.xml" />
|
||||||
|
|
||||||
|
<include file="struts-continuations.xml"/>
|
||||||
|
|
||||||
<include file="struts-tags.xml"/>
|
<include file="struts-tags.xml"/>
|
||||||
|
|
||||||
<include file="struts-validation.xml" />
|
<include file="struts-validation.xml" />
|
||||||
@@ -59,7 +61,7 @@
|
|||||||
<interceptor-stack name="crudStack">
|
<interceptor-stack name="crudStack">
|
||||||
<interceptor-ref name="checkbox" />
|
<interceptor-ref name="checkbox" />
|
||||||
<interceptor-ref name="params" />
|
<interceptor-ref name="params" />
|
||||||
<interceptor-ref name="staticParams" />
|
<interceptor-ref name="static-params" />
|
||||||
<interceptor-ref name="defaultStack" />
|
<interceptor-ref name="defaultStack" />
|
||||||
</interceptor-stack>
|
</interceptor-stack>
|
||||||
</interceptors>
|
</interceptors>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Ajax Examples</title>
|
<title>Ajax Examples</title>
|
||||||
@@ -17,7 +16,7 @@
|
|||||||
|
|
||||||
Using a JSON list returned from an action (href="/JSONList.action"), without autoComplete (autoComplete="false"), use indicator, search substring (searchType="substring")
|
Using a JSON list returned from an action (href="/JSONList.action"), without autoComplete (autoComplete="false"), use indicator, search substring (searchType="substring")
|
||||||
<br/>
|
<br/>
|
||||||
<sx:autocompleter name="state" indicator="indicator1" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" searchType="substring"/>
|
<s:autocompleter name="state" theme="ajax" indicator="indicator1" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" searchType="substring"/>
|
||||||
<img id="indicator1" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
<img id="indicator1" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
@@ -25,7 +24,7 @@ Using a JSON list returned from an action (href="/JSONList.action"), without aut
|
|||||||
|
|
||||||
Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCout="3", it is "3" by default), without the down arrow button (showDownArrow="false")
|
Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCout="3", it is "3" by default), without the down arrow button (showDownArrow="false")
|
||||||
<br/>
|
<br/>
|
||||||
<sx:autocompleter indicator="indicator" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" loadOnTextChange="true" loadMinimumCount="3" showDownArrow="false"/>
|
<s:autocompleter name="state" theme="ajax" indicator="indicator" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" loadOnTextChange="true" loadMinimumCount="3" showDownArrow="false"/>
|
||||||
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
@@ -33,35 +32,35 @@ Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCout="3
|
|||||||
|
|
||||||
Using a JSON list returned from an action (href="/JSONList.action"), with autoComplete (autoComplete="true")
|
Using a JSON list returned from an action (href="/JSONList.action"), with autoComplete (autoComplete="true")
|
||||||
<br/>
|
<br/>
|
||||||
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" autoComplete="true" />
|
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="true" />
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
Using a local list (list="{'apple','banana','grape','pear'}")
|
Using a local list (list="{'apple','banana','grape','pear'}")
|
||||||
<br/>
|
<br/>
|
||||||
<sx:autocompleter list="{'apple','banana','grape','pear'}" cssStyle="width: 150px;"/>
|
<s:autocompleter theme="simple" list="{'apple','banana','grape','pear'}" cssStyle="width: 150px;"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
Force valid options (forceValidOption="true")
|
Force valid options (forceValidOption="true")
|
||||||
<br/>
|
<br/>
|
||||||
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" forceValidOption="true"/>
|
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" forceValidOption="true"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
Make dropdown's height to 180px (dropdownHeight="180")
|
Make dropdown's height to 180px (dropdownHeight="180")
|
||||||
<br/>
|
<br/>
|
||||||
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" dropdownHeight="180"/>
|
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" dropdownHeight="180"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
Disabled combobox (disabled="true")
|
Disabled combobox (disabled="true")
|
||||||
<br/>
|
<br/>
|
||||||
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" disabled="true"/>
|
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" disabled="true"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
@@ -72,9 +71,9 @@ Disabled combobox (disabled="true")
|
|||||||
Link two autocompleter elements. When the selected value in 'Autocompleter 1' changes, the available values in 'Autocompleter 2' will change also.
|
Link two autocompleter elements. When the selected value in 'Autocompleter 1' changes, the available values in 'Autocompleter 2' will change also.
|
||||||
<br/>
|
<br/>
|
||||||
<form id="selectForm">
|
<form id="selectForm">
|
||||||
<p>Autocompleter 1 <sx:autocompleter name="select" list="{'fruits','colors'}" value="colors" notifyTopics="/Changed" forceValidOption="true" id="sel"/></p>
|
<p>Autocompleter 1 <s:autocompleter theme="simple" name="select" list="{'fruits','colors'}" value="colors" notifyTopics="/Changed" forceValidOption="true" id="sel"/></p>
|
||||||
</form>
|
</form>
|
||||||
Autocompleter 2 <sx:autocompleter href="%{#autoex}" autoComplete="false" formId="selectForm" listenTopics="/Changed" forceValidOption="true" id="ops"/>
|
Autocompleter 2 <s:autocompleter theme="ajax" href="%{#autoex}" autoComplete="false" formId="selectForm" listenTopics="/Changed" forceValidOption="true" id="ops"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
<!--// START SNIPPET: common-include-->
|
<!--// START SNIPPET: common-include-->
|
||||||
<sx:head debug="true"/>
|
<s:head theme="ajax"/>
|
||||||
<!--// END SNIPPET: common-include-->
|
<!--// END SNIPPET: common-include-->
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Note: The Ajax tags are experimental. These examples have only been tested under
|
|||||||
<li><a href="tabbedpanel">Tabbed panel</a></li>
|
<li><a href="tabbedpanel">Tabbed panel</a></li>
|
||||||
<li><a href="widgets">Widgets </a> (may not work in all browsers!)
|
<li><a href="widgets">Widgets </a> (may not work in all browsers!)
|
||||||
see the <a href="http://www.dojotoolkit.org">dojo website</a> for more information</li>
|
see the <a href="http://www.dojotoolkit.org">dojo website</a> for more information</li>
|
||||||
<li>(broken) <a href="remoteforms">Remote forms</a></li>
|
<li><a href="remoteforms">Remote forms</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -34,19 +33,19 @@
|
|||||||
|
|
||||||
A submit button, with an indicator
|
A submit button, with an indicator
|
||||||
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
||||||
<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" indicator="indicator"/>
|
<s:submit type="submit" theme="ajax" value="submit" targets="t1" href="%{ajaxTest}" align="left" indicator="indicator"/>
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
A submit button, with "notifyTopics"
|
A submit button, with "notifyTopics"
|
||||||
<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" notifyTopics="/after"/>
|
<s:submit type="submit" theme="ajax" value="submit" targets="t1" href="%{ajaxTest}" align="left" notifyTopics="/after"/>
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
Use an image as submit
|
Use an image as submit
|
||||||
|
|
||||||
<sx:submit type="image" label="Alt Text" targets="t1"
|
<s:submit type="image" theme="ajax" label="Alt Text" targets="t1"
|
||||||
src="${pageContext.request.contextPath}/images/struts-power.gif" href="%{ajaxTest}" />
|
src="${pageContext.request.contextPath}/images/struts-power.gif" href="%{ajaxTest}" align="left" />
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<label for="textInput">Text to be echoed</label>
|
<label for="textInput">Text to be echoed</label>
|
||||||
@@ -55,7 +54,7 @@ Use an image as submit
|
|||||||
Use a button as submit (custom text)
|
Use a button as submit (custom text)
|
||||||
<s:form id="form" action="AjaxTest">
|
<s:form id="form" action="AjaxTest">
|
||||||
<input type=textbox name="data">
|
<input type=textbox name="data">
|
||||||
<sx:submit type="button" label="Update Content" targets="t1" id="ajaxbtn"/>
|
<s:submit type="button" theme="ajax" label="Update Content" targets="t1" id="ajaxbtn"/>
|
||||||
</s:form>
|
</s:form>
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -12,11 +11,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<sx:div
|
<s:div
|
||||||
id="once"
|
id="once"
|
||||||
|
theme="ajax"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{ajaxTest}">
|
href="%{ajaxTest}">
|
||||||
Initial Content</sx:div>
|
Initial Content</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -18,12 +17,13 @@
|
|||||||
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<sx:div
|
<s:div
|
||||||
id="once"
|
id="once"
|
||||||
|
theme="ajax"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
handler="handler">
|
handler="handler">
|
||||||
Initial Content</sx:div>
|
Initial Content</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -13,14 +12,15 @@
|
|||||||
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
||||||
|
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="once"
|
id="once"
|
||||||
|
theme="ajax"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
updateFreq="2000"
|
updateFreq="2000"
|
||||||
indicator="indicator"
|
indicator="indicator"
|
||||||
>
|
>
|
||||||
Initial Content</sx:div>
|
Initial Content</s:div>
|
||||||
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -13,13 +12,14 @@
|
|||||||
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
||||||
|
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="twoseconds"
|
id="twoseconds"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
|
theme="ajax"
|
||||||
delay="2000"
|
delay="2000"
|
||||||
updateFreq="%{#parameters.period}"
|
updateFreq="%{#parameters.period}"
|
||||||
errorText="There was an error">Initial Content</sx:div>
|
errorText="There was an error">Initial Content</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -12,14 +11,15 @@
|
|||||||
|
|
||||||
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="fiveseconds"
|
id="fiveseconds"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
|
theme="ajax"
|
||||||
delay="1000"
|
delay="1000"
|
||||||
updateFreq="5000"
|
updateFreq="5000"
|
||||||
errorText="There was an error"
|
errorText="There was an error"
|
||||||
loadingText="reloading">loading now</sx:div>
|
loadingText="reloading">loading now</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -12,13 +11,14 @@
|
|||||||
|
|
||||||
<s:url id="ajaxNoUrl" value="/AjaxNoUrl.jsp" />
|
<s:url id="ajaxNoUrl" value="/AjaxNoUrl.jsp" />
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="error"
|
id="error"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="/AjaxNoUrl.jsp"
|
href="/AjaxNoUrl.jsp"
|
||||||
|
theme="ajax"
|
||||||
delay="1000"
|
delay="1000"
|
||||||
errorText="Could not contact server"
|
errorText="Could not contact server"
|
||||||
loadingText="reloading">loading now</sx:div>
|
loadingText="reloading">loading now</s:div>
|
||||||
|
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -10,13 +9,14 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="error"
|
id="error"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="/AjaxNoUrl.jsp"
|
href="/AjaxNoUrl.jsp"
|
||||||
|
theme="ajax"
|
||||||
delay="1000"
|
delay="1000"
|
||||||
showErrorTransportText="true"
|
showErrorTransportText="true"
|
||||||
loadingText="reloading">loading now</sx:div>
|
loadingText="reloading">loading now</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -13,13 +12,14 @@
|
|||||||
<s:url id="test3" value="/Test3.action" />
|
<s:url id="test3" value="/Test3.action" />
|
||||||
|
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="error"
|
id="error"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{test3}"
|
href="%{test3}"
|
||||||
|
theme="ajax"
|
||||||
delay="1000"
|
delay="1000"
|
||||||
executeScripts="true"
|
executeScripts="true"
|
||||||
loadingText="reloading">loading now</sx:div>
|
loadingText="reloading">loading now</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -36,8 +35,9 @@
|
|||||||
|
|
||||||
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="once"
|
id="once"
|
||||||
|
theme="ajax"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
loadingText="Loading..."
|
loadingText="Loading..."
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
autoStart="true"
|
autoStart="true"
|
||||||
formId="form"
|
formId="form"
|
||||||
>
|
>
|
||||||
Initial Content</sx:div>
|
Initial Content</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -21,18 +20,11 @@
|
|||||||
dojo.event.topic.registerPublisher("/startTimer", controller, "start");
|
dojo.event.topic.registerPublisher("/startTimer", controller, "start");
|
||||||
dojo.event.topic.registerPublisher("/stopTimer", controller, "stop");
|
dojo.event.topic.registerPublisher("/stopTimer", controller, "stop");
|
||||||
|
|
||||||
dojo.event.topic.subscribe("/before", function(data, type, e){
|
|
||||||
alert('inside a topic event. before request');
|
|
||||||
//data : source element id
|
|
||||||
//type : "before"
|
|
||||||
//e : request object
|
|
||||||
});
|
|
||||||
|
|
||||||
dojo.event.topic.subscribe("/after", function(data, type, e){
|
dojo.event.topic.subscribe("/after", function(data, type, e){
|
||||||
alert('inside a topic event. after request');
|
alert('inside a topic event. type='+type);
|
||||||
//data : text returned
|
//data : text returned
|
||||||
//type : "load"
|
//type : "before", "load" or "error"
|
||||||
//e : undefined
|
//e : request object
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -43,8 +35,9 @@
|
|||||||
|
|
||||||
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
||||||
|
|
||||||
<sx:div
|
<s:div
|
||||||
id="div1"
|
id="once"
|
||||||
|
theme="ajax"
|
||||||
cssStyle="border: 1px solid yellow;"
|
cssStyle="border: 1px solid yellow;"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
listenTopics="/refresh"
|
listenTopics="/refresh"
|
||||||
@@ -52,10 +45,10 @@
|
|||||||
stopTimerListenTopics="/stopTimer"
|
stopTimerListenTopics="/stopTimer"
|
||||||
updateFreq="10000"
|
updateFreq="10000"
|
||||||
autoStart="false"
|
autoStart="false"
|
||||||
beforeNotifyTopics="/before"
|
afterLoading="alert('after request')"
|
||||||
afterNotifyTopics="/after"
|
notifyTopics="/after"
|
||||||
>
|
>
|
||||||
Initial Content</sx:div>
|
Initial Content</s:div>
|
||||||
|
|
||||||
<s:include value="../footer.jsp"/>
|
<s:include value="../footer.jsp"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -22,83 +21,89 @@
|
|||||||
Remote form replacing another div:<br/>
|
Remote form replacing another div:<br/>
|
||||||
|
|
||||||
<div id='two' style="border: 1px solid yellow;"><b>initial content</b></div>
|
<div id='two' style="border: 1px solid yellow;"><b>initial content</b></div>
|
||||||
<sx:form
|
<s:form
|
||||||
id='theForm2'
|
id='theForm2'
|
||||||
cssStyle="border: 1px solid green;"
|
cssStyle="border: 1px solid green;"
|
||||||
action='AjaxRemoteForm'
|
action='AjaxRemoteForm'
|
||||||
method='post'>
|
method='post'
|
||||||
|
theme="ajax">
|
||||||
|
|
||||||
<input type='text' name='data' value='Struts User'>
|
<input type='text' name='data' value='Struts User'>
|
||||||
|
|
||||||
<sx:submit value="GO2" theme="ajax" targets="two"/>
|
<s:submit value="GO2" theme="ajax" targets="two"/>
|
||||||
|
|
||||||
</sx:form>
|
</s:form>
|
||||||
|
|
||||||
|
|
||||||
Remote form replacing the forms content:<br/>
|
Remote form replacing the forms content:<br/>
|
||||||
<sx:form
|
<s:form
|
||||||
id='theForm3'
|
id='theForm3'
|
||||||
cssStyle="border: 1px solid green;"
|
cssStyle="border: 1px solid green;"
|
||||||
action='AjaxRemoteForm'
|
action='AjaxRemoteForm'
|
||||||
method='post'>
|
method='post'
|
||||||
|
theme="ajax">
|
||||||
|
|
||||||
<input type='text' name='data' value='Struts User'>
|
<input type='text' name='data' value='Struts User'>
|
||||||
|
|
||||||
<sx:submit value="GO3" targets="theForm3"/>
|
<s:submit value="GO3" theme="ajax" targets="theForm3"/>
|
||||||
|
|
||||||
</sx:form>
|
</s:form>
|
||||||
|
|
||||||
Remote form evaluating suplied JS on completion:<br/>
|
Remote form evaluating suplied JS on completion:<br/>
|
||||||
<sx:form
|
<s:form
|
||||||
id='theForm4'
|
id='theForm4'
|
||||||
cssStyle="border: 1px solid green;"
|
cssStyle="border: 1px solid green;"
|
||||||
action='AjaxRemoteForm'
|
action='AjaxRemoteForm'
|
||||||
method='post'>
|
method='post'
|
||||||
|
theme="ajax">
|
||||||
|
|
||||||
<input type='text' name='data' value='Struts User'>
|
<input type='text' name='data' value='Struts User'>
|
||||||
|
|
||||||
<sx:submit value="GO4" />
|
<s:submit value="GO4" theme="ajax"/>
|
||||||
|
|
||||||
</sx:form>
|
</s:form>
|
||||||
|
|
||||||
Remote form replacing the forms content after confirming results:<br/>
|
Remote form replacing the forms content after confirming results:<br/>
|
||||||
<sx:form
|
<s:form
|
||||||
id='theForm5'
|
id='theForm5'
|
||||||
cssStyle="border: 1px solid green;"
|
cssStyle="border: 1px solid green;"
|
||||||
action='AjaxRemoteForm'
|
action='AjaxRemoteForm'
|
||||||
method='post'>
|
method='post'
|
||||||
|
theme="ajax">
|
||||||
|
|
||||||
<input type='text' name='data' value='Struts User'>
|
<input type='text' name='data' value='Struts User'>
|
||||||
|
|
||||||
<sx:submit value="GO3" targets="theForm5" />
|
<s:submit value="GO3" theme="ajax" targets="theForm5" />
|
||||||
|
|
||||||
</sx:form>
|
</s:form>
|
||||||
|
|
||||||
Remote form replacing the forms content after running a function:<br/>
|
Remote form replacing the forms content after running a function:<br/>
|
||||||
<sx:form
|
<s:form
|
||||||
id='theForm6'
|
id='theForm6'
|
||||||
cssStyle="border: 1px solid green;"
|
cssStyle="border: 1px solid green;"
|
||||||
action='AjaxRemoteForm'
|
action='AjaxRemoteForm'
|
||||||
method='post'>
|
method='post'
|
||||||
|
theme="ajax">
|
||||||
|
|
||||||
<input type='text' name='data' value='Struts User'>
|
<input type='text' name='data' value='Struts User'>
|
||||||
|
|
||||||
<sx:submit value="GO3" targets="theForm6" />
|
<s:submit value="GO3" theme="ajax" targets="theForm6" />
|
||||||
|
|
||||||
</sx:form>
|
</s:form>
|
||||||
|
|
||||||
A form with no remote submit (so should not be ajaxified):<br/>
|
A form with no remote submit (so should not be ajaxified):<br/>
|
||||||
<sx:form
|
<s:form
|
||||||
id='theForm7'
|
id='theForm7'
|
||||||
cssStyle="border: 1px solid green;"
|
cssStyle="border: 1px solid green;"
|
||||||
action='AjaxRemoteForm'
|
action='AjaxRemoteForm'
|
||||||
method='post'>
|
method='post'
|
||||||
|
theme="ajax">
|
||||||
|
|
||||||
<input type='text' name='data' value='Struts User'>
|
<input type='text' name='data' value='Struts User'>
|
||||||
|
|
||||||
<sx:submit value="Go AWAY" targets="theForm7" />
|
<s:submit value="Go AWAY" targets="theForm7" />
|
||||||
|
|
||||||
</sx:form>
|
</s:form>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -14,32 +13,10 @@
|
|||||||
dojo.byId(widget.targetsArray[0]).innerHTML = "Done";
|
dojo.byId(widget.targetsArray[0]).innerHTML = "Done";
|
||||||
}
|
}
|
||||||
|
|
||||||
dojo.event.topic.subscribe("/before", function(data, type, e){
|
|
||||||
alert('inside a topic event. before request');
|
|
||||||
//data : source element id
|
|
||||||
//type : "before"
|
|
||||||
//e : request object
|
|
||||||
});
|
|
||||||
|
|
||||||
dojo.event.topic.subscribe("/after", function(data, type, e){
|
dojo.event.topic.subscribe("/after", function(data, type, e){
|
||||||
alert('inside a topic event. after request');
|
|
||||||
//data : text returned
|
|
||||||
//type : "load"
|
|
||||||
//e : undefined
|
|
||||||
});
|
|
||||||
|
|
||||||
dojo.event.topic.subscribe("/error", function(data, type, e){
|
|
||||||
alert('inside a topic event. on error');
|
|
||||||
//data : error object
|
|
||||||
//type : "error"
|
|
||||||
//e : undefined
|
|
||||||
});
|
|
||||||
|
|
||||||
dojo.event.topic.subscribe("/topics", function(data, type, e){
|
|
||||||
alert('inside a topic event. type='+type);
|
alert('inside a topic event. type='+type);
|
||||||
debugger;
|
|
||||||
//data : text returned
|
//data : text returned
|
||||||
//type : "before", "load", "error"
|
//type : "before", "load" or "error"
|
||||||
//e : request object
|
//e : request object
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -59,42 +36,44 @@
|
|||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<sx:a id="link1"
|
<s:a
|
||||||
|
theme="ajax"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
indicator="indicator"
|
indicator="indicator"
|
||||||
targets="t1,t2"
|
targets="t1,t2" notifyTopics="/after" >Update 'Div 1' and 'Div 2', publish topic '/after', use indicator</s:a>
|
||||||
beforeNotifyTopics="/before"
|
|
||||||
afterNotifyTopics="/after" >Update 'Div 1' and 'Div 2', publish topic '/before' and '/after', use indicator</sx:a>
|
|
||||||
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<sx:a id="link2"
|
<s:a id="link2"
|
||||||
|
theme="ajax"
|
||||||
href="/AjaxNoUrl.jsp"
|
href="/AjaxNoUrl.jsp"
|
||||||
errorText="Error Loading"
|
errorText="Error Loading"
|
||||||
targets="t1"
|
targets="t1">Try to update 'Div 1', use custom error message</s:a>
|
||||||
errorNotifyTopics="/error">Try to update 'Div 1', publish '/error', use custom error message</sx:a>
|
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<sx:a id="link3"
|
<s:a id="link3"
|
||||||
|
theme="ajax"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
loadingText="Loading!!!"
|
loadingText="Loading!!!"
|
||||||
targets="t1">Update 'Div 1', use custom loading message</sx:a>
|
targets="t1">Update 'Div 1', use custom loading message</s:a>
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<sx:a id="link4"
|
<s:a id="link4"
|
||||||
|
theme="ajax"
|
||||||
href="%{test3}"
|
href="%{test3}"
|
||||||
executeScripts="true"
|
executeScripts="true"
|
||||||
targets="t2">Update 'Div 2' and execute returned javascript </sx:a>
|
targets="t2">Update 'Div 2' and execute returned javascript </s:a>
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<sx:a id="link5"
|
<s:a id="link5"
|
||||||
|
theme="ajax"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
handler="handler"
|
handler="handler"
|
||||||
targets="t2">Update 'Div 2' using a custom handler </sx:a>
|
targets="t2">Update 'Div 2' using a custom handler </s:a>
|
||||||
|
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
@@ -107,11 +86,12 @@
|
|||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<sx:a id="link6"
|
<s:a id="link6"
|
||||||
|
theme="ajax"
|
||||||
href="%{ajaxTest}"
|
href="%{ajaxTest}"
|
||||||
targets="t2"
|
targets="t2"
|
||||||
formId="form"
|
formId="form"
|
||||||
>Update 'Div 2' with the content of the textbox </sx:a>
|
>Update 'Div 2' with the content of the textbox </s:a>
|
||||||
|
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Ajax examples - tabbled panel</title>
|
<title>Ajax examples - tabbled panel</title>
|
||||||
|
|
||||||
<jsp:include page="/ajax/commonInclude.jsp"/>
|
<jsp:include page="/ajax/commonInclude.jsp"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>">
|
||||||
|
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/niftycorners/niftyCorners.css"/>">
|
||||||
|
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/niftycorners/niftyPrint.css"/>" media="print">
|
||||||
|
<script type="text/javascript" src="<s:url value="/struts/niftycorners/nifty.js"/>"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
dojo.event.connect(window, "onload", function() {
|
||||||
|
if (!NiftyCheck())
|
||||||
|
return;
|
||||||
|
Rounded("li.tab_selected", "top", "white", "transparent", "border #ffffffS");
|
||||||
|
Rounded("li.tab_unselected", "top", "white", "transparent", "border #ffffffS");
|
||||||
|
// Rounded("div#tab_header_main li","top","white","transparent","border #ffffffS");
|
||||||
|
// "white" needs to be replaced with the background color
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
<s:url id="ajaxTest" value="/AjaxTest.action" />
|
||||||
@@ -16,81 +29,81 @@
|
|||||||
<table cellpadding="0" cellspacing="10" border="0" width="600">
|
<table cellpadding="0" cellspacing="10" border="0" width="600">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="top">
|
<td align="top">
|
||||||
<sx:tabbedpanel id="test" >
|
<s:tabbedPanel id="test" >
|
||||||
<sx:div id="one" label="one" >
|
<s:div id="one" label="one" theme="ajax">
|
||||||
This is the first pane<br/>
|
This is the first pane<br/>
|
||||||
<s:form>
|
<s:form>
|
||||||
<s:textfield name="tt" label="Test Text"/> <br/>
|
<s:textfield name="tt" label="Test Text"/> <br/>
|
||||||
<s:textfield name="tt2" label="Test Text2"/>
|
<s:textfield name="tt2" label="Test Text2"/>
|
||||||
</s:form>
|
</s:form>
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div id="two" label="two" >
|
<s:div id="two" label="two" theme="ajax">
|
||||||
This is the second panel
|
This is the second panel
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div id="three" label="three" >
|
<s:div id="three" label="three" theme="ajax">
|
||||||
This is the three
|
This is the three
|
||||||
</sx:div>
|
</s:div>
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</td>
|
</td>
|
||||||
<td align="top">
|
<td align="top">
|
||||||
<sx:tabbedpanel id="test2" >
|
<s:tabbedPanel id="test2" >
|
||||||
<sx:div id="left" label="left" >
|
<s:div id="left" label="left" theme="ajax">
|
||||||
This is the left pane<br/>
|
This is the left pane<br/>
|
||||||
<s:form>
|
<s:form>
|
||||||
<s:textfield name="tt" label="Test Text"/> <br/>
|
<s:textfield name="tt" label="Test Text"/> <br/>
|
||||||
<s:textfield name="tt2" label="Test Text2"/>
|
<s:textfield name="tt2" label="Test Text2"/>
|
||||||
</s:form>
|
</s:form>
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div href="%{ajaxTest}" id="ryh1"
|
<s:div href="%{ajaxTest}" id="ryh1" theme="ajax"
|
||||||
label="remote one"></sx:div>
|
label="remote one"></s:div>
|
||||||
<sx:div id="middle" label="middle" >
|
<s:div id="middle" label="middle" theme="ajax">
|
||||||
middle tab<br/>
|
middle tab<br/>
|
||||||
<s:form>
|
<s:form>
|
||||||
<s:textfield name="tt" label="Test Text44"/> <br/>
|
<s:textfield name="tt" label="Test Text44"/> <br/>
|
||||||
<s:textfield name="tt2" label="Test Text442"/>
|
<s:textfield name="tt2" label="Test Text442"/>
|
||||||
</s:form>
|
</s:form>
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div href="%{ajaxTest}" id="ryh21" label="remote right"/>
|
<s:div href="%{ajaxTest}" id="ryh21" theme="ajax" label="remote right"/>
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="top">
|
<td align="top">
|
||||||
<sx:tabbedpanel id="testremote">
|
<s:tabbedPanel id="testremote">
|
||||||
<sx:div href="%{ajaxTest}" id="r1" label="remote one">
|
<s:div href="%{ajaxTest}" id="r1" theme="ajax" label="remote one">
|
||||||
<s:action name="AjaxTest" executeResult="true" />
|
<s:action name="AjaxTest" executeResult="true" />
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div href="%{ajaxTest}" id="r2" label="remote two"></sx:div>
|
<s:div href="%{ajaxTest}" id="r2" theme="ajax" label="remote two"></s:div>
|
||||||
<sx:div href="%{ajaxTest}" id="r3" label="remote three"></sx:div>
|
<s:div href="%{ajaxTest}" id="r3" theme="ajax" label="remote three"></s:div>
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</td>
|
</td>
|
||||||
<td align="top">
|
<td align="top">
|
||||||
<sx:tabbedpanel id="test3" >
|
<s:tabbedPanel id="test3" >
|
||||||
<sx:div id="left1" label="out one" >
|
<s:div id="left1" label="out one" theme="ajax">
|
||||||
Outer one<br/>
|
Outer one<br/>
|
||||||
<sx:tabbedpanel id="test11">
|
<s:tabbedPanel id="test11">
|
||||||
<sx:div id="i11" label="inner 1 one">Inner 1</sx:div>
|
<s:div id="i11" label="inner 1 one">Inner 1</s:div>
|
||||||
<sx:div id="112" label="inner 1 two">Inner 2</sx:div>
|
<s:div id="112" label="inner 1 two">Inner 2</s:div>
|
||||||
<sx:div id="i13" label="inner 1 three">Inner 3</sx:div>
|
<s:div id="i13" label="inner 1 three">Inner 3</s:div>
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div id="middle1" label="out two" >
|
<s:div id="middle1" label="out two" theme="ajax">
|
||||||
Outer two<br/>
|
Outer two<br/>
|
||||||
<sx:tabbedpanel id="test12" >
|
<s:tabbedPanel id="test12" >
|
||||||
<sx:div id="i21" label="inner 2 one" >Inner 21</sx:div>
|
<s:div id="i21" label="inner 2 one" theme="ajax">Inner 21</s:div>
|
||||||
<sx:div id="122" label="inner 2 two" >Inner 22</sx:div>
|
<s:div id="122" label="inner 2 two" theme="ajax">Inner 22</s:div>
|
||||||
<sx:div id="i23" label="inner 2 three" >Inner 23</sx:div>
|
<s:div id="i23" label="inner 2 three" theme="ajax">Inner 23</s:div>
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div id="right1" label="out three" >
|
<s:div id="right1" label="out three" theme="ajax">
|
||||||
Outer three<br/>
|
Outer three<br/>
|
||||||
<sx:tabbedpanel id="test13">
|
<s:tabbedPanel id="test13">
|
||||||
<sx:div id="i31" label="inner 3 one" >Inner 31</sx:div>
|
<s:div id="i31" label="inner 3 one" theme="ajax">Inner 31</s:div>
|
||||||
<sx:div id="132" label="inner 3 two" >Inner 32</sx:div>
|
<s:div id="132" label="inner 3 two" theme="ajax">Inner 32</s:div>
|
||||||
<sx:div id="i33" label="inner 3 three" >Inner 33</sx:div>
|
<s:div id="i33" label="inner 3 three" theme="ajax">Inner 33</s:div>
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</sx:div>
|
</s:div>
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,25 +1,27 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Ajax examples - tabbled panel</title>
|
<title>Ajax examples - tabbled panel</title>
|
||||||
|
|
||||||
<jsp:include page="/ajax/commonInclude.jsp"/>
|
<jsp:include page="/ajax/commonInclude.jsp"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true">
|
<s:tabbedPanel id="test2" theme="simple" cssStyle="width: 500px; height: 300px;" doLayout="true">
|
||||||
<sx:div id="left" label="test1" >
|
<s:div id="left" label="test1" theme="ajax" >
|
||||||
I'm a Tab!!!
|
I'm a Tab!!!
|
||||||
</sx:div >
|
</s:div >
|
||||||
<sx:div id="middle" label="test2" >
|
<s:div id="middle" label="test2" theme="ajax" >
|
||||||
I'm the other Tab!!!
|
I'm the other Tab!!!
|
||||||
</sx:div >
|
</s:div >
|
||||||
|
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -31,24 +30,24 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="top">
|
<td align="top">
|
||||||
<!--// START SNIPPET: tabbedpanel-tag-->
|
<!--// START SNIPPET: tabbedpanel-tag-->
|
||||||
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true">
|
<s:tabbedPanel id="test2" theme="simple" cssStyle="width: 500px; height: 300px;" doLayout="true">
|
||||||
<sx:div id="left" label="left">
|
<s:div theme="ajax" id="left" label="left">
|
||||||
This is the left pane<br/>
|
This is the left pane<br/>
|
||||||
<s:form >
|
<s:form >
|
||||||
<s:textfield name="tt" label="Test Text" /> <br/>
|
<s:textfield name="tt" label="Test Text" /> <br/>
|
||||||
<s:textfield name="tt2" label="Test Text2" />
|
<s:textfield name="tt2" label="Test Text2" />
|
||||||
</s:form>
|
</s:form>
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div href="%{ajaxTest}" id="ryh1" label="remote one" />
|
<s:div theme="ajax" href="%{ajaxTest}" id="ryh1" label="remote one" />
|
||||||
<sx:div id="middle" label="middle">
|
<s:div theme="ajax" id="middle" label="middle">
|
||||||
middle tab<br/>
|
middle tab<br/>
|
||||||
<s:form >
|
<s:form >
|
||||||
<s:textfield name="tt" label="Test Text44" /> <br/>
|
<s:textfield name="tt" label="Test Text44" /> <br/>
|
||||||
<s:textfield name="tt2" label="Test Text442" />
|
<s:textfield name="tt2" label="Test Text442" />
|
||||||
</s:form>
|
</s:form>
|
||||||
</sx:div>
|
</s:div>
|
||||||
<sx:div href="%{ajaxTest}" id="ryh21" label="remote right" />
|
<s:div theme="ajax" href="%{ajaxTest}" id="ryh21" label="remote right" />
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
<!--// END SNIPPET: tabbedpanel-tag-->
|
<!--// END SNIPPET: tabbedpanel-tag-->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Example 4</title>
|
<title>Example 4</title>
|
||||||
<jsp:include page="/ajax/commonInclude.jsp"/>
|
<jsp:include page="/ajax/commonInclude.jsp"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<s:url id="panel1url" action="panel1" namespace="/nodecorate" />
|
<s:url id="panel1url" action="panel1" namespace="/nodecorate" />
|
||||||
<s:url id="panel2url" action="panel2" namespace="/nodecorate" />
|
<s:url id="panel2url" action="panel2" namespace="/nodecorate" />
|
||||||
<s:url id="panel3url" action="panel3" namespace="/nodecorate" />
|
<s:url id="panel3url" action="panel3" namespace="/nodecorate" />
|
||||||
<sx:tabbedpanel id="tabbedpanel" >
|
<s:tabbedPanel id="tabbedpanel" >
|
||||||
<sx:div id="panel1" label="Panel1" href="%{#panel1url}" />
|
<s:div id="panel1" label="Panel1" href="%{#panel1url}" theme="ajax" />
|
||||||
<sx:div id="panel2" label="Panel2" href="%{#panel2url}" />
|
<s:div id="panel2" label="Panel2" href="%{#panel2url}" theme="ajax" />
|
||||||
<sx:div id="panel3" label="Panel3" href="%{#panel3url}" />
|
<s:div id="panel3" label="Panel3" href="%{#panel3url}" theme="ajax" />
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,27 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Ajax examples - tabbled panel</title>
|
<title>Ajax examples - tabbled panel</title>
|
||||||
|
|
||||||
<jsp:include page="/ajax/commonInclude.jsp"/>
|
<jsp:include page="/ajax/commonInclude.jsp"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true" closeButton="pane" labelposition="bottom">
|
<s:tabbedPanel id="test2" theme="simple" cssStyle="width: 500px; height: 300px;" doLayout="true" closeButton="pane" labelposition="bottom">
|
||||||
<sx:div id="left" label="test1" theme="ajax" >
|
<s:div id="left" label="test1" theme="ajax" >
|
||||||
I'm a Tab!!!
|
I'm a Tab!!!
|
||||||
</sx:div >
|
</s:div >
|
||||||
<sx:div id="middle" label="test2" theme="ajax" >
|
<s:div id="middle" label="test2" theme="ajax" >
|
||||||
I'm the other Tab!!!
|
I'm the other Tab!!!
|
||||||
</sx:div >
|
</s:div >
|
||||||
|
|
||||||
</sx:tabbedpanel>
|
</s:tabbedPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div id="result">
|
<div id="result">
|
||||||
</div>
|
</div>
|
||||||
<@sx.form action="panel2Submit" namespace="/nodecorate">
|
<@s.form action="panel2Submit" namespace="/nodecorate" theme="ajax">
|
||||||
<@s.textfield label="Name" name="name" />
|
<@s.textfield label="Name" name="name" theme="ajax" />
|
||||||
<@sx.submit targets="result" />
|
<@s.submit theme="ajax" resultDivId="result" />
|
||||||
</@sx.form>
|
</@s.form>
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<!-- START SNIPPET: example -->
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<#list actionMessages as msg>
|
|
||||||
${msg}
|
|
||||||
</#list>
|
|
||||||
|
|
||||||
<@s.form action="guess" method="post">
|
|
||||||
<@s.textfield label="Guess" name="guess"/>
|
|
||||||
<@s.submit value="Guess"/>
|
|
||||||
</@s.form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<!-- END SNIPPET: example -->
|
|
||||||
@@ -11,8 +11,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<s:url id="url" action="customFreemarkerManagerDemo" namespace="/freemarker" />
|
<s:url id="url" action="customFreemarkerManagerDemo" namespace="/freemarker" />
|
||||||
<s:a href="%{#url}">Demo of usage of a Custom Freemarker Manager</s:a>
|
<s:a href="%{#url}">Demo of usage of a Custom Freemarker Manager</s:a>
|
||||||
</li>
|
<p/>
|
||||||
<li>
|
|
||||||
<s:url id="url" action="standardTags" namespace="/freemarker" />
|
<s:url id="url" action="standardTags" namespace="/freemarker" />
|
||||||
<s:a href="%{#url}">Demo of Standard Struts Freemarker Tags</s:a>
|
<s:a href="%{#url}">Demo of Standard Struts Freemarker Tags</s:a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<@s.url id="url" action="hangmanAjax" namespace="/hangman" />
|
<@s.url id="url" action="hangmanAjax" namespace="/hangman" />
|
||||||
<@s.a href="%{#url}">Hangman (Ajax - Experimental)</@s.a>
|
(broken) <@s.a href="%{#url}">Hangman (Ajax - Experimental)</@s.a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -52,15 +52,6 @@
|
|||||||
<li><a href="<s:url value="/validation/index.jsp"/>">Validation</a></li>
|
<li><a href="<s:url value="/validation/index.jsp"/>">Validation</a></li>
|
||||||
<li class="last"><a href="<s:url value="/help.jsp"/>">Help</a></li>
|
<li class="last"><a href="<s:url value="/help.jsp"/>">Help</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Sandbox</h2>
|
|
||||||
<p>
|
|
||||||
These examples are under development and may not be fully operational.
|
|
||||||
</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<s:url action="guess" namespace="/continuations" />">Continuations</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,25 +1,23 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>UI Tags Example</title>
|
<title>UI Tags Example</title>
|
||||||
<sx:head />
|
<s:head />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table>
|
<table>
|
||||||
<sx:datetimepicker label="toggleType='wipe'" value="2006-10-31" toggleType="wipe" toggleDuration="300" name="test"/>
|
<s:datetimepicker label="toggleType='wipe'" value="2006-10-31" toggleType="wipe" toggleDuration="300" name="test"/>
|
||||||
<sx:datetimepicker label="toggleType='explode'" value="2006-07-22" toggleType="explode" toggleDuration="500"/>
|
<s:datetimepicker label="toggleType='explode'" value="2006-07-22" toggleType="explode" toggleDuration="500"/>
|
||||||
<sx:datetimepicker label="toggleType='fade'" value="2006-06-30" toggleType="fade" toggleDuration="500"/>
|
<s:datetimepicker label="toggleType='fade'" value="2006-06-30" toggleType="fade" toggleDuration="500"/>
|
||||||
<sx:datetimepicker label="With value='today'" name="dddp1" value="today" />
|
<s:datetimepicker label="With value='today'" name="dddp1" value="today" />
|
||||||
<sx:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
|
<s:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
|
||||||
<sx:datetimepicker label="US format with initial date of 2006-06-26" name="dddp3" value="2006-06-26" language="en-us" />
|
<s:datetimepicker label="US format with initial date of 2006-06-26" name="dddp3" value="2006-06-26" language="en-us" />
|
||||||
<sx:datetimepicker label="With initial date of 1969-04-25 and a custom format dd/MM/yyyy" name="dddp5" value="25/04/1969" displayFormat="dd/MM/yyyy" />
|
<s:datetimepicker label="With initial date of 1969-04-25 and a custom format dd/MM/yyyy" name="dddp5" value="25/04/1969" displayFormat="dd/MM/yyyy" />
|
||||||
<sx:datetimepicker label="In German" name="dddp7" value="2006-06-28" language="de" />
|
<s:datetimepicker label="In German" name="dddp7" value="2006-06-28" language="de" />
|
||||||
<sx:datetimepicker label="In Dutch" name="dddp8" value="2006-06-28" language="nl" />
|
<s:datetimepicker label="In Dutch" name="dddp8" value="2006-06-28" language="nl" />
|
||||||
<sx:datetimepicker label="US format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp12" value="2006-06-26" formatLength="long" language="en-us" />
|
<s:datetimepicker label="US format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp12" value="2006-06-26" formatLength="long" language="en-us" />
|
||||||
<sx:datetimepicker label="German format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp13" value="2006-06-26" formatLength="long" language="de" />
|
<s:datetimepicker label="German format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp13" value="2006-06-26" formatLength="long" language="de" />
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>UI Tags Example</title>
|
<title>UI Tags Example</title>
|
||||||
<sx:head/>
|
<s:head/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -21,7 +19,7 @@
|
|||||||
name="name"
|
name="name"
|
||||||
tooltip="Enter your Name here" />
|
tooltip="Enter your Name here" />
|
||||||
|
|
||||||
<sx:datetimepicker
|
<s:datetimepicker
|
||||||
tooltip="Select Your Birthday"
|
tooltip="Select Your Birthday"
|
||||||
label="Birthday"
|
label="Birthday"
|
||||||
name="birthday" />
|
name="birthday" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<%@taglib prefix="s" uri="/struts-tags" %>
|
<%@taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
request.setAttribute("decorator", "none");
|
request.setAttribute("decorator", "none");
|
||||||
|
|||||||
@@ -1,22 +1,20 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>UI Tags Example</title>
|
<title>UI Tags Example</title>
|
||||||
<sx:head />
|
<s:head />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table>
|
<table>
|
||||||
<sx:datetimepicker label="toggleType='wipe'" type="time" value="10:30" toggleType="wipe" toggleDuration="300"/>
|
<s:datetimepicker label="toggleType='wipe'" type="time" value="10:30" toggleType="wipe" toggleDuration="300"/>
|
||||||
<sx:datetimepicker label="toggleType='explode'" type="time" value="13:00" toggleType="explode" toggleDuration="500"/>
|
<s:datetimepicker label="toggleType='explode'" type="time" value="13:00" toggleType="explode" toggleDuration="500"/>
|
||||||
<sx:datetimepicker label="toggleType='fade'" type="time" value="13:00" toggleType="fade" toggleDuration="500"/>
|
<s:datetimepicker label="toggleType='fade'" type="time" value="13:00" toggleType="fade" toggleDuration="500"/>
|
||||||
<sx:datetimepicker label="With value='today'" name="dddp4" type="time" value="today" />
|
<s:datetimepicker label="With value='today'" name="dddp4" type="time" value="today" />
|
||||||
<sx:datetimepicker label="US format, empty" name="dddp5" type="time" language="en-us" />
|
<s:datetimepicker label="US format, empty" name="dddp5" type="time" language="en-us" />
|
||||||
<sx:datetimepicker label="US format, 13:00 hours" name="dddp6" type="time" value="13:00" language="en-us" />
|
<s:datetimepicker label="US format, 13:00 hours" name="dddp6" type="time" value="13:00" language="en-us" />
|
||||||
<sx:datetimepicker label="In German" name="dddp7" type="time" value="13:00" language="de" />
|
<s:datetimepicker label="In German" name="dddp7" type="time" value="13:00" language="de" />
|
||||||
<sx:datetimepicker label="In Dutch" name="dddp8" type="time" value="13:00" language="nl" />
|
<s:datetimepicker label="In Dutch" name="dddp8" type="time" value="13:00" language="nl" />
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<%@taglib prefix="s" uri="/struts-tags" %>
|
<%@taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Showcase - UI Tag Example - Tree Example (Dynamic)</title>
|
<title>Showcase - UI Tag Example - Tree Example (Dynamic)</title>
|
||||||
<sx:head/>
|
<s:head theme="ajax" debug="true" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@@ -28,13 +27,14 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style="float:left; margin-right: 50px;">
|
<div style="float:left; margin-right: 50px;">
|
||||||
<sx:tree
|
<s:tree
|
||||||
|
theme="ajax"
|
||||||
rootNode="%{treeRootNode}"
|
rootNode="%{treeRootNode}"
|
||||||
childCollectionProperty="children"
|
childCollectionProperty="children"
|
||||||
nodeIdProperty="id"
|
nodeIdProperty="id"
|
||||||
nodeTitleProperty="name"
|
nodeTitleProperty="name"
|
||||||
treeSelectedTopic="treeSelected">
|
treeSelectedTopic="treeSelected">
|
||||||
</sx:tree>
|
</s:tree>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="displayId">
|
<div id="displayId">
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<%@taglib prefix="s" uri="/struts-tags" %>
|
<%@taglib prefix="s" uri="/struts-tags" %>
|
||||||
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Showcase - UI Tag Example - Tree Example (Static)</title>
|
<title>Showcase - UI Tag Example - Tree Example (Static)</title>
|
||||||
<sx:head />
|
<s:head theme="ajax" debug="true" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@@ -26,21 +25,21 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style="float:left; margin-right: 50px;">
|
<div style="float:left; margin-right: 50px;">
|
||||||
<sx:tree label="parent" id="parentId" templateCssPath="/struts/tree.css"
|
<s:tree label="parent" id="parentId" theme="ajax" templateCssPath="/struts/tree.css"
|
||||||
showRootGrid="true" showGrid="true" treeSelectedTopic="treeSelected">
|
showRootGrid="true" showGrid="true" treeSelectedTopic="treeSelected">
|
||||||
<sx:treenode label="child1" id="child1Id">
|
<s:treenode theme="ajax" label="child1" id="child1Id">
|
||||||
<sx:treenode label="grandchild1" id="grandchild1Id"/>
|
<s:treenode theme="ajax" label="grandchild1" id="grandchild1Id"/>
|
||||||
<sx:treenode label="grandchild2" id="grandchild2Id"/>
|
<s:treenode theme="ajax" label="grandchild2" id="grandchild2Id"/>
|
||||||
<sx:treenode label="grandchild3" id="grandchild3Id"/>
|
<s:treenode theme="ajax" label="grandchild3" id="grandchild3Id"/>
|
||||||
</sx:treenode>
|
</s:treenode>
|
||||||
<sx:treenode label="child2" id="child2Id"/>
|
<s:treenode theme="ajax" label="child2" id="child2Id"/>
|
||||||
<sx:treenode label="child3" id="child3Id"/>
|
<s:treenode theme="ajax" label="child3" id="child3Id"/>
|
||||||
<sx:treenode label="child4" id="child4Id"/>
|
<s:treenode theme="ajax" label="child4" id="child4Id"/>
|
||||||
<sx:treenode label="child5" id="child5Id">
|
<s:treenode theme="ajax" label="child5" id="child5Id">
|
||||||
<sx:treenode label="gChild1" id="gChild1Id"/>
|
<s:treenode theme="ajax" label="gChild1" id="gChild1Id"/>
|
||||||
<sx:treenode label="gChild2" id="gChild2Id"/>
|
<s:treenode theme="ajax" label="gChild2" id="gChild2Id"/>
|
||||||
</sx:treenode>
|
</s:treenode>
|
||||||
</sx:tree>
|
</s:tree>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-3
@@ -33,7 +33,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-parent</artifactId>
|
<artifactId>struts2-parent</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
@@ -155,12 +155,13 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-api</artifactId>
|
<artifactId>struts2-core</artifactId>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-core</artifactId>
|
<artifactId>struts2-codebehind-plugin</artifactId>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -200,6 +201,12 @@
|
|||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.struts</groupId>
|
||||||
|
<artifactId>struts2-spring-plugin</artifactId>
|
||||||
|
<version>${version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-sitegraph-plugin</artifactId>
|
<artifactId>struts2-sitegraph-plugin</artifactId>
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/struts2-core-2.0.4.jar -destjar struts2-core-j4-2.0.4.jar
|
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/struts2-core-2.0.6.jar -destjar struts2-core-j4-2.0.6.jar
|
||||||
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/struts2-api-2.0.4.jar -destjar struts2-api-j4-2.0.4.jar
|
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/xwork-2.0.1.jar -destjar xwork-j4-2.0.1.jar
|
||||||
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/xwork-2.0.0.jar -destjar xwork-j4-2.0.0.jar
|
|
||||||
|
|||||||
+1
-7
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-parent</artifactId>
|
<artifactId>struts2-parent</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.apache.struts</groupId>
|
<groupId>org.apache.struts</groupId>
|
||||||
<artifactId>struts2-core</artifactId>
|
<artifactId>struts2-core</artifactId>
|
||||||
@@ -255,12 +255,6 @@
|
|||||||
<version>2.0.1</version>
|
<version>2.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--<dependency>-->
|
|
||||||
<!--<groupId>org.apache.struts</groupId>-->
|
|
||||||
<!--<artifactId>struts2-api</artifactId>-->
|
|
||||||
<!--<version>${pom.version}</version>-->
|
|
||||||
<!--</dependency>-->
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>freemarker</groupId>
|
<groupId>freemarker</groupId>
|
||||||
<artifactId>freemarker</artifactId>
|
<artifactId>freemarker</artifactId>
|
||||||
|
|||||||
+32
-59
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: AbstractRemoteCallUIBean.java 508285 2007-02-16 02:42:24Z musachy $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright 2006 The Apache Software Foundation.
|
* Copyright 2006 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
@@ -15,14 +15,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.components;
|
package org.apache.struts2.components;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.ClosingUIBean;
|
|
||||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
@@ -30,10 +28,18 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* AbstractRemoteCallUIBean is superclass for all components dealing with remote
|
* AbstractRemoteCallUIBean is superclass for all components dealing with remote
|
||||||
* calls.
|
* calls.
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* TODO: Document AbstractRemoteCallUIBean.
|
||||||
|
*
|
||||||
|
* @author $Author$
|
||||||
|
* @version $Revision$ $Date$
|
||||||
|
*/
|
||||||
public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements RemoteUICallBean {
|
public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements RemoteUICallBean {
|
||||||
|
|
||||||
protected String href;
|
protected String href;
|
||||||
protected String errorText;
|
protected String errorText;
|
||||||
|
protected String afterLoading;
|
||||||
|
protected String beforeLoading;
|
||||||
protected String executeScripts;
|
protected String executeScripts;
|
||||||
protected String loadingText;
|
protected String loadingText;
|
||||||
protected String listenTopics;
|
protected String listenTopics;
|
||||||
@@ -44,9 +50,6 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
|
|||||||
protected String showErrorTransportText;
|
protected String showErrorTransportText;
|
||||||
protected String indicator;
|
protected String indicator;
|
||||||
protected String showLoadingText;
|
protected String showLoadingText;
|
||||||
protected String beforeNotifyTopics;
|
|
||||||
protected String afterNotifyTopics;
|
|
||||||
protected String errorNotifyTopics;
|
|
||||||
|
|
||||||
public AbstractRemoteCallUIBean(ValueStack stack, HttpServletRequest request,
|
public AbstractRemoteCallUIBean(ValueStack stack, HttpServletRequest request,
|
||||||
HttpServletResponse response) {
|
HttpServletResponse response) {
|
||||||
@@ -62,6 +65,10 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
|
|||||||
addParameter("errorText", findString(errorText));
|
addParameter("errorText", findString(errorText));
|
||||||
if (loadingText != null)
|
if (loadingText != null)
|
||||||
addParameter("loadingText", findString(loadingText));
|
addParameter("loadingText", findString(loadingText));
|
||||||
|
if (afterLoading != null)
|
||||||
|
addParameter("afterLoading", findString(afterLoading));
|
||||||
|
if (beforeLoading != null)
|
||||||
|
addParameter("beforeLoading", findString(beforeLoading));
|
||||||
if (executeScripts != null)
|
if (executeScripts != null)
|
||||||
addParameter("executeScripts", findValue(executeScripts, Boolean.class));
|
addParameter("executeScripts", findValue(executeScripts, Boolean.class));
|
||||||
if (listenTopics != null)
|
if (listenTopics != null)
|
||||||
@@ -82,24 +89,8 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
|
|||||||
addParameter("showErrorTransportText", true);
|
addParameter("showErrorTransportText", true);
|
||||||
if (showLoadingText != null)
|
if (showLoadingText != null)
|
||||||
addParameter("showLoadingText", findString(showLoadingText));
|
addParameter("showLoadingText", findString(showLoadingText));
|
||||||
if (beforeNotifyTopics != null)
|
|
||||||
addParameter("beforeNotifyTopics", findString(beforeNotifyTopics));
|
|
||||||
if (afterNotifyTopics != null)
|
|
||||||
addParameter("afterNotifyTopics", findString(afterNotifyTopics));
|
|
||||||
if (errorNotifyTopics != null)
|
|
||||||
addParameter("errorNotifyTopics", findString(errorNotifyTopics));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@StrutsTagSkipInheritance
|
|
||||||
public void setTheme(String theme) {
|
|
||||||
super.setTheme(theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTheme() {
|
|
||||||
return "ajax";
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Topic that will trigger the remote call")
|
@StrutsTagAttribute(description="Topic that will trigger the remote call")
|
||||||
public void setListenTopics(String listenTopics) {
|
public void setListenTopics(String listenTopics) {
|
||||||
@@ -117,6 +108,23 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
|
|||||||
this.errorText = errorText;
|
this.errorText = errorText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.apache.struts2.components.RemoteUICallBean#setAfterLoading(java.lang.String)
|
||||||
|
*/
|
||||||
|
public void setAfterLoading(String afterLoading) {
|
||||||
|
this.afterLoading = afterLoading;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.apache.struts2.components.RemoteUICallBean#setBeforeLoading(java.lang.String)
|
||||||
|
*/
|
||||||
|
public void setBeforeLoading(String beforeLoading) {
|
||||||
|
this.beforeLoading = beforeLoading;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false")
|
@StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false")
|
||||||
public void setExecuteScripts(String executeScripts) {
|
public void setExecuteScripts(String executeScripts) {
|
||||||
this.executeScripts = executeScripts;
|
this.executeScripts = executeScripts;
|
||||||
@@ -144,7 +152,7 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
|
|||||||
this.formId = formId;
|
this.formId = formId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors")
|
@StrutsTagAttribute(description="Topics that will published when the remote call completes")
|
||||||
public void setNotifyTopics(String notifyTopics) {
|
public void setNotifyTopics(String notifyTopics) {
|
||||||
this.notifyTopics = notifyTopics;
|
this.notifyTopics = notifyTopics;
|
||||||
}
|
}
|
||||||
@@ -164,39 +172,4 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
|
|||||||
public void setShowLoadingText(String showLoadingText) {
|
public void setShowLoadingText(String showLoadingText) {
|
||||||
this.showLoadingText = showLoadingText;
|
this.showLoadingText = showLoadingText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css class to use for element")
|
|
||||||
public void setCssClass(String cssClass) {
|
|
||||||
super.setCssClass(cssClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css style to use for element")
|
|
||||||
public void setCssStyle(String cssStyle) {
|
|
||||||
super.setCssStyle(cssStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The id to use for the element")
|
|
||||||
public void setId(String id) {
|
|
||||||
super.setId(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The name to set for element")
|
|
||||||
public void setName(String name) {
|
|
||||||
super.setName(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)")
|
|
||||||
public void setAfterNotifyTopics(String afterNotifyTopics) {
|
|
||||||
this.afterNotifyTopics = afterNotifyTopics;
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request")
|
|
||||||
public void setBeforeNotifyTopics(String beforeNotifyTopics) {
|
|
||||||
this.beforeNotifyTopics = beforeNotifyTopics;
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)")
|
|
||||||
public void setErrorNotifyTopics(String errorNotifyTopics) {
|
|
||||||
this.errorNotifyTopics = errorNotifyTopics;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -31,28 +31,108 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
/**
|
/**
|
||||||
* <!-- START SNIPPET: javadoc -->
|
* <!-- START SNIPPET: javadoc -->
|
||||||
*
|
*
|
||||||
* A tag that creates a HTML <a >.<p/>
|
* A tag that creates a HTML <a href='' /> that when clicked calls a URL remote XMLHttpRequest call via the dojo
|
||||||
|
* framework.<p/>
|
||||||
|
*
|
||||||
|
* <!-- START SNIPPET: ajaxJavadoc -->
|
||||||
|
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
|
||||||
|
* <ul>
|
||||||
|
* <li>href</li>
|
||||||
|
* <li>errorText</li>
|
||||||
|
* <li>listenTopics</li>
|
||||||
|
* <li>notifyTopics</li>
|
||||||
|
* <li>executeScripts</li>
|
||||||
|
* <li>loadingText</li>
|
||||||
|
* <li>listenTopics</li>
|
||||||
|
* <li>handler</li>
|
||||||
|
* <li>formId</li>
|
||||||
|
* <li>formFilter</li>
|
||||||
|
* <li>targets</li>
|
||||||
|
* <li>showErrorTransportText</li>
|
||||||
|
* <li>targets</li>
|
||||||
|
* <li>indicator</li>
|
||||||
|
* </ul>
|
||||||
|
* 'resultDivId' Deprecated. Use targets.<p/>
|
||||||
|
* 'targets' is a list of element ids whose content will be updated with the
|
||||||
|
* text returned from request.<p/>
|
||||||
|
* 'errorText' is the text that will be displayed when there is an error making the request.<p/>
|
||||||
|
* 'onLoadJS' Deprecated. Use 'notifyTopics'.<p/>
|
||||||
|
* 'preInvokeJS' Deprecated. Use 'notifyTopics'.<p/>
|
||||||
|
* 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
|
||||||
|
* 'loadingText' is the text that will be displayed on the 'targets' elements while making the
|
||||||
|
* request.<p/>
|
||||||
|
* '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).<p/>
|
||||||
|
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
|
||||||
|
* in the request.<p/>
|
||||||
|
* '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.<p/>
|
||||||
|
* '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')</p>
|
||||||
|
* 'showLoadingText' show loading text on targets</p>
|
||||||
|
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
|
||||||
|
* <ul>
|
||||||
|
* <li>data: html or json object when type='load' or type='error'</li>
|
||||||
|
* <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
|
||||||
|
* <li>request: request javascript object, when type='load' or type='error'</li>
|
||||||
|
* </ul>
|
||||||
* <!-- END SNIPPET: javadoc -->
|
* <!-- END SNIPPET: javadoc -->
|
||||||
*
|
*
|
||||||
* <p/> <b>Examples</b>
|
* <p/> <b>Examples</b>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* <!-- START SNIPPET: example1 -->
|
* <!-- START SNIPPET: example1 -->
|
||||||
* <s:a id="link1" theme="ajax" href="/DoIt.action">
|
* <s:a id="link1" theme="ajax" href="/DoIt.action" errorText="An error ocurred" loadingText="Loading...">
|
||||||
* <img border="none" src="<%=request.getContextPath()%>/images/delete.gif"/>
|
* <img border="none" src="<%=request.getContextPath()%>/images/delete.gif"/>
|
||||||
* <s:param name="id" value="1"/>
|
* <s:param name="id" value="1"/>
|
||||||
* </s:a>
|
* </s:a>
|
||||||
* <!-- END SNIPPET: example1 -->
|
* <!-- END SNIPPET: example1 -->
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <!-- START SNIPPET: exampledescription1 -->
|
||||||
|
*
|
||||||
|
* Results in
|
||||||
|
*
|
||||||
|
* <!-- END SNIPPET: exampledescription1 -->
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example2 -->
|
||||||
|
* <a dojoType="BindAnchor" executeScripts="true" id="link1" href="/DoIt.action?id=1" errorText="An error ocurred"></a>
|
||||||
|
* <!-- END SNIPPET: example2 -->
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <!-- START SNIPPET: exampledescription2 -->
|
||||||
|
*
|
||||||
|
* Here is an example that uses the beforeLoading. This example is in altSyntax=true:
|
||||||
|
*
|
||||||
|
* <!-- END SNIPPET: exampledescription2 -->
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example3 -->
|
||||||
|
* <s:a id="test" theme="ajax" href="/simpeResult.action" beforeLoading="confirm('Are you sure?')">
|
||||||
|
* A
|
||||||
|
* </s:a>
|
||||||
|
* <!-- END SNIPPET: example3 -->
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@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")
|
@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 ClosingUIBean {
|
public class Anchor extends AbstractRemoteCallUIBean {
|
||||||
public static final String OPEN_TEMPLATE = "a";
|
public static final String OPEN_TEMPLATE = "a";
|
||||||
public static final String TEMPLATE = "a-close";
|
public static final String TEMPLATE = "a-close";
|
||||||
public static final String COMPONENT_NAME = Anchor.class.getName();
|
public static final String COMPONENT_NAME = Anchor.class.getName();
|
||||||
|
|
||||||
protected String href;
|
protected String targets;
|
||||||
|
|
||||||
public Anchor(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
|
public Anchor(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
|
||||||
super(stack, request, response);
|
super(stack, request, response);
|
||||||
@@ -69,12 +149,23 @@ public class Anchor extends ClosingUIBean {
|
|||||||
public void evaluateExtraParams() {
|
public void evaluateExtraParams() {
|
||||||
super.evaluateExtraParams();
|
super.evaluateExtraParams();
|
||||||
|
|
||||||
if (href != null)
|
if(targets != null)
|
||||||
addParameter("href", findString(href));
|
addParameter("targets", findString(targets));
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The URL.")
|
@StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated")
|
||||||
public void setHref(String href) {
|
public void setTargets(String targets) {
|
||||||
this.href = href;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+44
-42
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: Autocompleter.java 510785 2007-02-23 03:05:33Z musachy $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,15 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.components;
|
package org.apache.struts2.components;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.ComboBox;
|
|
||||||
import org.apache.struts2.views.annotations.StrutsTag;
|
import org.apache.struts2.views.annotations.StrutsTag;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
@@ -35,8 +33,48 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* <p>The autocomplete tag is a combobox that can autocomplete text entered on the input box.
|
* <p>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 "simple" theme, the autocompleter can be used like the ComboBox.
|
||||||
* When used on the "ajax" theme, the list can be retieved from an action. </p>
|
* When used on the "ajax" theme, the list can be retieved from an action. </p>
|
||||||
|
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
|
||||||
|
* <ul>
|
||||||
|
* <li>href</li>
|
||||||
|
* <li>errorText</li>
|
||||||
|
* <li>listenTopics</li>
|
||||||
|
* <li>notifyTopics</li>
|
||||||
|
* <li>listenTopics</li>
|
||||||
|
* <li>formId</li>
|
||||||
|
* <li>formFilter</li>
|
||||||
|
* <li>indicator</li>
|
||||||
|
* <li>loadOnTextChange</li>
|
||||||
|
* <li>loadMinimumCount</li>
|
||||||
|
* <li>showDownArrow</li>
|
||||||
|
* <li>searchType</li>
|
||||||
|
* </ul>
|
||||||
|
* 'dropdownWidth' width in pixels of the drodpdown, same as autocompleter's width by default<p/>
|
||||||
|
* 'dropdownHeight' height in pixels of the drodown, 120 px by default<p/>
|
||||||
|
* 'forceValidOption' if invalid option is selected, clear autocompleter's text when focus is lost<p/>
|
||||||
|
* 'autoComplete', if true, make suggestions on the textbox<p/>
|
||||||
|
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
|
||||||
|
* in the request.<p/>
|
||||||
|
* '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.<p/>
|
||||||
|
* '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')<p/>
|
||||||
|
* 'loadOnTextChange' options will be reloaded everytime a character is typed on the textbox<p/>
|
||||||
|
* 'loadMinimumCount' minimum number of characters that will force the content to be loaded<p/>
|
||||||
|
* 'showDownError' show or hide the down arrow button<p/>
|
||||||
|
* 'searchType' how the search must be performed, options are: "startstring", "startword" and "substring"<p/>
|
||||||
|
* 'keyName' name of the field to which the selected key will be assigned<p/>
|
||||||
|
* 'iconPath' path of icon used for the dropdown<p/>
|
||||||
|
* 'templateCssPath' path to css file used to customize Dojo's widget<p/>
|
||||||
|
* 'dataFieldName' name of the field to be used as the list in the returned JSON string<p/>
|
||||||
|
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
|
||||||
|
* <ul>
|
||||||
|
* <li>data: selected value when type='valuechanged'</li>
|
||||||
|
* <li>type: 'before' before the request is made, 'valuechanged' when selection changes, 'load' when the request succeeds, or 'error' when it fails</li>
|
||||||
|
* <li>request: request javascript object, when type='load' or type='error'</li>
|
||||||
|
* <ul>
|
||||||
*<!-- END SNIPPET: javadoc -->
|
*<!-- END SNIPPET: javadoc -->
|
||||||
*
|
|
||||||
*<!-- START SNIPPET: example -->
|
*<!-- START SNIPPET: example -->
|
||||||
*<p>Autocompleter that gets its list from an action:</p>
|
*<p>Autocompleter that gets its list from an action:</p>
|
||||||
*<s:autocompleter name="test" href="%{jsonList}" autoComplete="false"/>
|
*<s:autocompleter name="test" href="%{jsonList}" autoComplete="false"/>
|
||||||
@@ -46,7 +84,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
*<br/>
|
*<br/>
|
||||||
*<!-- END SNIPPET: example -->
|
*<!-- END SNIPPET: example -->
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities")
|
@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities")
|
||||||
public class Autocompleter extends ComboBox {
|
public class Autocompleter extends ComboBox {
|
||||||
public static final String TEMPLATE = "autocompleter";
|
public static final String TEMPLATE = "autocompleter";
|
||||||
final private static String COMPONENT_NAME = Autocompleter.class.getName();
|
final private static String COMPONENT_NAME = Autocompleter.class.getName();
|
||||||
@@ -146,17 +184,6 @@ public class Autocompleter extends ComboBox {
|
|||||||
addParameter("key", findString(keyNameExpr));
|
addParameter("key", findString(keyNameExpr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@StrutsTagSkipInheritance
|
|
||||||
public void setTheme(String theme) {
|
|
||||||
super.setTheme(theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTheme() {
|
|
||||||
return "ajax";
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Object findListValue() {
|
protected Object findListValue() {
|
||||||
return (list != null) ? findValue(list, Object.class) : null;
|
return (list != null) ? findValue(list, Object.class) : null;
|
||||||
}
|
}
|
||||||
@@ -267,29 +294,4 @@ public class Autocompleter extends ComboBox {
|
|||||||
public void setDataFieldName(String dataFieldName) {
|
public void setDataFieldName(String dataFieldName) {
|
||||||
this.dataFieldName = dataFieldName;
|
this.dataFieldName = dataFieldName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css class to use for element")
|
|
||||||
public void setCssClass(String cssClass) {
|
|
||||||
super.setCssClass(cssClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css style to use for element")
|
|
||||||
public void setCssStyle(String cssStyle) {
|
|
||||||
super.setCssStyle(cssStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The id to use for the element")
|
|
||||||
public void setId(String id) {
|
|
||||||
super.setId(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The name to set for element")
|
|
||||||
public void setName(String name) {
|
|
||||||
super.setName(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Preset the value of input element")
|
|
||||||
public void setValue(String arg0) {
|
|
||||||
super.setValue(arg0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+3
-21
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: DateTimePicker.java 512580 2007-02-28 02:48:06Z musachy $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.components;
|
package org.apache.struts2.components;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -29,10 +29,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.struts2.components.UIBean;
|
|
||||||
import org.apache.struts2.views.annotations.StrutsTag;
|
import org.apache.struts2.views.annotations.StrutsTag;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
@@ -127,7 +125,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker")
|
@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker")
|
||||||
public class DateTimePicker extends UIBean {
|
public class DateTimePicker extends UIBean {
|
||||||
|
|
||||||
final public static String TEMPLATE = "datetimepicker";
|
final public static String TEMPLATE = "datetimepicker";
|
||||||
@@ -213,17 +211,6 @@ public class DateTimePicker extends UIBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@StrutsTagSkipInheritance
|
|
||||||
public void setTheme(String theme) {
|
|
||||||
super.setTheme(theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTheme() {
|
|
||||||
return "ajax";
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," +
|
@StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," +
|
||||||
" 42 day format is used", type="Boolean", defaultValue="false")
|
" 42 day format is used", type="Boolean", defaultValue="false")
|
||||||
public void setAdjustWeeks(String adjustWeeks) {
|
public void setAdjustWeeks(String adjustWeeks) {
|
||||||
@@ -302,11 +289,6 @@ public class DateTimePicker extends UIBean {
|
|||||||
this.templateCssPath = templateCssPath;
|
this.templateCssPath = templateCssPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Preset the value of input element")
|
|
||||||
public void setValue(String arg0) {
|
|
||||||
super.setValue(arg0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private String format(Object obj) {
|
private String format(Object obj) {
|
||||||
if(obj == null)
|
if(obj == null)
|
||||||
return null;
|
return null;
|
||||||
@@ -24,22 +24,102 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.views.annotations.StrutsTag;
|
import org.apache.struts2.views.annotations.StrutsTag;
|
||||||
|
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <!-- START SNIPPET: javadoc -->
|
* <!-- START SNIPPET: javadoc -->
|
||||||
* Creates an HTML <div>
|
* 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.
|
||||||
|
* <p>
|
||||||
|
* It creates a HTML <DIV /> that obtains it's content via a remote XMLHttpRequest call via
|
||||||
|
* the dojo framework.
|
||||||
|
* </p>
|
||||||
|
* <div>
|
||||||
|
* <!-- START SNIPPET: ajaxJavadoc -->
|
||||||
|
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
|
||||||
|
* <ul>
|
||||||
|
* <li>href</li>
|
||||||
|
* <li>errorText</li>
|
||||||
|
* <li>afterLoading</li>
|
||||||
|
* <li>executeScripts</li>
|
||||||
|
* <li>loadingText</li>
|
||||||
|
* <li>listenTopics</li>
|
||||||
|
* <li>handler</li>
|
||||||
|
* <li>formId</li>
|
||||||
|
* <li>formFilter</li>
|
||||||
|
* <li>targets</li>
|
||||||
|
* <li>notifyTopics</li>
|
||||||
|
* <li>showErrorTransportText</li>
|
||||||
|
* <li>indicator</li>
|
||||||
|
* </ul>
|
||||||
|
* 'targets' is a list of element ids whose content will be updated with the
|
||||||
|
* text returned from request.<p/>
|
||||||
|
* 'href' needs to be set as an url tag reference value.<p/>
|
||||||
|
* 'errorText' is the text that will be displayed when there is an error making the request.<p/>
|
||||||
|
* 'afterLoading' Deprecated. Use 'notifyTopics'.<p/>
|
||||||
|
* 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
|
||||||
|
* 'loadingText' is the text that will be displayed on the 'targets' elements while making the
|
||||||
|
* request.<p/>
|
||||||
|
* '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).<p/>
|
||||||
|
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
|
||||||
|
* in the request.<p/>
|
||||||
|
* '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.<p/>
|
||||||
|
* 'updateFreq' sets(in milliseconds) the update interval.<p/>
|
||||||
|
* 'autoStart' if set to true(true by default) starts the timer automatically<p/>
|
||||||
|
* 'startTimerListenTopics' is a comma-separated list of topics used to start the timer<p/>
|
||||||
|
* 'stopTimerListenTopics' is a comma-separated list of topics used to stop the timer<p/>
|
||||||
|
* 'listenTopics' comma separated list of topics names, that will trigger a request<p/>
|
||||||
|
* 'indicator' element to be shown while the request executing<p/>
|
||||||
|
* 'showErrorTransportText': whether errors should be displayed (on 'targets')</p>
|
||||||
|
* 'showLoadingText' show loading text on targets</p>
|
||||||
|
* 'separateScript' Run scripts in a separate scope, unique for each Div<p/>
|
||||||
|
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
|
||||||
|
* <ul>
|
||||||
|
* <li>data: html or json object when type='load' or type='error'</li>
|
||||||
|
* <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
|
||||||
|
* <li>request: request javascript object, when type='load' or type='error'</li>
|
||||||
|
* </ul>
|
||||||
* <!-- END SNIPPET: javadoc -->
|
* <!-- END SNIPPET: javadoc -->
|
||||||
|
* </div><p> <b>Examples</b>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example -->
|
||||||
|
* <s:url id="url" action="AjaxTest" />
|
||||||
|
* <s:div
|
||||||
|
* id="once"
|
||||||
|
* theme="ajax"
|
||||||
|
* href="%{url}"
|
||||||
|
* loadingText="Loading..."
|
||||||
|
* listenTopics="/refresh"
|
||||||
|
* updateFreq="3000"
|
||||||
|
* autoStart="true"
|
||||||
|
* formId="form"
|
||||||
|
*></s:div>
|
||||||
|
* <!-- END SNIPPET: example -->
|
||||||
|
* </pre>
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="div", tldTagClass="org.apache.struts2.views.jsp.ui.DivTag", description="Render HTML div providing content from remote call via AJAX")
|
@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 ClosingUIBean {
|
public class Div extends AbstractRemoteCallUIBean {
|
||||||
|
|
||||||
public static final String TEMPLATE = "div";
|
public static final String TEMPLATE = "div";
|
||||||
public static final String TEMPLATE_CLOSE = "div-close";
|
public static final String TEMPLATE_CLOSE = "div-close";
|
||||||
public static final String COMPONENT_NAME = Div.class.getName();
|
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) {
|
public Div(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
|
||||||
super(stack, request, response);
|
super(stack, request, response);
|
||||||
}
|
}
|
||||||
@@ -51,4 +131,63 @@ public class Div extends ClosingUIBean {
|
|||||||
protected String getDefaultTemplate() {
|
protected String getDefaultTemplate() {
|
||||||
return TEMPLATE_CLOSE;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,18 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
/**
|
/**
|
||||||
* <!-- START SNIPPET: javadoc -->
|
* <!-- START SNIPPET: javadoc -->
|
||||||
*
|
*
|
||||||
* Renders parts of the HEAD section for an HTML file. Encoding can be set using this tag.
|
* Renders parts of the HEAD section for an HTML file. This is useful as some themes require certain CSS and JavaScript
|
||||||
|
* includes.<p/>
|
||||||
|
*
|
||||||
|
* If, for example, your page has ajax components integrated, without having the default theme set to ajax, you might
|
||||||
|
* want to use the head tag with <b>theme="ajax"</b> so that the typical ajax header setup will be included in the
|
||||||
|
* page.<p/>
|
||||||
|
*
|
||||||
|
* The tag also includes the option to set a custom datepicker theme if needed. See calendarcss parameter for
|
||||||
|
* description for details.<p/>
|
||||||
|
*
|
||||||
|
* If you use the ajax theme you can turn a debug flag on by setting the debug parameter to <tt>true</tt>.
|
||||||
|
*
|
||||||
* <!-- END SNIPPET: javadoc -->
|
* <!-- END SNIPPET: javadoc -->
|
||||||
*
|
*
|
||||||
* <p/> <b>Examples</b>
|
* <p/> <b>Examples</b>
|
||||||
@@ -47,12 +58,32 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* <!-- END SNIPPET: example1 -->
|
* <!-- END SNIPPET: example1 -->
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example2 -->
|
||||||
|
* <head>
|
||||||
|
* <title>My page</title>
|
||||||
|
* <s:head theme="ajax" calendarcss="calendar-green"/>
|
||||||
|
* </head>
|
||||||
|
* <!-- END SNIPPET: example2 -->
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example3 -->
|
||||||
|
* <head>
|
||||||
|
* <title>My page</title>
|
||||||
|
* <s:head theme="ajax" debug="true"/>
|
||||||
|
* </head>
|
||||||
|
* <!-- END SNIPPET: example3 -->
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="head", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.ui.HeadTag",
|
@StrutsTag(name="head", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.ui.HeadTag",
|
||||||
description="Render a chunk of HEAD for your HTML file")
|
description="Render a chunk of HEAD for your HTML file")
|
||||||
public class Head extends UIBean {
|
public class Head extends UIBean {
|
||||||
public static final String TEMPLATE = "head";
|
public static final String TEMPLATE = "head";
|
||||||
|
|
||||||
|
private String calendarcss = "calendar-blue.css";
|
||||||
|
private boolean debug;
|
||||||
private String encoding;
|
private String encoding;
|
||||||
|
|
||||||
public Head(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
|
public Head(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
|
||||||
@@ -71,6 +102,39 @@ public class Head extends UIBean {
|
|||||||
public void evaluateParams() {
|
public void evaluateParams() {
|
||||||
super.evaluateParams();
|
super.evaluateParams();
|
||||||
|
|
||||||
addParameter("encoding", encoding);
|
if (calendarcss != null) {
|
||||||
|
String css = findString(calendarcss);
|
||||||
|
if (css != null && css.trim().length() > 0) {
|
||||||
|
if (css.lastIndexOf(".css") < 0) {
|
||||||
|
addParameter("calendarcss", css + ".css");
|
||||||
|
} else {
|
||||||
|
addParameter("calendarcss", css);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
addParameter("encoding", encoding);
|
||||||
|
addParameter("debug", Boolean.valueOf(debug).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCalendarcss() {
|
||||||
|
return calendarcss;
|
||||||
|
}
|
||||||
|
|
||||||
|
@StrutsTagAttribute(description="The jscalendar css theme to use", defaultValue="calendar-blue.css")
|
||||||
|
public void setCalendarcss(String calendarcss) {
|
||||||
|
//TODO remove this one
|
||||||
|
this.calendarcss = calendarcss;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDebug() {
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
@StrutsTagAttribute(description="Set to true to enable debugging mode for AJAX themes")
|
||||||
|
public void setDebug(boolean debug) {
|
||||||
|
this.debug = debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.apache.struts2.StrutsException;
|
|||||||
|
|
||||||
import com.opensymphony.xwork2.ActionContext;
|
import com.opensymphony.xwork2.ActionContext;
|
||||||
import com.opensymphony.xwork2.LocaleProvider;
|
import com.opensymphony.xwork2.LocaleProvider;
|
||||||
|
import com.opensymphony.xwork2.TextProviderSupport;
|
||||||
import com.opensymphony.xwork2.TextProviderFactory;
|
import com.opensymphony.xwork2.TextProviderFactory;
|
||||||
import com.opensymphony.xwork2.util.LocalizedTextUtil;
|
import com.opensymphony.xwork2.util.LocalizedTextUtil;
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|||||||
+4
-11
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: RemoteUICallBean.java 508285 2007-02-16 02:42:24Z musachy $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.components;
|
package org.apache.struts2.components;
|
||||||
|
|
||||||
|
|
||||||
public interface RemoteUICallBean {
|
public interface RemoteUICallBean {
|
||||||
@@ -31,11 +31,9 @@ public interface RemoteUICallBean {
|
|||||||
|
|
||||||
void setErrorText(String errorText);
|
void setErrorText(String errorText);
|
||||||
|
|
||||||
void setAfterNotifyTopics(String afterNotifyTopics);
|
void setAfterLoading(String afterLoading);
|
||||||
|
|
||||||
void setBeforeNotifyTopics(String beforeNotifyTopics);
|
void setBeforeLoading(String beforeLoading);
|
||||||
|
|
||||||
void setErrorNotifyTopics(String errorNotifyTopics);
|
|
||||||
|
|
||||||
void setExecuteScripts(String executeScripts);
|
void setExecuteScripts(String executeScripts);
|
||||||
|
|
||||||
@@ -53,9 +51,4 @@ public interface RemoteUICallBean {
|
|||||||
|
|
||||||
void setIndicator(String indicator);
|
void setIndicator(String indicator);
|
||||||
|
|
||||||
void setName(String name);
|
|
||||||
|
|
||||||
void setCssStyle(String style);
|
|
||||||
|
|
||||||
void setCssClass(String cssClass);
|
|
||||||
}
|
}
|
||||||
@@ -44,13 +44,125 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* Please note that the button type has advantages by adding the possibility to seperate the submitted value from the
|
* 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
|
* text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0
|
||||||
* <!-- END SNIPPET: javadoc -->
|
* <!-- END SNIPPET: javadoc -->
|
||||||
|
*
|
||||||
|
* <p/> <b>Examples</b>
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example -->
|
||||||
|
* <s:submit value="%{'Submit'}" />
|
||||||
|
* <!-- END SNIPPET: example -->
|
||||||
|
* </pre>
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example2 -->
|
||||||
|
* Render an image submit:
|
||||||
|
* <s:submit type="image" value="%{'Submit'}" label="Submit the form" src="submit.gif"/>
|
||||||
|
* <!-- END SNIPPET: example2 -->
|
||||||
|
* </pre>
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: example3 -->
|
||||||
|
* Render an button submit:
|
||||||
|
* <s:submit type="button" value="%{'Submit'}" label="Submit the form"/>
|
||||||
|
* <!-- END SNIPPET: example3 -->
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <!-- START SNIPPET: ajaxJavadoc -->
|
||||||
|
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
|
||||||
|
* <ul>
|
||||||
|
* <li>href</li>
|
||||||
|
* <li>errorText</li>
|
||||||
|
* <li>listenTopics</li>
|
||||||
|
* <li>notifyTopics</li>
|
||||||
|
* <li>executeScripts</li>
|
||||||
|
* <li>loadingText</li>
|
||||||
|
* <li>listenTopics</li>
|
||||||
|
* <li>handler</li>
|
||||||
|
* <li>formId</li>
|
||||||
|
* <li>formFilter</li>
|
||||||
|
* <li>targets</li>
|
||||||
|
* <li>showErrorTransportText</li>
|
||||||
|
* <li>targets</li>
|
||||||
|
* <li>indicator</li>
|
||||||
|
* </ul>
|
||||||
|
* 'resultDivId' Deprecated. Use targets.</p>
|
||||||
|
* 'targets' is a list of element ids whose content will be updated with the
|
||||||
|
* text returned from request.<p/>
|
||||||
|
* 'errorText' is the text that will be displayed when there is an error making the request.<p/>
|
||||||
|
* 'onLoadJS' Deprecated. Use 'notifyTopics'.<p/>
|
||||||
|
* 'preInvokeJS' Deprecated. Use 'notifyTopics'.<p/>
|
||||||
|
* 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
|
||||||
|
* 'loadingText' is the text that will be displayed on the 'targets' elements while making the
|
||||||
|
* request.<p/>
|
||||||
|
* '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).<p/>
|
||||||
|
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
|
||||||
|
* in the request.<p/>
|
||||||
|
* '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.<p/>
|
||||||
|
* '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')</p>
|
||||||
|
* 'showLoadingText' show loading text on targets</p>
|
||||||
|
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
|
||||||
|
* <ul>
|
||||||
|
* <li>data: html or json object when type='load' or type='error'</li>
|
||||||
|
* <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
|
||||||
|
* <li>request: request javascript object, when type='load' or type='error'</li>
|
||||||
|
* </ul>
|
||||||
|
* <!-- END SNIPPET: ajaxJavadoc -->
|
||||||
|
*
|
||||||
|
* <!-- START SNIPPET: ajxExDescription1 -->
|
||||||
|
* 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:
|
||||||
|
* <!-- END SNIPPET: ajxExDescription1 -->
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <!-- START SNIPPET: ajxExample1 -->
|
||||||
|
* Remote form replacing another div:
|
||||||
|
* <div id='two' style="border: 1px solid yellow;">Initial content</div>
|
||||||
|
* <s:form
|
||||||
|
* id='theForm2'
|
||||||
|
* cssStyle="border: 1px solid green;"
|
||||||
|
* action='/AjaxRemoteForm.action'
|
||||||
|
* method='post'
|
||||||
|
* theme="ajax">
|
||||||
|
*
|
||||||
|
* <input type='text' name='data' value='Struts User' />
|
||||||
|
* <s:submit value="GO2" theme="ajax" resultDivId="two" />
|
||||||
|
*
|
||||||
|
* </s:form >
|
||||||
|
* <!-- END SNIPPET: ajxExample1 -->
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="submit", tldTagClass="org.apache.struts2.views.jsp.ui.SubmitTag", description="Render a submit button")
|
@StrutsTag(name="submit", tldTagClass="org.apache.struts2.views.jsp.ui.SubmitTag", description="Render a submit button")
|
||||||
public class Submit extends FormButton {
|
public class Submit extends FormButton implements RemoteUICallBean{
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(Submit.class);
|
private static final Log LOG = LogFactory.getLog(Submit.class);
|
||||||
|
|
||||||
final public static String TEMPLATE = "submit";
|
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 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) {
|
public Submit(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
|
||||||
super(stack, request, response);
|
super(stack, request, response);
|
||||||
@@ -75,8 +187,36 @@ public class Submit extends FormButton {
|
|||||||
public void evaluateExtraParams() {
|
public void evaluateExtraParams() {
|
||||||
super.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)
|
if (src != null)
|
||||||
addParameter("src", findString(src));
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,11 +228,6 @@ public class Submit extends FormButton {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="Supply an image src for <i>image</i> type submit button. Will have no effect for types <i>input</i> and <i>button</i>.")
|
|
||||||
public void setSrc(String src) {
|
|
||||||
this.src = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides to be able to render body in a template rather than always before the template
|
* Overrides to be able to render body in a template rather than always before the template
|
||||||
*/
|
*/
|
||||||
@@ -111,4 +246,93 @@ public class Submit extends FormButton {
|
|||||||
|
|
||||||
return false;
|
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. <b>This tag will usually use the ajax theme.</b>")
|
||||||
|
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 <i>image</i> type submit button. Will have no effect for types <i>input</i> and <i>button</i>.")
|
||||||
|
public void setSrc(String src) {
|
||||||
|
this.src = src;
|
||||||
|
}
|
||||||
|
|
||||||
|
@StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated")
|
||||||
|
public void setTargets(String targets) {
|
||||||
|
this.targets = targets;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@StrutsTagAttribute(description="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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-18
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: TabbedPanel.java 508575 2007-02-16 20:46:49Z musachy $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,15 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.components;
|
package org.apache.struts2.components;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.ClosingUIBean;
|
|
||||||
import org.apache.struts2.views.annotations.StrutsTag;
|
import org.apache.struts2.views.annotations.StrutsTag;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
@@ -43,7 +41,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* <!-- END SNIPPET: exdesc -->
|
* <!-- END SNIPPET: exdesc -->
|
||||||
* <pre>
|
* <pre>
|
||||||
* <!-- START SNIPPET: example -->
|
* <!-- START SNIPPET: example -->
|
||||||
* <s:tabbedpanel id="test" >
|
* <s:tabbedPanel id="test" >
|
||||||
* <s:div id="one" label="one" theme="ajax" labelposition="top" >
|
* <s:div id="one" label="one" theme="ajax" labelposition="top" >
|
||||||
* This is the first pane<br/>
|
* This is the first pane<br/>
|
||||||
* <s:form>
|
* <s:form>
|
||||||
@@ -54,12 +52,12 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
|
* <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
|
||||||
* This is the remote tab
|
* This is the remote tab
|
||||||
* </s:div>
|
* </s:div>
|
||||||
* </s:tabbedpanel>
|
* </s:tabbedPanel>
|
||||||
* <!-- END SNIPPET: example -->
|
* <!-- END SNIPPET: example -->
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="tabbedpanel", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.")
|
@StrutsTag(name="tabbedPanel", tldTagClass="org.apache.struts2.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.")
|
||||||
public class TabbedPanel extends ClosingUIBean {
|
public class TabbedPanel extends ClosingUIBean {
|
||||||
public static final String TEMPLATE = "tabbedpanel";
|
public static final String TEMPLATE = "tabbedpanel";
|
||||||
public static final String TEMPLATE_CLOSE = "tabbedpanel-close";
|
public static final String TEMPLATE_CLOSE = "tabbedpanel-close";
|
||||||
@@ -96,17 +94,6 @@ public class TabbedPanel extends ClosingUIBean {
|
|||||||
addParameter("templateCssPath", findString(templateCssPath));
|
addParameter("templateCssPath", findString(templateCssPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@StrutsTagSkipInheritance
|
|
||||||
public void setTheme(String theme) {
|
|
||||||
super.setTheme(theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTheme() {
|
|
||||||
return "ajax";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDefaultOpenTemplate() {
|
public String getDefaultOpenTemplate() {
|
||||||
return TEMPLATE;
|
return TEMPLATE;
|
||||||
}
|
}
|
||||||
+3
-36
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: Tree.java 497654 2007-01-19 00:21:57Z rgielen $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,17 +18,15 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.components;
|
package org.apache.struts2.components;
|
||||||
|
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.ClosingUIBean;
|
|
||||||
import org.apache.struts2.views.annotations.StrutsTag;
|
import org.apache.struts2.views.annotations.StrutsTag;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
@@ -69,7 +67,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="tree", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeTag", description="Render a tree widget.")
|
@StrutsTag(name="tree", tldTagClass="org.apache.struts2.views.jsp.ui.TreeTag", description="Render a tree widget.")
|
||||||
public class Tree extends ClosingUIBean {
|
public class Tree extends ClosingUIBean {
|
||||||
|
|
||||||
private static final String TEMPLATE = "tree-close";
|
private static final String TEMPLATE = "tree-close";
|
||||||
@@ -213,17 +211,6 @@ public class Tree extends ClosingUIBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@StrutsTagSkipInheritance
|
|
||||||
public void setTheme(String theme) {
|
|
||||||
super.setTheme(theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTheme() {
|
|
||||||
return "ajax";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDefaultOpenTemplate() {
|
public String getDefaultOpenTemplate() {
|
||||||
return OPEN_TEMPLATE;
|
return OPEN_TEMPLATE;
|
||||||
}
|
}
|
||||||
@@ -442,25 +429,5 @@ public class Tree extends ClosingUIBean {
|
|||||||
public void setShowGrid(String showGrid) {
|
public void setShowGrid(String showGrid) {
|
||||||
this.showGrid = showGrid;
|
this.showGrid = showGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css class to use for element")
|
|
||||||
public void setCssClass(String cssClass) {
|
|
||||||
super.setCssClass(cssClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css style to use for element")
|
|
||||||
public void setCssStyle(String cssStyle) {
|
|
||||||
super.setCssStyle(cssStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The id to use for the element")
|
|
||||||
public void setId(String id) {
|
|
||||||
super.setId(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The name to set for element")
|
|
||||||
public void setName(String name) {
|
|
||||||
super.setName(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+3
-36
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: TreeNode.java 497654 2007-01-19 00:21:57Z rgielen $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,15 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.components;
|
package org.apache.struts2.components;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.ClosingUIBean;
|
|
||||||
import org.apache.struts2.views.annotations.StrutsTag;
|
import org.apache.struts2.views.annotations.StrutsTag;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||||
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
@@ -81,7 +79,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.")
|
@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.")
|
||||||
public class TreeNode extends ClosingUIBean {
|
public class TreeNode extends ClosingUIBean {
|
||||||
private static final String TEMPLATE = "treenode-close";
|
private static final String TEMPLATE = "treenode-close";
|
||||||
private static final String OPEN_TEMPLATE = "treenode";
|
private static final String OPEN_TEMPLATE = "treenode";
|
||||||
@@ -90,17 +88,6 @@ public class TreeNode extends ClosingUIBean {
|
|||||||
super(stack, request, response);
|
super(stack, request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@StrutsTagSkipInheritance
|
|
||||||
public void setTheme(String theme) {
|
|
||||||
super.setTheme(theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTheme() {
|
|
||||||
return "ajax";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDefaultOpenTemplate() {
|
public String getDefaultOpenTemplate() {
|
||||||
return OPEN_TEMPLATE;
|
return OPEN_TEMPLATE;
|
||||||
}
|
}
|
||||||
@@ -113,24 +100,4 @@ public class TreeNode extends ClosingUIBean {
|
|||||||
public void setLabel(String label) {
|
public void setLabel(String label) {
|
||||||
super.setLabel(label);
|
super.setLabel(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css class to use for element")
|
|
||||||
public void setCssClass(String cssClass) {
|
|
||||||
super.setCssClass(cssClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The css style to use for element")
|
|
||||||
public void setCssStyle(String cssStyle) {
|
|
||||||
super.setCssStyle(cssStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The id to use for the element")
|
|
||||||
public void setId(String id) {
|
|
||||||
super.setId(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@StrutsTagAttribute(description="The name to set for element")
|
|
||||||
public void setName(String name) {
|
|
||||||
super.setName(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -188,7 +188,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* <td>html javascript onclick attribute</td>
|
* <td>html javascript onclick attribute</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td>ondblclick</td>
|
* <td>ondbclick</td>
|
||||||
* <td>simple</td>
|
* <td>simple</td>
|
||||||
* <td>String</td>
|
* <td>String</td>
|
||||||
* <td>html javascript ondbclick attribute</td>
|
* <td>html javascript ondbclick attribute</td>
|
||||||
@@ -311,31 +311,31 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
*
|
*
|
||||||
* <!-- START SNIPPET: tooltipdescription -->
|
* <!-- START SNIPPET: tooltipdescription -->
|
||||||
*
|
*
|
||||||
* Every Form UI component (in xhtml / css_xhtml or any other that extends them) can
|
* Every Form UI component (in xhtml / css_xhtml or any others that extends of them) could
|
||||||
* have tooltips assigned to them. The Form component's tooltip related attribute, once
|
* have tooltip assigned to a them. The Form component's tooltip related attribute once
|
||||||
* defined, will be applied to all form UI components that are created under it unless
|
* defined will be applicable to all form UI component that is created under it unless
|
||||||
* explicitly overriden by having the Form UI component itself defined with their own tooltip attribute.
|
* explicitly overriden by having the Form UI component itself defined that tooltip attribute.
|
||||||
*
|
*
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* In Example 1, the textfield will inherit the tooltipDelay and tooltipIcon attribte from
|
* In Example 1, the textfield will inherit the tooltipDelay adn tooltipIcon attribte from
|
||||||
* its containing form. In other words, although it doesn't define a tooltipAboveMousePointer
|
* its containing form. In other words, although it doesn't defined a tooltipAboveMousePointer
|
||||||
* attribute, it will have that attribute inherited from its containing form.
|
* attribute, it will have that attributes inherited from its containing form.
|
||||||
*
|
*
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* In Example 2, the the textfield will inherite both the tooltipDelay and
|
* In Example 2, the the textfield will inherite both the tooltipDelay and
|
||||||
* tooltipIcon attribute from its containing form, but the tooltipDelay
|
* tooltipIcon attribute from its containing form but tooltipDelay
|
||||||
* attribute is overriden at the textfield itself. Hence, the textfield actually will
|
* attribute is overriden at the textfield itself. Hence, the textfield actually will
|
||||||
* have its tooltipIcon defined as /myImages/myIcon.gif, inherited from its containing form, and
|
* have tooltipIcon defined as /myImages/myIcon.gif, inherited from its containing form and
|
||||||
* tooltipDelay defined as 5000.
|
* tooltipDelay defined as 5000, due to overriden at the textfield itself.
|
||||||
*
|
*
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* Example 3, 4 and 5 show different ways of setting the tooltipConfig attribute.<br/>
|
* Example 3, 4 and 5 shows different way of setting the tooltipConfig attribute.<br/>
|
||||||
* <b>Example 3:</b> Set tooltip config through the body of the param tag<br/>
|
* <b>Example 3:</b>Set tooltip config through body of param tag<br/>
|
||||||
* <b>Example 4:</b> Set tooltip config through the value attribute of the param tag<br/>
|
* <b>Example 4:</b>Set tooltip config through value attribute of param tag<br/>
|
||||||
* <b>Example 5:</b> Set tooltip config through the tooltipConfig attribute of the component tag<br/>
|
* <b>Example 5:</b>Set tooltip config through tooltipConfig attribute of component tag<br/>
|
||||||
*
|
*
|
||||||
* <!-- END SNIPPET: tooltipdescription -->
|
* <!-- END SNIPPET: tooltipdescription -->
|
||||||
*
|
*
|
||||||
@@ -346,7 +346,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* <!-- Example 1: -->
|
* <!-- Example 1: -->
|
||||||
* <s:form
|
* <s:form
|
||||||
* tooltipConfig="#{'tooltipDelay':'500',
|
* tooltipConfig="#{'tooltipDelay':'500',
|
||||||
* 'tooltipIcon':'/myImages/myIcon.gif'}" .... >
|
* 'tooltipIcon='/myImages/myIcon.gif'}" .... >
|
||||||
* ....
|
* ....
|
||||||
* <s:textfield label="Customer Name" tooltip="Enter the customer name" .... />
|
* <s:textfield label="Customer Name" tooltip="Enter the customer name" .... />
|
||||||
* ....
|
* ....
|
||||||
@@ -367,7 +367,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
|||||||
* <-- Example 3: -->
|
* <-- Example 3: -->
|
||||||
* <s:textfield
|
* <s:textfield
|
||||||
* label="Customer Name"
|
* label="Customer Name"
|
||||||
* tooltip="One of our customer Details">
|
* tooltip="One of our customer Details'">
|
||||||
* <s:param name="tooltipConfig">
|
* <s:param name="tooltipConfig">
|
||||||
* tooltipDelay = 500 |
|
* tooltipDelay = 500 |
|
||||||
* tooltipIcon = /myImages/myIcon.gif
|
* tooltipIcon = /myImages/myIcon.gif
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ import com.opensymphony.xwork2.util.location.LocatableProperties;
|
|||||||
* <td>com.opensymphony.xwork2.util.ObjectTypeDeterminer</td>
|
* <td>com.opensymphony.xwork2.util.ObjectTypeDeterminer</td>
|
||||||
* <td>struts.objectTypeDeterminer</td>
|
* <td>struts.objectTypeDeterminer</td>
|
||||||
* <td>singleton</td>
|
* <td>singleton</td>
|
||||||
* <td>Determines what the key and element class of a Map or Collection should be</td>
|
* <td>Determines what the key and and element class of a Map or Collection should be</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td>org.apache.struts2.dispatcher.mapper.ActionMapper</td>
|
* <td>org.apache.struts2.dispatcher.mapper.ActionMapper</td>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ import java.lang.reflect.Method;
|
|||||||
* }
|
* }
|
||||||
* </code>
|
* </code>
|
||||||
* <p/>
|
* <p/>
|
||||||
* If the action URL is "foo!bar", then the "foo" action is invoked,
|
* If the action URL is "foo!bar", the the "foo" action is invoked,
|
||||||
* calling "bar" instead of "execute".
|
* calling "bar" instead of "execute".
|
||||||
* <p/>
|
* <p/>
|
||||||
* Instead of scanning each request at runtime, the provider creates action mappings
|
* Instead of scanning each request at runtime, the provider creates action mappings
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ import com.opensymphony.xwork2.ActionContext;
|
|||||||
* <li><b>actionPackages</b> - a comma-delimited list of Java packages to scan for Actions.</li>
|
* <li><b>actionPackages</b> - a comma-delimited list of Java packages to scan for Actions.</li>
|
||||||
*
|
*
|
||||||
* <li><b>configProviders</b> - a comma-delimited list of Java classes that implement the
|
* <li><b>configProviders</b> - a comma-delimited list of Java classes that implement the
|
||||||
* {@link ConfigurationProvider} interface that should be used for building the {@link Configuration}.</li>
|
* {@link com.opensymphony.xwork2.config.ConfigurationProvider} interface that should be used for building the {@link com.opensymphony.xwork2.config.Configuration}.</li>
|
||||||
*
|
*
|
||||||
* <li><b>*</b> - any other parameters are treated as framework constants.</li>
|
* <li><b>*</b> - any other parameters are treated as framework constants.</li>
|
||||||
*
|
*
|
||||||
@@ -537,7 +537,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
|
|||||||
while (-1 != (n = input.read(buffer))) {
|
while (-1 != (n = input.read(buffer))) {
|
||||||
output.write(buffer, 0, n);
|
output.write(buffer, 0, n);
|
||||||
}
|
}
|
||||||
output.flush();
|
output.flush(); // WW-1526
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import com.opensymphony.xwork2.inject.Container;
|
|||||||
*
|
*
|
||||||
* Default action mapper implementation, using the standard *.[ext] (where ext
|
* Default action mapper implementation, using the standard *.[ext] (where ext
|
||||||
* usually "action") pattern. The extension is looked up from the Struts
|
* usually "action") pattern. The extension is looked up from the Struts
|
||||||
* configuration key <b>struts.action.extension</b>.
|
* configuration key <b>struts.action.exection</b>.
|
||||||
*
|
*
|
||||||
* <p/> To help with dealing with buttons and other related requirements, this
|
* <p/> To help with dealing with buttons and other related requirements, this
|
||||||
* mapper (and other {@link ActionMapper}s, we hope) has the ability to name a
|
* mapper (and other {@link ActionMapper}s, we hope) has the ability to name a
|
||||||
@@ -87,11 +87,11 @@ import com.opensymphony.xwork2.inject.Container;
|
|||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* <!-- START SNIPPET: method-example -->
|
* <!-- START SNIPPET: method-example -->
|
||||||
* <s:form action="baz">
|
* <a:form action="baz">
|
||||||
* <s:textfield label="Enter your name" name="person.name"/>
|
* <a:textfield label="Enter your name" name="person.name"/>
|
||||||
* <s:submit value="Create person"/>
|
* <a:submit value="Create person"/>
|
||||||
* <s:submit name="method:anotherMethod" value="Cancel"/>
|
* <a:submit name="method:anotherMethod" value="Cancel"/>
|
||||||
* </s:form>
|
* </a:form>
|
||||||
* <!-- END SNIPPET: method-example -->
|
* <!-- END SNIPPET: method-example -->
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
@@ -108,11 +108,11 @@ import com.opensymphony.xwork2.inject.Container;
|
|||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* <!-- START SNIPPET: action-example -->
|
* <!-- START SNIPPET: action-example -->
|
||||||
* <s:form action="baz">
|
* <a:form action="baz">
|
||||||
* <s:textfield label="Enter your name" name="person.name"/>
|
* <a:textfield label="Enter your name" name="person.name"/>
|
||||||
* <s:submit value="Create person"/>
|
* <a:submit value="Create person"/>
|
||||||
* <s:submit name="action:anotherAction" value="Cancel"/>
|
* <a:submit name="action:anotherAction" value="Cancel"/>
|
||||||
* </s:form>
|
* </a:form>
|
||||||
* <!-- END SNIPPET: action-example -->
|
* <!-- END SNIPPET: action-example -->
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
@@ -129,11 +129,11 @@ import com.opensymphony.xwork2.inject.Container;
|
|||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* <!-- START SNIPPET: redirect-example -->
|
* <!-- START SNIPPET: redirect-example -->
|
||||||
* <s:form action="baz">
|
* <a:form action="baz">
|
||||||
* <s:textfield label="Enter your name" name="person.name"/>
|
* <a:textfield label="Enter your name" name="person.name"/>
|
||||||
* <s:submit value="Create person"/>
|
* <a:submit value="Create person"/>
|
||||||
* <s:submit name="redirect:www.google.com" value="Cancel"/>
|
* <a:submit name="redirect:www.google.com" value="Cancel"/>
|
||||||
* </s:form>
|
* </a:form>
|
||||||
* <!-- END SNIPPET: redirect-example -->
|
* <!-- END SNIPPET: redirect-example -->
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
@@ -151,11 +151,11 @@ import com.opensymphony.xwork2.inject.Container;
|
|||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* <!-- START SNIPPET: redirect-action-example -->
|
* <!-- START SNIPPET: redirect-action-example -->
|
||||||
* <s:form action="baz">
|
* <a:form action="baz">
|
||||||
* <s:textfield label="Enter your name" name="person.name"/>
|
* <a:textfield label="Enter your name" name="person.name"/>
|
||||||
* <s:submit value="Create person"/>
|
* <a:submit value="Create person"/>
|
||||||
* <s:submit name="redirect-action:dashboard" value="Cancel"/>
|
* <a:submit name="redirect-action:dashboard" value="Cancel"/>
|
||||||
* </s:form>
|
* </a:form>
|
||||||
* <!-- END SNIPPET: redirect-action-example -->
|
* <!-- END SNIPPET: redirect-action-example -->
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -117,11 +117,11 @@ import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
|
|||||||
* <html>
|
* <html>
|
||||||
* <head>
|
* <head>
|
||||||
* <title>Please wait</title>
|
* <title>Please wait</title>
|
||||||
* <meta http-equiv="refresh" content="5;url=<s:url includeParams="all" />"/>
|
* <meta http-equiv="refresh" content="5;url=<a:url includeParams="all" />"/>
|
||||||
* </head>
|
* </head>
|
||||||
* <body>
|
* <body>
|
||||||
* Please wait while we process your request.
|
* Please wait while we process your request.
|
||||||
* Click <a href="<s:url includeParams="all" />"></a> if this page does not reload automatically.
|
* Click <a href="<a:url includeParams="all" />"></a> if this page does not reload automatically.
|
||||||
* </body>
|
* </body>
|
||||||
* </html>
|
* </html>
|
||||||
* </pre>
|
* </pre>
|
||||||
|
|||||||
@@ -125,10 +125,10 @@ import com.opensymphony.xwork2.util.LocalizedTextUtil;
|
|||||||
*
|
*
|
||||||
* And then you need to set encoding <code>multipart/form-data</code> in the form where the user selects the file to upload.
|
* And then you need to set encoding <code>multipart/form-data</code> in the form where the user selects the file to upload.
|
||||||
* <pre>
|
* <pre>
|
||||||
* <s:form action="doUpload" method="post" enctype="multipart/form-data">
|
* <a:form action="doUpload" method="post" enctype="multipart/form-data">
|
||||||
* <s:file name="upload" label="File"/>
|
* <a:file name="upload" label="File"/>
|
||||||
* <s:submit/>
|
* <a:submit/>
|
||||||
* </s:form>
|
* </a:form>
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* And then in your action code you'll have access to the File object if you provide setters according to the
|
* And then in your action code you'll have access to the File object if you provide setters according to the
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import org.apache.struts2.views.velocity.components.ActionDirective;
|
|||||||
import org.apache.struts2.views.velocity.components.ActionErrorDirective;
|
import org.apache.struts2.views.velocity.components.ActionErrorDirective;
|
||||||
import org.apache.struts2.views.velocity.components.ActionMessageDirective;
|
import org.apache.struts2.views.velocity.components.ActionMessageDirective;
|
||||||
import org.apache.struts2.views.velocity.components.AnchorDirective;
|
import org.apache.struts2.views.velocity.components.AnchorDirective;
|
||||||
|
import org.apache.struts2.views.velocity.components.AutocompleterDirective;
|
||||||
import org.apache.struts2.views.velocity.components.BeanDirective;
|
import org.apache.struts2.views.velocity.components.BeanDirective;
|
||||||
import org.apache.struts2.views.velocity.components.CheckBoxDirective;
|
import org.apache.struts2.views.velocity.components.CheckBoxDirective;
|
||||||
import org.apache.struts2.views.velocity.components.CheckBoxListDirective;
|
import org.apache.struts2.views.velocity.components.CheckBoxListDirective;
|
||||||
@@ -39,6 +40,7 @@ import org.apache.struts2.views.velocity.components.ComponentDirective;
|
|||||||
import org.apache.struts2.views.velocity.components.DateDirective;
|
import org.apache.struts2.views.velocity.components.DateDirective;
|
||||||
import org.apache.struts2.views.velocity.components.DivDirective;
|
import org.apache.struts2.views.velocity.components.DivDirective;
|
||||||
import org.apache.struts2.views.velocity.components.DoubleSelectDirective;
|
import org.apache.struts2.views.velocity.components.DoubleSelectDirective;
|
||||||
|
import org.apache.struts2.views.velocity.components.DateTimePickerDirective;
|
||||||
import org.apache.struts2.views.velocity.components.FieldErrorDirective;
|
import org.apache.struts2.views.velocity.components.FieldErrorDirective;
|
||||||
import org.apache.struts2.views.velocity.components.FileDirective;
|
import org.apache.struts2.views.velocity.components.FileDirective;
|
||||||
import org.apache.struts2.views.velocity.components.FormDirective;
|
import org.apache.struts2.views.velocity.components.FormDirective;
|
||||||
@@ -57,10 +59,13 @@ import org.apache.struts2.views.velocity.components.ResetDirective;
|
|||||||
import org.apache.struts2.views.velocity.components.SelectDirective;
|
import org.apache.struts2.views.velocity.components.SelectDirective;
|
||||||
import org.apache.struts2.views.velocity.components.SetDirective;
|
import org.apache.struts2.views.velocity.components.SetDirective;
|
||||||
import org.apache.struts2.views.velocity.components.SubmitDirective;
|
import org.apache.struts2.views.velocity.components.SubmitDirective;
|
||||||
|
import org.apache.struts2.views.velocity.components.TabbedPanelDirective;
|
||||||
import org.apache.struts2.views.velocity.components.TextAreaDirective;
|
import org.apache.struts2.views.velocity.components.TextAreaDirective;
|
||||||
import org.apache.struts2.views.velocity.components.TextDirective;
|
import org.apache.struts2.views.velocity.components.TextDirective;
|
||||||
import org.apache.struts2.views.velocity.components.TextFieldDirective;
|
import org.apache.struts2.views.velocity.components.TextFieldDirective;
|
||||||
import org.apache.struts2.views.velocity.components.TokenDirective;
|
import org.apache.struts2.views.velocity.components.TokenDirective;
|
||||||
|
import org.apache.struts2.views.velocity.components.TreeDirective;
|
||||||
|
import org.apache.struts2.views.velocity.components.TreeNodeDirective;
|
||||||
import org.apache.struts2.views.velocity.components.URLDirective;
|
import org.apache.struts2.views.velocity.components.URLDirective;
|
||||||
import org.apache.struts2.views.velocity.components.UpDownSelectDirective;
|
import org.apache.struts2.views.velocity.components.UpDownSelectDirective;
|
||||||
import org.apache.struts2.views.velocity.components.WebTableDirective;
|
import org.apache.struts2.views.velocity.components.WebTableDirective;
|
||||||
@@ -87,7 +92,9 @@ public class DefaultTagLibrary implements TagLibrary {
|
|||||||
ComboBoxDirective.class,
|
ComboBoxDirective.class,
|
||||||
ComponentDirective.class,
|
ComponentDirective.class,
|
||||||
DateDirective.class,
|
DateDirective.class,
|
||||||
|
DateTimePickerDirective.class,
|
||||||
DivDirective.class,
|
DivDirective.class,
|
||||||
|
AutocompleterDirective.class,
|
||||||
DoubleSelectDirective.class,
|
DoubleSelectDirective.class,
|
||||||
FileDirective.class,
|
FileDirective.class,
|
||||||
FormDirective.class,
|
FormDirective.class,
|
||||||
@@ -106,10 +113,13 @@ public class DefaultTagLibrary implements TagLibrary {
|
|||||||
SetDirective.class,
|
SetDirective.class,
|
||||||
SubmitDirective.class,
|
SubmitDirective.class,
|
||||||
ResetDirective.class,
|
ResetDirective.class,
|
||||||
|
TabbedPanelDirective.class,
|
||||||
TextAreaDirective.class,
|
TextAreaDirective.class,
|
||||||
TextDirective.class,
|
TextDirective.class,
|
||||||
TextFieldDirective.class,
|
TextFieldDirective.class,
|
||||||
TokenDirective.class,
|
TokenDirective.class,
|
||||||
|
TreeDirective.class,
|
||||||
|
TreeNodeDirective.class,
|
||||||
URLDirective.class,
|
URLDirective.class,
|
||||||
WebTableDirective.class,
|
WebTableDirective.class,
|
||||||
ActionErrorDirective.class,
|
ActionErrorDirective.class,
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: StrutsTag.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.annotations;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Marks a class as the top class in the class hierarchy scanned for tag annotations
|
|
||||||
*/
|
|
||||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface StrutsTagSkipInheritance {
|
|
||||||
|
|
||||||
}
|
|
||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: AutocompleterModel.java 502294 2007-02-01 17:28:00Z niallp $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,14 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.freemarker.tags;
|
package org.apache.struts2.views.freemarker.tags;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.dojo.components.Autocompleter;
|
import org.apache.struts2.components.Autocompleter;
|
||||||
import org.apache.struts2.views.freemarker.tags.TagModel;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: DateTimePickerModel.java 493867 2007-01-07 22:26:23Z mrdon $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright 2006 The Apache Software Foundation.
|
* Copyright 2006 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
@@ -15,14 +15,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.freemarker.tags;
|
package org.apache.struts2.views.freemarker.tags;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.dojo.components.DateTimePicker;
|
import org.apache.struts2.components.DateTimePicker;
|
||||||
import org.apache.struts2.views.freemarker.tags.TextFieldModel;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
@@ -42,6 +42,7 @@ public class StrutsModels {
|
|||||||
protected ComboBoxModel comboBox;
|
protected ComboBoxModel comboBox;
|
||||||
protected ComponentModel component;
|
protected ComponentModel component;
|
||||||
protected DateModel date;
|
protected DateModel date;
|
||||||
|
protected DateTimePickerModel dateTimePicker;
|
||||||
protected DivModel div;
|
protected DivModel div;
|
||||||
protected DoubleSelectModel doubleselect;
|
protected DoubleSelectModel doubleselect;
|
||||||
protected FileModel file;
|
protected FileModel file;
|
||||||
@@ -60,6 +61,7 @@ public class StrutsModels {
|
|||||||
protected SetModel set;
|
protected SetModel set;
|
||||||
protected SubmitModel submit;
|
protected SubmitModel submit;
|
||||||
protected ResetModel reset;
|
protected ResetModel reset;
|
||||||
|
protected TabbedPanelModel tabbedPanel;
|
||||||
protected TextAreaModel textarea;
|
protected TextAreaModel textarea;
|
||||||
protected TextModel text;
|
protected TextModel text;
|
||||||
protected TextFieldModel textfield;
|
protected TextFieldModel textfield;
|
||||||
@@ -72,11 +74,14 @@ public class StrutsModels {
|
|||||||
protected ActionMessageModel actionmessage;
|
protected ActionMessageModel actionmessage;
|
||||||
protected FieldErrorModel fielderror;
|
protected FieldErrorModel fielderror;
|
||||||
protected OptionTransferSelectModel optiontransferselect;
|
protected OptionTransferSelectModel optiontransferselect;
|
||||||
|
protected TreeModel treeModel;
|
||||||
|
protected TreeNodeModel treenodeModel;
|
||||||
protected UpDownSelectModel updownselect;
|
protected UpDownSelectModel updownselect;
|
||||||
protected OptGroupModel optGroupModel;
|
protected OptGroupModel optGroupModel;
|
||||||
protected IfModel ifModel;
|
protected IfModel ifModel;
|
||||||
protected ElseModel elseModel;
|
protected ElseModel elseModel;
|
||||||
protected ElseIfModel elseIfModel;
|
protected ElseIfModel elseIfModel;
|
||||||
|
protected AutocompleterModel autocompleterModel;
|
||||||
protected InputTransferSelectModel inputtransferselect;
|
protected InputTransferSelectModel inputtransferselect;
|
||||||
|
|
||||||
|
|
||||||
@@ -110,6 +115,14 @@ public class StrutsModels {
|
|||||||
return comboBox;
|
return comboBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AutocompleterModel getAutocompleter() {
|
||||||
|
if (autocompleterModel == null) {
|
||||||
|
autocompleterModel = new AutocompleterModel(stack, req, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
return autocompleterModel;
|
||||||
|
}
|
||||||
|
|
||||||
public ComponentModel getComponent() {
|
public ComponentModel getComponent() {
|
||||||
if (component == null) {
|
if (component == null) {
|
||||||
component = new ComponentModel(stack, req, res);
|
component = new ComponentModel(stack, req, res);
|
||||||
@@ -229,6 +242,14 @@ public class StrutsModels {
|
|||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DateTimePickerModel getDateTimePicker() {
|
||||||
|
if (dateTimePicker == null) {
|
||||||
|
dateTimePicker = new DateTimePickerModel(stack, req, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dateTimePicker;
|
||||||
|
}
|
||||||
|
|
||||||
public TokenModel getToken() {
|
public TokenModel getToken() {
|
||||||
if (token == null) {
|
if (token == null) {
|
||||||
token = new TokenModel(stack, req, res);
|
token = new TokenModel(stack, req, res);
|
||||||
@@ -309,6 +330,14 @@ public class StrutsModels {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TabbedPanelModel getTabbedPanel() {
|
||||||
|
if (tabbedPanel == null) {
|
||||||
|
tabbedPanel = new TabbedPanelModel(stack, req, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tabbedPanel;
|
||||||
|
}
|
||||||
|
|
||||||
public BeanModel getBean() {
|
public BeanModel getBean() {
|
||||||
if (bean == null) {
|
if (bean == null) {
|
||||||
bean = new BeanModel(stack, req, res);
|
bean = new BeanModel(stack, req, res);
|
||||||
@@ -388,6 +417,20 @@ public class StrutsModels {
|
|||||||
return optiontransferselect;
|
return optiontransferselect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 UpDownSelectModel getUpdownselect() {
|
public UpDownSelectModel getUpdownselect() {
|
||||||
if (updownselect == null) {
|
if (updownselect == null) {
|
||||||
updownselect = new UpDownSelectModel(stack, req, res);
|
updownselect = new UpDownSelectModel(stack, req, res);
|
||||||
|
|||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: TabbedPanelModel.java 471756 2006-11-06 15:01:43Z husted $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,14 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.freemarker.tags;
|
package org.apache.struts2.views.freemarker.tags;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.dojo.components.TabbedPanel;
|
import org.apache.struts2.components.TabbedPanel;
|
||||||
import org.apache.struts2.views.freemarker.tags.TagModel;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: TreeModel.java 471756 2006-11-06 15:01:43Z husted $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,14 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.freemarker.tags;
|
package org.apache.struts2.views.freemarker.tags;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.dojo.components.Tree;
|
import org.apache.struts2.components.Tree;
|
||||||
import org.apache.struts2.views.freemarker.tags.TagModel;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: TreeNodeModel.java 471756 2006-11-06 15:01:43Z husted $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,14 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.freemarker.tags;
|
package org.apache.struts2.views.freemarker.tags;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.dojo.components.TreeNode;
|
import org.apache.struts2.components.TreeNode;
|
||||||
import org.apache.struts2.views.freemarker.tags.TagModel;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
+18
-22
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: AbstractRemoteCallUITag.java 508285 2007-02-16 02:42:24Z musachy $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright 2006 The Apache Software Foundation.
|
* Copyright 2006 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
@@ -15,10 +15,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.jsp.ui;
|
package org.apache.struts2.views.jsp.ui;
|
||||||
|
|
||||||
import org.apache.struts2.dojo.components.RemoteUICallBean;
|
import org.apache.struts2.components.RemoteUICallBean;
|
||||||
import org.apache.struts2.views.jsp.ui.AbstractClosingTag;
|
|
||||||
|
|
||||||
public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
||||||
|
|
||||||
@@ -27,6 +26,8 @@ public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
|||||||
protected String notifyTopics;
|
protected String notifyTopics;
|
||||||
protected String loadingText;
|
protected String loadingText;
|
||||||
protected String errorText;
|
protected String errorText;
|
||||||
|
protected String beforeLoading;
|
||||||
|
protected String afterLoading;
|
||||||
protected String executeScripts;
|
protected String executeScripts;
|
||||||
protected String handler;
|
protected String handler;
|
||||||
protected String formId;
|
protected String formId;
|
||||||
@@ -34,9 +35,6 @@ public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
|||||||
protected String showErrorTransportText;
|
protected String showErrorTransportText;
|
||||||
protected String indicator;
|
protected String indicator;
|
||||||
protected String showLoadingText;
|
protected String showLoadingText;
|
||||||
protected String beforeNotifyTopics;
|
|
||||||
protected String afterNotifyTopics;
|
|
||||||
protected String errorNotifyTopics;
|
|
||||||
|
|
||||||
protected void populateParams() {
|
protected void populateParams() {
|
||||||
super.populateParams();
|
super.populateParams();
|
||||||
@@ -46,6 +44,8 @@ public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
|||||||
remote.setListenTopics(listenTopics);
|
remote.setListenTopics(listenTopics);
|
||||||
remote.setLoadingText(loadingText);
|
remote.setLoadingText(loadingText);
|
||||||
remote.setErrorText(errorText);
|
remote.setErrorText(errorText);
|
||||||
|
remote.setAfterLoading(afterLoading);
|
||||||
|
remote.setBeforeLoading(beforeLoading);
|
||||||
remote.setExecuteScripts(executeScripts);
|
remote.setExecuteScripts(executeScripts);
|
||||||
remote.setHandler(handler);
|
remote.setHandler(handler);
|
||||||
remote.setFormFilter(formFilter);
|
remote.setFormFilter(formFilter);
|
||||||
@@ -54,9 +54,6 @@ public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
|||||||
remote.setShowErrorTransportText(showErrorTransportText);
|
remote.setShowErrorTransportText(showErrorTransportText);
|
||||||
remote.setIndicator(indicator);
|
remote.setIndicator(indicator);
|
||||||
remote.setShowLoadingText(showLoadingText);
|
remote.setShowLoadingText(showLoadingText);
|
||||||
remote.setAfterNotifyTopics(afterNotifyTopics);
|
|
||||||
remote.setBeforeNotifyTopics(beforeNotifyTopics);
|
|
||||||
remote.setErrorNotifyTopics(errorNotifyTopics);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHref(String href) {
|
public void setHref(String href) {
|
||||||
@@ -75,6 +72,14 @@ public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
|||||||
this.listenTopics = 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) {
|
public void setExecuteScripts(String executeScripts) {
|
||||||
this.executeScripts = executeScripts;
|
this.executeScripts = executeScripts;
|
||||||
}
|
}
|
||||||
@@ -99,6 +104,9 @@ public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
|||||||
this.showErrorTransportText = showErrorTransportText;
|
this.showErrorTransportText = showErrorTransportText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param indicator The indicator to set.
|
||||||
|
*/
|
||||||
public void setIndicator(String indicator) {
|
public void setIndicator(String indicator) {
|
||||||
this.indicator = indicator;
|
this.indicator = indicator;
|
||||||
}
|
}
|
||||||
@@ -106,16 +114,4 @@ public abstract class AbstractRemoteCallUITag extends AbstractClosingTag {
|
|||||||
public void setShowLoadingText(String showLoadingText) {
|
public void setShowLoadingText(String showLoadingText) {
|
||||||
this.showLoadingText = showLoadingText;
|
this.showLoadingText = showLoadingText;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAfterNotifyTopics(String afterNotifyTopics) {
|
|
||||||
this.afterNotifyTopics = afterNotifyTopics;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBeforeNotifyTopics(String beforeNotifyTopics) {
|
|
||||||
this.beforeNotifyTopics = beforeNotifyTopics;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setErrorNotifyTopics(String errorNotifyTopics) {
|
|
||||||
this.errorNotifyTopics = errorNotifyTopics;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,18 +25,18 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
|
|
||||||
import org.apache.struts2.components.Anchor;
|
import org.apache.struts2.components.Anchor;
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.components.UIBean;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Anchor
|
* @see Anchor
|
||||||
*/
|
*/
|
||||||
public class AnchorTag extends AbstractClosingTag {
|
public class AnchorTag extends AbstractRemoteCallUITag {
|
||||||
|
|
||||||
private static final long serialVersionUID = -1034616578492431113L;
|
private static final long serialVersionUID = -1034616578492431113L;
|
||||||
|
|
||||||
protected String href;
|
protected String targets;
|
||||||
|
protected String preInvokeJS;
|
||||||
|
|
||||||
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
|
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
|
||||||
return new Anchor(stack, req, res);
|
return new Anchor(stack, req, res);
|
||||||
@@ -45,12 +45,17 @@ public class AnchorTag extends AbstractClosingTag {
|
|||||||
protected void populateParams() {
|
protected void populateParams() {
|
||||||
super.populateParams();
|
super.populateParams();
|
||||||
|
|
||||||
Anchor anchor = (Anchor) component;
|
Anchor link = (Anchor) component;
|
||||||
anchor.setHref(href);
|
link.setTargets(targets);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHref(String href) {
|
public void setTargets(String targets) {
|
||||||
this.href = href;
|
this.targets = targets;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated()
|
||||||
|
public void setPreInvokeJS(String preInvokeJS) {
|
||||||
|
this.beforeLoading = preInvokeJS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -18,14 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.jsp.ui;
|
package org.apache.struts2.views.jsp.ui;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.struts2.components.Autocompleter;
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.dojo.components.Autocompleter;
|
|
||||||
import org.apache.struts2.views.jsp.ui.ComboBoxTag;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: DateTimePickerTag.java 508605 2007-02-16 21:56:50Z musachy $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@@ -18,14 +18,13 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.struts2.dojo.views.jsp.ui;
|
package org.apache.struts2.views.jsp.ui;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.struts2.components.Component;
|
import org.apache.struts2.components.Component;
|
||||||
import org.apache.struts2.dojo.components.DateTimePicker;
|
import org.apache.struts2.components.DateTimePicker;
|
||||||
import org.apache.struts2.views.jsp.ui.AbstractUITag;
|
|
||||||
|
|
||||||
import com.opensymphony.xwork2.util.ValueStack;
|
import com.opensymphony.xwork2.util.ValueStack;
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user