You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tiles.apache.org by ap...@apache.org on 2009/11/14 15:00:05 UTC
svn commit: r836180 [3/4] - in /tiles/sandbox/trunk:
tiles-request/tiles-request-api/src/main/java/org/apache/tiles/request/util/
tiles-request/tiles-request-freemarker/src/main/java/org/apache/tiles/freemarker/context/
tiles-request/tiles-request-free...
Modified: tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java Sat Nov 14 14:00:02 2009
@@ -42,257 +42,257 @@
*/
public class InsertDefinitionTag extends SimpleTagSupport {
- /**
- * The template model.
- */
- private InsertDefinitionModel model = new InsertDefinitionModel();
-
- /**
- * The definition name.
- */
- private String name;
-
- /**
- * The role to check. If the user is in the specified role, the tag is taken
- * into account; otherwise, the tag is ignored (skipped).
- *
- * @since 2.1.1
- */
- private String role;
-
- /**
- * The view preparer to use before the rendering.
- *
- * @since 2.1.1
- */
- private String preparer;
-
- /**
- * This flag, if <code>true</code>, flushes the content before rendering.
- *
- * @since 2.1.1
- */
- private boolean flush;
-
- /**
- * This flag, if <code>true</code>, ignores exception thrown by preparers
- * and those caused by problems with definitions.
- *
- * @since 2.1.1
- */
- private boolean ignore;
-
- /**
- * A string representing the URI of a template (for example, a JSP page).
- *
- * @since 2.1.0
- */
- private String template;
-
- /**
- * The type of the template attribute.
- *
- * @since 2.2.0
- */
- private String templateType;
-
- /**
- * The expression to evaluate to get the value of the template.
- *
- * @since 2.2.0
- */
- private String templateExpression;
-
- /**
- * Returns the name of the definition to insert.
- *
- * @return The name of the definition.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the name of the definition to insert.
- *
- * @param name
- * The name of the definition.
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Returns the role to check. If the user is in the specified role, the tag
- * is taken into account; otherwise, the tag is ignored (skipped).
- *
- * @return The role to check.
- * @since 2.1.1
- */
- public String getRole() {
- return role;
- }
-
- /**
- * Sets the role to check. If the user is in the specified role, the tag is
- * taken into account; otherwise, the tag is ignored (skipped).
- *
- * @param role
- * The role to check.
- * @since 2.1.1
- */
- public void setRole(String role) {
- this.role = role;
- }
-
- /**
- * Returns the preparer name.
- *
- * @return The preparer name.
- * @since 2.1.1
- */
- public String getPreparer() {
- return preparer;
- }
-
- /**
- * Sets the preparer name.
- *
- * @param preparer
- * The preparer name.
- * @since 2.1.1
- */
- public void setPreparer(String preparer) {
- this.preparer = preparer;
- }
-
- /**
- * Returns the flush flag. If <code>true</code>, current page out stream is
- * flushed before insertion.
- *
- * @return The flush flag.
- * @since 2.1.1
- */
- public boolean isFlush() {
- return flush;
- }
-
- /**
- * Sets the flush flag. If <code>true</code>, current page out stream is
- * flushed before insertion.
- *
- * @param flush
- * The flush flag.
- * @since 2.1.1
- */
- public void setFlush(boolean flush) {
- this.flush = flush;
- }
-
- /**
- * Returns the ignore flag. If it is set to true, and the attribute
- * specified by the name does not exist, simply return without writing
- * anything. The default value is false, which will cause a runtime
- * exception to be thrown.
- *
- * @return The ignore flag.
- * @since 2.1.1
- */
- public boolean isIgnore() {
- return ignore;
- }
-
- /**
- * Sets the ignore flag. If this attribute is set to true, and the attribute
- * specified by the name does not exist, simply return without writing
- * anything. The default value is false, which will cause a runtime
- * exception to be thrown.
- *
- * @param ignore
- * The ignore flag.
- * @since 2.1.1
- */
- public void setIgnore(boolean ignore) {
- this.ignore = ignore;
- }
-
- /**
- * Returns a string representing the URI of a template (for example, a JSP
- * page).
- *
- * @return The template URI.
- * @since 2.1.0
- */
- public String getTemplate() {
- return template;
- }
-
- /**
- * Sets a string representing the URI of a template (for example, a JSP
- * page).
- *
- * @param template
- * The template URI.
- * @since 2.1.0
- */
- public void setTemplate(String template) {
- this.template = template;
- }
-
- /**
- * Returns the type of the template attribute.
- *
- * @return The template type.
- * @since 2.2.0
- */
- public String getTemplateType() {
- return templateType;
- }
-
- /**
- * Sets the type of the template attribute.
- *
- * @param templateType
- * The template type.
- * @since 2.2.0
- */
- public void setTemplateType(String templateType) {
- this.templateType = templateType;
- }
-
- /**
- * Returns the expression to evaluate to get the value of the template.
- *
- * @return The template expression.
- * @since 2.2.0
- */
- public String getTemplateExpression() {
- return templateExpression;
- }
-
- /**
- * Sets the expression to evaluate to get the value of the template.
- *
- * @param templateExpression
- * The template expression.
- * @since 2.2.0
- */
- public void setTemplateExpression(String templateExpression) {
- this.templateExpression = templateExpression;
- }
-
- /** {@inheritDoc} */
- @Override
- public void doTag() throws JspException, IOException {
- JspContext jspContext = getJspContext();
- TilesContainer currentContainer = JspUtil
- .getCurrentContainer(jspContext);
- Request request = JspTilesRequestContext.createServletJspRequest(
- currentContainer.getApplicationContext(),
- (PageContext) jspContext);
- model.start(currentContainer, request);
- JspUtil.evaluateFragment(getJspBody());
- model.end(currentContainer, name, template,
- templateType, templateExpression, role, preparer, request);
- }
+ /**
+ * The template model.
+ */
+ private InsertDefinitionModel model = new InsertDefinitionModel();
+
+ /**
+ * The definition name.
+ */
+ private String name;
+
+ /**
+ * The role to check. If the user is in the specified role, the tag is taken
+ * into account; otherwise, the tag is ignored (skipped).
+ *
+ * @since 2.1.1
+ */
+ private String role;
+
+ /**
+ * The view preparer to use before the rendering.
+ *
+ * @since 2.1.1
+ */
+ private String preparer;
+
+ /**
+ * This flag, if <code>true</code>, flushes the content before rendering.
+ *
+ * @since 2.1.1
+ */
+ private boolean flush;
+
+ /**
+ * This flag, if <code>true</code>, ignores exception thrown by preparers
+ * and those caused by problems with definitions.
+ *
+ * @since 2.1.1
+ */
+ private boolean ignore;
+
+ /**
+ * A string representing the URI of a template (for example, a JSP page).
+ *
+ * @since 2.1.0
+ */
+ private String template;
+
+ /**
+ * The type of the template attribute.
+ *
+ * @since 2.2.0
+ */
+ private String templateType;
+
+ /**
+ * The expression to evaluate to get the value of the template.
+ *
+ * @since 2.2.0
+ */
+ private String templateExpression;
+
+ /**
+ * Returns the name of the definition to insert.
+ *
+ * @return The name of the definition.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name of the definition to insert.
+ *
+ * @param name
+ * The name of the definition.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Returns the role to check. If the user is in the specified role, the tag
+ * is taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @return The role to check.
+ * @since 2.1.1
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * Sets the role to check. If the user is in the specified role, the tag is
+ * taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @param role
+ * The role to check.
+ * @since 2.1.1
+ */
+ public void setRole(String role) {
+ this.role = role;
+ }
+
+ /**
+ * Returns the preparer name.
+ *
+ * @return The preparer name.
+ * @since 2.1.1
+ */
+ public String getPreparer() {
+ return preparer;
+ }
+
+ /**
+ * Sets the preparer name.
+ *
+ * @param preparer
+ * The preparer name.
+ * @since 2.1.1
+ */
+ public void setPreparer(String preparer) {
+ this.preparer = preparer;
+ }
+
+ /**
+ * Returns the flush flag. If <code>true</code>, current page out stream is
+ * flushed before insertion.
+ *
+ * @return The flush flag.
+ * @since 2.1.1
+ */
+ public boolean isFlush() {
+ return flush;
+ }
+
+ /**
+ * Sets the flush flag. If <code>true</code>, current page out stream is
+ * flushed before insertion.
+ *
+ * @param flush
+ * The flush flag.
+ * @since 2.1.1
+ */
+ public void setFlush(boolean flush) {
+ this.flush = flush;
+ }
+
+ /**
+ * Returns the ignore flag. If it is set to true, and the attribute
+ * specified by the name does not exist, simply return without writing
+ * anything. The default value is false, which will cause a runtime
+ * exception to be thrown.
+ *
+ * @return The ignore flag.
+ * @since 2.1.1
+ */
+ public boolean isIgnore() {
+ return ignore;
+ }
+
+ /**
+ * Sets the ignore flag. If this attribute is set to true, and the attribute
+ * specified by the name does not exist, simply return without writing
+ * anything. The default value is false, which will cause a runtime
+ * exception to be thrown.
+ *
+ * @param ignore
+ * The ignore flag.
+ * @since 2.1.1
+ */
+ public void setIgnore(boolean ignore) {
+ this.ignore = ignore;
+ }
+
+ /**
+ * Returns a string representing the URI of a template (for example, a JSP
+ * page).
+ *
+ * @return The template URI.
+ * @since 2.1.0
+ */
+ public String getTemplate() {
+ return template;
+ }
+
+ /**
+ * Sets a string representing the URI of a template (for example, a JSP
+ * page).
+ *
+ * @param template
+ * The template URI.
+ * @since 2.1.0
+ */
+ public void setTemplate(String template) {
+ this.template = template;
+ }
+
+ /**
+ * Returns the type of the template attribute.
+ *
+ * @return The template type.
+ * @since 2.2.0
+ */
+ public String getTemplateType() {
+ return templateType;
+ }
+
+ /**
+ * Sets the type of the template attribute.
+ *
+ * @param templateType
+ * The template type.
+ * @since 2.2.0
+ */
+ public void setTemplateType(String templateType) {
+ this.templateType = templateType;
+ }
+
+ /**
+ * Returns the expression to evaluate to get the value of the template.
+ *
+ * @return The template expression.
+ * @since 2.2.0
+ */
+ public String getTemplateExpression() {
+ return templateExpression;
+ }
+
+ /**
+ * Sets the expression to evaluate to get the value of the template.
+ *
+ * @param templateExpression
+ * The template expression.
+ * @since 2.2.0
+ */
+ public void setTemplateExpression(String templateExpression) {
+ this.templateExpression = templateExpression;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void doTag() throws JspException, IOException {
+ JspContext jspContext = getJspContext();
+ TilesContainer currentContainer = JspUtil
+ .getCurrentContainer(jspContext);
+ Request request = JspTilesRequestContext.createServletJspRequest(
+ currentContainer.getApplicationContext(),
+ (PageContext) jspContext);
+ model.start(currentContainer, request);
+ JspUtil.evaluateFragment(getJspBody());
+ model.end(currentContainer, name, template,
+ templateType, templateExpression, role, preparer, request);
+ }
}
Modified: tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java Sat Nov 14 14:00:02 2009
@@ -42,233 +42,233 @@
*/
public class InsertTemplateTag extends SimpleTagSupport {
- /**
- * The template model.
- */
- private InsertTemplateModel model = new InsertTemplateModel();
-
- /**
- * The role to check. If the user is in the specified role, the tag is taken
- * into account; otherwise, the tag is ignored (skipped).
- *
- * @since 2.1.1
- */
- private String role;
-
- /**
- * The view preparer to use before the rendering.
- *
- * @since 2.1.1
- */
- private String preparer;
-
- /**
- * This flag, if <code>true</code>, flushes the content before rendering.
- *
- * @since 2.1.1
- */
- private boolean flush;
-
- /**
- * This flag, if <code>true</code>, ignores exception thrown by preparers
- * and those caused by problems with definitions.
- *
- * @since 2.1.1
- */
- private boolean ignore;
-
- /**
- * A string representing the URI of a template (for example, a JSP page).
- *
- * @since 2.1.0
- */
- private String template;
-
- /**
- * The type of the template attribute.
- *
- * @since 2.2.0
- */
- private String templateType;
-
- /**
- * The expression to evaluate to get the value of the template.
- *
- * @since 2.2.0
- */
- private String templateExpression;
-
- /**
- * Returns the role to check. If the user is in the specified role, the tag
- * is taken into account; otherwise, the tag is ignored (skipped).
- *
- * @return The role to check.
- * @since 2.1.1
- */
- public String getRole() {
- return role;
- }
-
- /**
- * Sets the role to check. If the user is in the specified role, the tag is
- * taken into account; otherwise, the tag is ignored (skipped).
- *
- * @param role
- * The role to check.
- * @since 2.1.1
- */
- public void setRole(String role) {
- this.role = role;
- }
-
- /**
- * Returns the preparer name.
- *
- * @return The preparer name.
- * @since 2.1.1
- */
- public String getPreparer() {
- return preparer;
- }
-
- /**
- * Sets the preparer name.
- *
- * @param preparer
- * The preparer name.
- * @since 2.1.1
- */
- public void setPreparer(String preparer) {
- this.preparer = preparer;
- }
-
- /**
- * Returns the flush flag. If <code>true</code>, current page out stream is
- * flushed before insertion.
- *
- * @return The flush flag.
- * @since 2.1.1
- */
- public boolean isFlush() {
- return flush;
- }
-
- /**
- * Sets the flush flag. If <code>true</code>, current page out stream is
- * flushed before insertion.
- *
- * @param flush
- * The flush flag.
- * @since 2.1.1
- */
- public void setFlush(boolean flush) {
- this.flush = flush;
- }
-
- /**
- * Returns the ignore flag. If it is set to true, and the attribute
- * specified by the name does not exist, simply return without writing
- * anything. The default value is false, which will cause a runtime
- * exception to be thrown.
- *
- * @return The ignore flag.
- * @since 2.1.1
- */
- public boolean isIgnore() {
- return ignore;
- }
-
- /**
- * Sets the ignore flag. If this attribute is set to true, and the attribute
- * specified by the name does not exist, simply return without writing
- * anything. The default value is false, which will cause a runtime
- * exception to be thrown.
- *
- * @param ignore
- * The ignore flag.
- * @since 2.1.1
- */
- public void setIgnore(boolean ignore) {
- this.ignore = ignore;
- }
-
- /**
- * Returns a string representing the URI of a template (for example, a JSP
- * page).
- *
- * @return The template URI.
- * @since 2.1.0
- */
- public String getTemplate() {
- return template;
- }
-
- /**
- * Sets a string representing the URI of a template (for example, a JSP
- * page).
- *
- * @param template
- * The template URI.
- * @since 2.1.0
- */
- public void setTemplate(String template) {
- this.template = template;
- }
-
- /**
- * Returns the type of the template attribute.
- *
- * @return The template type.
- * @since 2.2.0
- */
- public String getTemplateType() {
- return templateType;
- }
-
- /**
- * Sets the type of the template attribute.
- *
- * @param templateType
- * The template type.
- * @since 2.2.0
- */
- public void setTemplateType(String templateType) {
- this.templateType = templateType;
- }
-
- /**
- * Returns the expression to evaluate to get the value of the template.
- *
- * @return The template expression.
- * @since 2.2.0
- */
- public String getTemplateExpression() {
- return templateExpression;
- }
-
- /**
- * Sets the expression to evaluate to get the value of the template.
- *
- * @param templateExpression
- * The template expression.
- * @since 2.2.0
- */
- public void setTemplateExpression(String templateExpression) {
- this.templateExpression = templateExpression;
- }
-
- /** {@inheritDoc} */
- @Override
- public void doTag() throws JspException, IOException {
- JspContext jspContext = getJspContext();
- TilesContainer currentContainer = JspUtil
- .getCurrentContainer(jspContext);
- Request request = JspTilesRequestContext.createServletJspRequest(
- currentContainer.getApplicationContext(),
- (PageContext) jspContext);
- model.start(currentContainer, request);
- JspUtil.evaluateFragment(getJspBody());
- model.end(currentContainer, template, templateType, templateExpression,
- role, preparer, request);
- }
+ /**
+ * The template model.
+ */
+ private InsertTemplateModel model = new InsertTemplateModel();
+
+ /**
+ * The role to check. If the user is in the specified role, the tag is taken
+ * into account; otherwise, the tag is ignored (skipped).
+ *
+ * @since 2.1.1
+ */
+ private String role;
+
+ /**
+ * The view preparer to use before the rendering.
+ *
+ * @since 2.1.1
+ */
+ private String preparer;
+
+ /**
+ * This flag, if <code>true</code>, flushes the content before rendering.
+ *
+ * @since 2.1.1
+ */
+ private boolean flush;
+
+ /**
+ * This flag, if <code>true</code>, ignores exception thrown by preparers
+ * and those caused by problems with definitions.
+ *
+ * @since 2.1.1
+ */
+ private boolean ignore;
+
+ /**
+ * A string representing the URI of a template (for example, a JSP page).
+ *
+ * @since 2.1.0
+ */
+ private String template;
+
+ /**
+ * The type of the template attribute.
+ *
+ * @since 2.2.0
+ */
+ private String templateType;
+
+ /**
+ * The expression to evaluate to get the value of the template.
+ *
+ * @since 2.2.0
+ */
+ private String templateExpression;
+
+ /**
+ * Returns the role to check. If the user is in the specified role, the tag
+ * is taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @return The role to check.
+ * @since 2.1.1
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * Sets the role to check. If the user is in the specified role, the tag is
+ * taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @param role
+ * The role to check.
+ * @since 2.1.1
+ */
+ public void setRole(String role) {
+ this.role = role;
+ }
+
+ /**
+ * Returns the preparer name.
+ *
+ * @return The preparer name.
+ * @since 2.1.1
+ */
+ public String getPreparer() {
+ return preparer;
+ }
+
+ /**
+ * Sets the preparer name.
+ *
+ * @param preparer
+ * The preparer name.
+ * @since 2.1.1
+ */
+ public void setPreparer(String preparer) {
+ this.preparer = preparer;
+ }
+
+ /**
+ * Returns the flush flag. If <code>true</code>, current page out stream is
+ * flushed before insertion.
+ *
+ * @return The flush flag.
+ * @since 2.1.1
+ */
+ public boolean isFlush() {
+ return flush;
+ }
+
+ /**
+ * Sets the flush flag. If <code>true</code>, current page out stream is
+ * flushed before insertion.
+ *
+ * @param flush
+ * The flush flag.
+ * @since 2.1.1
+ */
+ public void setFlush(boolean flush) {
+ this.flush = flush;
+ }
+
+ /**
+ * Returns the ignore flag. If it is set to true, and the attribute
+ * specified by the name does not exist, simply return without writing
+ * anything. The default value is false, which will cause a runtime
+ * exception to be thrown.
+ *
+ * @return The ignore flag.
+ * @since 2.1.1
+ */
+ public boolean isIgnore() {
+ return ignore;
+ }
+
+ /**
+ * Sets the ignore flag. If this attribute is set to true, and the attribute
+ * specified by the name does not exist, simply return without writing
+ * anything. The default value is false, which will cause a runtime
+ * exception to be thrown.
+ *
+ * @param ignore
+ * The ignore flag.
+ * @since 2.1.1
+ */
+ public void setIgnore(boolean ignore) {
+ this.ignore = ignore;
+ }
+
+ /**
+ * Returns a string representing the URI of a template (for example, a JSP
+ * page).
+ *
+ * @return The template URI.
+ * @since 2.1.0
+ */
+ public String getTemplate() {
+ return template;
+ }
+
+ /**
+ * Sets a string representing the URI of a template (for example, a JSP
+ * page).
+ *
+ * @param template
+ * The template URI.
+ * @since 2.1.0
+ */
+ public void setTemplate(String template) {
+ this.template = template;
+ }
+
+ /**
+ * Returns the type of the template attribute.
+ *
+ * @return The template type.
+ * @since 2.2.0
+ */
+ public String getTemplateType() {
+ return templateType;
+ }
+
+ /**
+ * Sets the type of the template attribute.
+ *
+ * @param templateType
+ * The template type.
+ * @since 2.2.0
+ */
+ public void setTemplateType(String templateType) {
+ this.templateType = templateType;
+ }
+
+ /**
+ * Returns the expression to evaluate to get the value of the template.
+ *
+ * @return The template expression.
+ * @since 2.2.0
+ */
+ public String getTemplateExpression() {
+ return templateExpression;
+ }
+
+ /**
+ * Sets the expression to evaluate to get the value of the template.
+ *
+ * @param templateExpression
+ * The template expression.
+ * @since 2.2.0
+ */
+ public void setTemplateExpression(String templateExpression) {
+ this.templateExpression = templateExpression;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void doTag() throws JspException, IOException {
+ JspContext jspContext = getJspContext();
+ TilesContainer currentContainer = JspUtil
+ .getCurrentContainer(jspContext);
+ Request request = JspTilesRequestContext.createServletJspRequest(
+ currentContainer.getApplicationContext(),
+ (PageContext) jspContext);
+ model.start(currentContainer, request);
+ JspUtil.evaluateFragment(getJspBody());
+ model.end(currentContainer, template, templateType, templateExpression,
+ role, preparer, request);
+ }
}
Modified: tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java Sat Nov 14 14:00:02 2009
@@ -82,201 +82,201 @@
*/
public class PutAttributeTag extends SimpleTagSupport {
- /**
- * The template model.
- */
- private PutAttributeModel model = new PutAttributeModel();
-
- /**
- * Name of attribute to put in attribute context.
- */
- private String name = null;
-
- /**
- * If <code>true</code>, the attribute will be cascaded to all nested
- * definitions.
- */
- private boolean cascade = false;
-
- /**
- * The role to check. If the user is in the specified role, the tag is taken
- * into account; otherwise, the tag is ignored (skipped).
- */
- private String role;
-
- /**
- * Associated attribute value.
- */
- private Object value = null;
-
- /**
- * The expression to calculate the value from. Use this parameter, or value,
- * or body.
- */
- private String expression = null;
-
- /**
- * Requested type for the value.
- */
- private String type = null;
-
- /**
- * Returns the name of the attribute.
- *
- * @return The name of the attribute.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the name of the attribute.
- *
- * @param name
- * The name of the attribute.
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Checks if the attribute should be cascaded to nested definitions.
- *
- * @return <code>true</code> if the attribute will be cascaded.
- * @since 2.1.0
- */
- public boolean isCascade() {
- return cascade;
- }
-
- /**
- * Sets the property that tells if the attribute should be cascaded to
- * nested definitions.
- *
- * @param cascade
- * <code>true</code> if the attribute will be cascaded.
- * @since 2.1.0
- */
- public void setCascade(boolean cascade) {
- this.cascade = cascade;
- }
-
- /**
- * Returns the role to check. If the user is in the specified role, the tag
- * is taken into account; otherwise, the tag is ignored (skipped).
- *
- * @return The role to check.
- */
- public String getRole() {
- return role;
- }
-
- /**
- * Sets the role to check. If the user is in the specified role, the tag is
- * taken into account; otherwise, the tag is ignored (skipped).
- *
- * @param role
- * The role to check.
- */
- public void setRole(String role) {
- this.role = role;
- }
-
- /**
- * Returns the attribute value.
- *
- * @return Attribute value. Can be a String or Object.
- */
- public Object getValue() {
- return value;
- }
-
- /**
- * Sets the attribute value.
- *
- * @param value
- * Attribute value. Can be a String or Object.
- */
- public void setValue(Object value) {
- this.value = value;
- }
-
- /**
- * Returns the expression to calculate the value from. Use this parameter,
- * or value, or body.
- *
- * @return The expression
- * @since 2.2.0
- */
- public String getExpression() {
- return expression;
- }
-
- /**
- * Sets the expression to calculate the value from. Use this parameter, or
- * value, or body.
- *
- * @param expression
- * The expression
- * @since 2.2.0
- */
- public void setExpression(String expression) {
- this.expression = expression;
- }
-
- /**
- * <p>
- * Returns content type: string, template or definition.
- * </p>
- * <ul>
- * <li>String : Content is printed directly.</li>
- * <li>template : Content is included from specified URL. Value is used as
- * an URL.</li>
- * <li>definition : Value denote a definition defined in factory (xml file).
- * Definition will be searched in the inserted tile, in a
- * <code><insert attribute="attributeName"></code> tag, where
- * 'attributeName' is the name used for this tag.</li>
- * </ul>
- *
- * @return The attribute type.
- */
- public String getType() {
- return type;
- }
-
- /**
- * <p>
- * Sets content type: string, template or definition.
- * </p>
- * <ul>
- * <li>String : Content is printed directly.</li>
- * <li>template : Content is included from specified URL. Value is used as
- * an URL.</li>
- * <li>definition : Value denote a definition defined in factory (xml file).
- * Definition will be searched in the inserted tile, in a
- * <code><insert attribute="attributeName"></code> tag, where
- * 'attributeName' is the name used for this tag.</li>
- * </ul>
- *
- * @param type
- * The attribute type.
- */
- public void setType(String type) {
- this.type = type;
- }
-
- /** {@inheritDoc} */
- @Override
- public void doTag() throws JspException, IOException {
- JspContext jspContext = getJspContext();
- TilesContainer currentContainer = JspUtil
- .getCurrentContainer(jspContext);
- Request request = JspTilesRequestContext.createServletJspRequest(
- currentContainer.getApplicationContext(),
- (PageContext) jspContext);
- model.start(JspUtil.getComposeStack(jspContext));
- String body = JspUtil.evaluateFragmentAsString(getJspBody());
- model.end(currentContainer, JspUtil.getComposeStack(jspContext), name,
- value, expression, body, role, type, cascade, request);
- }
+ /**
+ * The template model.
+ */
+ private PutAttributeModel model = new PutAttributeModel();
+
+ /**
+ * Name of attribute to put in attribute context.
+ */
+ private String name = null;
+
+ /**
+ * If <code>true</code>, the attribute will be cascaded to all nested
+ * definitions.
+ */
+ private boolean cascade = false;
+
+ /**
+ * The role to check. If the user is in the specified role, the tag is taken
+ * into account; otherwise, the tag is ignored (skipped).
+ */
+ private String role;
+
+ /**
+ * Associated attribute value.
+ */
+ private Object value = null;
+
+ /**
+ * The expression to calculate the value from. Use this parameter, or value,
+ * or body.
+ */
+ private String expression = null;
+
+ /**
+ * Requested type for the value.
+ */
+ private String type = null;
+
+ /**
+ * Returns the name of the attribute.
+ *
+ * @return The name of the attribute.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name of the attribute.
+ *
+ * @param name
+ * The name of the attribute.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Checks if the attribute should be cascaded to nested definitions.
+ *
+ * @return <code>true</code> if the attribute will be cascaded.
+ * @since 2.1.0
+ */
+ public boolean isCascade() {
+ return cascade;
+ }
+
+ /**
+ * Sets the property that tells if the attribute should be cascaded to
+ * nested definitions.
+ *
+ * @param cascade
+ * <code>true</code> if the attribute will be cascaded.
+ * @since 2.1.0
+ */
+ public void setCascade(boolean cascade) {
+ this.cascade = cascade;
+ }
+
+ /**
+ * Returns the role to check. If the user is in the specified role, the tag
+ * is taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @return The role to check.
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * Sets the role to check. If the user is in the specified role, the tag is
+ * taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @param role
+ * The role to check.
+ */
+ public void setRole(String role) {
+ this.role = role;
+ }
+
+ /**
+ * Returns the attribute value.
+ *
+ * @return Attribute value. Can be a String or Object.
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the attribute value.
+ *
+ * @param value
+ * Attribute value. Can be a String or Object.
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ /**
+ * Returns the expression to calculate the value from. Use this parameter,
+ * or value, or body.
+ *
+ * @return The expression
+ * @since 2.2.0
+ */
+ public String getExpression() {
+ return expression;
+ }
+
+ /**
+ * Sets the expression to calculate the value from. Use this parameter, or
+ * value, or body.
+ *
+ * @param expression
+ * The expression
+ * @since 2.2.0
+ */
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ /**
+ * <p>
+ * Returns content type: string, template or definition.
+ * </p>
+ * <ul>
+ * <li>String : Content is printed directly.</li>
+ * <li>template : Content is included from specified URL. Value is used as
+ * an URL.</li>
+ * <li>definition : Value denote a definition defined in factory (xml file).
+ * Definition will be searched in the inserted tile, in a
+ * <code><insert attribute="attributeName"></code> tag, where
+ * 'attributeName' is the name used for this tag.</li>
+ * </ul>
+ *
+ * @return The attribute type.
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <p>
+ * Sets content type: string, template or definition.
+ * </p>
+ * <ul>
+ * <li>String : Content is printed directly.</li>
+ * <li>template : Content is included from specified URL. Value is used as
+ * an URL.</li>
+ * <li>definition : Value denote a definition defined in factory (xml file).
+ * Definition will be searched in the inserted tile, in a
+ * <code><insert attribute="attributeName"></code> tag, where
+ * 'attributeName' is the name used for this tag.</li>
+ * </ul>
+ *
+ * @param type
+ * The attribute type.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void doTag() throws JspException, IOException {
+ JspContext jspContext = getJspContext();
+ TilesContainer currentContainer = JspUtil
+ .getCurrentContainer(jspContext);
+ Request request = JspTilesRequestContext.createServletJspRequest(
+ currentContainer.getApplicationContext(),
+ (PageContext) jspContext);
+ model.start(JspUtil.getComposeStack(jspContext));
+ String body = JspUtil.evaluateFragmentAsString(getJspBody());
+ model.end(currentContainer, JspUtil.getComposeStack(jspContext), name,
+ value, expression, body, role, type, cascade, request);
+ }
}
Modified: tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java Sat Nov 14 14:00:02 2009
@@ -42,180 +42,180 @@
*/
public class PutListAttributeTag extends SimpleTagSupport {
- /**
- * The template model.
- */
- private PutListAttributeModel model = new PutListAttributeModel();
-
- /**
- * Name of attribute to put in attribute context.
- */
- private String name = null;
-
- /**
- * If <code>true</code>, the attribute will be cascaded to all nested
- * definitions.
- */
- private boolean cascade = false;
-
- /**
- * The role to check. If the user is in the specified role, the tag is taken
- * into account; otherwise, the tag is ignored (skipped).
- */
- private String role;
-
- /**
- * Requested type for the value.
- */
- private String type = null;
-
- /**
- * If true, the attribute will put the elements of the attribute with the
- * same name of the parent definition before the ones specified here. By
- * default, it is 'false'.
- */
- private boolean inherit = false;
-
- /**
- * Returns the name of the attribute.
- *
- * @return The name of the attribute.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the name of the attribute.
- *
- * @param name
- * The name of the attribute.
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Checks if the attribute should be cascaded to nested definitions.
- *
- * @return <code>true</code> if the attribute will be cascaded.
- * @since 2.1.0
- */
- public boolean isCascade() {
- return cascade;
- }
-
- /**
- * Sets the property that tells if the attribute should be cascaded to
- * nested definitions.
- *
- * @param cascade
- * <code>true</code> if the attribute will be cascaded.
- * @since 2.1.0
- */
- public void setCascade(boolean cascade) {
- this.cascade = cascade;
- }
-
- /**
- * Returns the role to check. If the user is in the specified role, the tag
- * is taken into account; otherwise, the tag is ignored (skipped).
- *
- * @return The role to check.
- */
- public String getRole() {
- return role;
- }
-
- /**
- * Sets the role to check. If the user is in the specified role, the tag is
- * taken into account; otherwise, the tag is ignored (skipped).
- *
- * @param role
- * The role to check.
- */
- public void setRole(String role) {
- this.role = role;
- }
-
- /**
- * <p>
- * Returns content type: string, template or definition.
- * </p>
- * <ul>
- * <li>String : Content is printed directly.</li>
- * <li>template : Content is included from specified URL. Value is used as
- * an URL.</li>
- * <li>definition : Value denote a definition defined in factory (xml file).
- * Definition will be searched in the inserted tile, in a
- * <code><insert attribute="attributeName"></code> tag, where
- * 'attributeName' is the name used for this tag.</li>
- * </ul>
- *
- * @return The attribute type.
- */
- public String getType() {
- return type;
- }
-
- /**
- * <p>
- * Sets content type: string, template or definition.
- * </p>
- * <ul>
- * <li>String : Content is printed directly.</li>
- * <li>template : Content is included from specified URL. Value is used as
- * an URL.</li>
- * <li>definition : Value denote a definition defined in factory (xml file).
- * Definition will be searched in the inserted tile, in a
- * <code><insert attribute="attributeName"></code> tag, where
- * 'attributeName' is the name used for this tag.</li>
- * </ul>
- *
- * @param type
- * The attribute type.
- */
- public void setType(String type) {
- this.type = type;
- }
-
- /**
- * If true, the attribute will put the elements of the attribute with the
- * same name of the parent definition before the ones specified here. By
- * default, it is 'false'
- *
- * @param inherit
- * The "inherit" value.
- * @since 2.1.0
- */
- public void setInherit(boolean inherit) {
- this.inherit = inherit;
- }
-
- /**
- * If true, the attribute will put the elements of the attribute with the
- * same name of the parent definition before the ones specified here. By
- * default, it is 'false'
- *
- * @return The "inherit" value.
- * @since 2.1.0
- */
- public boolean getInherit() {
- return inherit;
- }
-
- /** {@inheritDoc} */
- @Override
- public void doTag() throws JspException, IOException {
- JspContext jspContext = getJspContext();
- TilesContainer currentContainer = JspUtil
- .getCurrentContainer(jspContext);
- Request request = JspTilesRequestContext.createServletJspRequest(
- currentContainer.getApplicationContext(),
- (PageContext) jspContext);
- model.start(JspUtil.getComposeStack(jspContext), role, inherit);
- JspUtil.evaluateFragment(getJspBody());
- model.end(currentContainer, JspUtil.getComposeStack(jspContext), name,
- cascade, request);
- }
+ /**
+ * The template model.
+ */
+ private PutListAttributeModel model = new PutListAttributeModel();
+
+ /**
+ * Name of attribute to put in attribute context.
+ */
+ private String name = null;
+
+ /**
+ * If <code>true</code>, the attribute will be cascaded to all nested
+ * definitions.
+ */
+ private boolean cascade = false;
+
+ /**
+ * The role to check. If the user is in the specified role, the tag is taken
+ * into account; otherwise, the tag is ignored (skipped).
+ */
+ private String role;
+
+ /**
+ * Requested type for the value.
+ */
+ private String type = null;
+
+ /**
+ * If true, the attribute will put the elements of the attribute with the
+ * same name of the parent definition before the ones specified here. By
+ * default, it is 'false'.
+ */
+ private boolean inherit = false;
+
+ /**
+ * Returns the name of the attribute.
+ *
+ * @return The name of the attribute.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name of the attribute.
+ *
+ * @param name
+ * The name of the attribute.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Checks if the attribute should be cascaded to nested definitions.
+ *
+ * @return <code>true</code> if the attribute will be cascaded.
+ * @since 2.1.0
+ */
+ public boolean isCascade() {
+ return cascade;
+ }
+
+ /**
+ * Sets the property that tells if the attribute should be cascaded to
+ * nested definitions.
+ *
+ * @param cascade
+ * <code>true</code> if the attribute will be cascaded.
+ * @since 2.1.0
+ */
+ public void setCascade(boolean cascade) {
+ this.cascade = cascade;
+ }
+
+ /**
+ * Returns the role to check. If the user is in the specified role, the tag
+ * is taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @return The role to check.
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * Sets the role to check. If the user is in the specified role, the tag is
+ * taken into account; otherwise, the tag is ignored (skipped).
+ *
+ * @param role
+ * The role to check.
+ */
+ public void setRole(String role) {
+ this.role = role;
+ }
+
+ /**
+ * <p>
+ * Returns content type: string, template or definition.
+ * </p>
+ * <ul>
+ * <li>String : Content is printed directly.</li>
+ * <li>template : Content is included from specified URL. Value is used as
+ * an URL.</li>
+ * <li>definition : Value denote a definition defined in factory (xml file).
+ * Definition will be searched in the inserted tile, in a
+ * <code><insert attribute="attributeName"></code> tag, where
+ * 'attributeName' is the name used for this tag.</li>
+ * </ul>
+ *
+ * @return The attribute type.
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <p>
+ * Sets content type: string, template or definition.
+ * </p>
+ * <ul>
+ * <li>String : Content is printed directly.</li>
+ * <li>template : Content is included from specified URL. Value is used as
+ * an URL.</li>
+ * <li>definition : Value denote a definition defined in factory (xml file).
+ * Definition will be searched in the inserted tile, in a
+ * <code><insert attribute="attributeName"></code> tag, where
+ * 'attributeName' is the name used for this tag.</li>
+ * </ul>
+ *
+ * @param type
+ * The attribute type.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * If true, the attribute will put the elements of the attribute with the
+ * same name of the parent definition before the ones specified here. By
+ * default, it is 'false'
+ *
+ * @param inherit
+ * The "inherit" value.
+ * @since 2.1.0
+ */
+ public void setInherit(boolean inherit) {
+ this.inherit = inherit;
+ }
+
+ /**
+ * If true, the attribute will put the elements of the attribute with the
+ * same name of the parent definition before the ones specified here. By
+ * default, it is 'false'
+ *
+ * @return The "inherit" value.
+ * @since 2.1.0
+ */
+ public boolean getInherit() {
+ return inherit;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void doTag() throws JspException, IOException {
+ JspContext jspContext = getJspContext();
+ TilesContainer currentContainer = JspUtil
+ .getCurrentContainer(jspContext);
+ Request request = JspTilesRequestContext.createServletJspRequest(
+ currentContainer.getApplicationContext(),
+ (PageContext) jspContext);
+ model.start(JspUtil.getComposeStack(jspContext), role, inherit);
+ JspUtil.evaluateFragment(getJspBody());
+ model.end(currentContainer, JspUtil.getComposeStack(jspContext), name,
+ cascade, request);
+ }
}
Modified: tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java Sat Nov 14 14:00:02 2009
@@ -45,189 +45,189 @@
*/
public class UseAttributeTag extends SimpleTagSupport {
- /**
- * The template model.
- */
- private ImportAttributeModel model = new ImportAttributeModel();
-
- /**
- * The id of the imported scripting variable.
- */
- private String id;
-
- /**
- * The scope name.
- */
- private String scopeName = null;
-
- /**
- * The name of the attribute.
- */
- private String name = null;
-
- /**
- * Flag that, if <code>true</code>, ignores exceptions.
- */
- private boolean ignore = false;
-
- /**
- * Class name of object.
- */
- private String classname = null;
-
- /**
- * Returns the id of the imported scripting variable.
- *
- * @return The id of the imported scripting variable.
- * @since 2.2.0
- */
- public String getId() {
- return id;
- }
-
- /**
- * Sets the id of the imported scripting variable.
- *
- * @param id
- * The id of the imported scripting variable.
- * @since 2.2.0
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * Set the scope.
- *
- * @param scope
- * Scope.
- */
- public void setScope(String scope) {
- this.scopeName = scope;
- }
-
- /**
- * Get scope.
- *
- * @return Scope.
- */
- public String getScope() {
- return scopeName;
- }
-
- /**
- * Get the name.
- *
- * @return Name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Set the name.
- *
- * @param name
- * The new name
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Set ignore flag.
- *
- * @param ignore
- * default: <code>false</code>: Exception is thrown when
- * attribute is not found, set to <code>
+ /**
+ * The template model.
+ */
+ private ImportAttributeModel model = new ImportAttributeModel();
+
+ /**
+ * The id of the imported scripting variable.
+ */
+ private String id;
+
+ /**
+ * The scope name.
+ */
+ private String scopeName = null;
+
+ /**
+ * The name of the attribute.
+ */
+ private String name = null;
+
+ /**
+ * Flag that, if <code>true</code>, ignores exceptions.
+ */
+ private boolean ignore = false;
+
+ /**
+ * Class name of object.
+ */
+ private String classname = null;
+
+ /**
+ * Returns the id of the imported scripting variable.
+ *
+ * @return The id of the imported scripting variable.
+ * @since 2.2.0
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the id of the imported scripting variable.
+ *
+ * @param id
+ * The id of the imported scripting variable.
+ * @since 2.2.0
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Set the scope.
+ *
+ * @param scope
+ * Scope.
+ */
+ public void setScope(String scope) {
+ this.scopeName = scope;
+ }
+
+ /**
+ * Get scope.
+ *
+ * @return Scope.
+ */
+ public String getScope() {
+ return scopeName;
+ }
+
+ /**
+ * Get the name.
+ *
+ * @return Name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the name.
+ *
+ * @param name
+ * The new name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Set ignore flag.
+ *
+ * @param ignore
+ * default: <code>false</code>: Exception is thrown when
+ * attribute is not found, set to <code>
* true</code> to
- * ignore missing attributes silently
- */
- public void setIgnore(boolean ignore) {
- this.ignore = ignore;
- }
-
- /**
- * Get ignore flag.
- *
- * @return default: <code>false</code>: Exception is thrown when attribute
- * is not found, set to <code>
+ * ignore missing attributes silently
+ */
+ public void setIgnore(boolean ignore) {
+ this.ignore = ignore;
+ }
+
+ /**
+ * Get ignore flag.
+ *
+ * @return default: <code>false</code>: Exception is thrown when attribute
+ * is not found, set to <code>
* true</code> to ignore missing
- * attributes silently
- */
- public boolean isIgnore() {
- return ignore;
- }
-
- /**
- * Get class name.
- *
- * @return class name
- */
- public String getClassname() {
- return classname;
-
- }
-
- /**
- * Set the class name.
- *
- * @param name
- * The new class name.
- */
- public void setClassname(String name) {
- this.classname = name;
- }
-
- /** {@inheritDoc} */
- @Override
- public void doTag() throws JspException {
- JspContext jspContext = getJspContext();
- TilesContainer currentContainer = JspUtil
- .getCurrentContainer(jspContext);
- Request request = JspTilesRequestContext.createServletJspRequest(
- currentContainer.getApplicationContext(),
- (PageContext) jspContext);
- Map<String, Object> attributes = model.getImportedAttributes(
- currentContainer, name, id, ignore, request);
- if (!attributes.isEmpty()) {
- int scopeId = JspUtil.getScope(scopeName);
- jspContext.setAttribute(getScriptingVariable(), attributes
- .values().iterator().next(), scopeId);
- }
- }
-
- /**
- * Returns the scripting variable to use.
- *
- * @return The scripting variable.
- */
- public String getScriptingVariable() {
- return id == null ? getName() : id;
- }
-
- /**
- * Implementation of <code>TagExtraInfo</code> which identifies the
- * scripting object(s) to be made visible.
- */
- public static class Tei extends TagExtraInfo {
-
- /** {@inheritDoc} */
- @Override
- public VariableInfo[] getVariableInfo(TagData data) {
- String classname = data.getAttributeString("classname");
- if (classname == null) {
- classname = "java.lang.Object";
- }
-
- String id = data.getAttributeString("id");
- if (id == null) {
- id = data.getAttributeString("name");
- }
+ * attributes silently
+ */
+ public boolean isIgnore() {
+ return ignore;
+ }
+
+ /**
+ * Get class name.
+ *
+ * @return class name
+ */
+ public String getClassname() {
+ return classname;
+
+ }
+
+ /**
+ * Set the class name.
+ *
+ * @param name
+ * The new class name.
+ */
+ public void setClassname(String name) {
+ this.classname = name;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void doTag() throws JspException {
+ JspContext jspContext = getJspContext();
+ TilesContainer currentContainer = JspUtil
+ .getCurrentContainer(jspContext);
+ Request request = JspTilesRequestContext.createServletJspRequest(
+ currentContainer.getApplicationContext(),
+ (PageContext) jspContext);
+ Map<String, Object> attributes = model.getImportedAttributes(
+ currentContainer, name, id, ignore, request);
+ if (!attributes.isEmpty()) {
+ int scopeId = JspUtil.getScope(scopeName);
+ jspContext.setAttribute(getScriptingVariable(), attributes
+ .values().iterator().next(), scopeId);
+ }
+ }
+
+ /**
+ * Returns the scripting variable to use.
+ *
+ * @return The scripting variable.
+ */
+ public String getScriptingVariable() {
+ return id == null ? getName() : id;
+ }
+
+ /**
+ * Implementation of <code>TagExtraInfo</code> which identifies the
+ * scripting object(s) to be made visible.
+ */
+ public static class Tei extends TagExtraInfo {
+
+ /** {@inheritDoc} */
+ @Override
+ public VariableInfo[] getVariableInfo(TagData data) {
+ String classname = data.getAttributeString("classname");
+ if (classname == null) {
+ classname = "java.lang.Object";
+ }
+
+ String id = data.getAttributeString("id");
+ if (id == null) {
+ id = data.getAttributeString("name");
+ }
- return new VariableInfo[] { new VariableInfo(id, classname, true,
- VariableInfo.AT_END) };
+ return new VariableInfo[] { new VariableInfo(id, classname, true,
+ VariableInfo.AT_END) };
- }
- }
+ }
+ }
}
Modified: tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package.html
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package.html?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package.html (original)
+++ tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package.html Sat Nov 14 14:00:02 2009
@@ -29,8 +29,8 @@
<p> The "tiles-jsp" tag library contains tags that are useful to create
- templates, subpages other reusable view parts using the "tiles-core"
- package. </p>
+ templates, subpages other reusable view parts using the "tiles-core"
+ package. </p>
</body>
</html>
Modified: tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld (original)
+++ tiles/sandbox/trunk/tiles3/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld Sat Nov 14 14:00:02 2009
@@ -22,9 +22,9 @@
*/
-->
<taglib
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
- xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- version="2.1">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="2.1">
<description>
<![CDATA[
<p>This tag library provides Tiles tags.</p>
@@ -476,30 +476,30 @@
<description>
<![CDATA[
<p><strong>Put an attribute in enclosing attribute container tag.</strong></p>
- <p>
- Enclosing attribute container tag can be :
- <ul>
- <li><initContainer></li>
- <li><definition></li>
- <li><insertAttribute></li>
- <li><insertDefinition></li>
- <li><putListAttribute></li>
- </ul>
- (or any other tag which implements the <code>PutAttributeTagParent</code> interface.
- Exception is thrown if no appropriate tag can be found.</p>
- <p>Put tag can have following atributes :
- <ul>
- <li>name : Name of the attribute</li>
- <li>value : value to put as attribute</li>
- <li>type : value type. Possible type are : string (value is used as direct string),
- template (value is used as a page url to insert),
- definition (value is used as a definition name to insert),
- object (value is used as it is)</li>
- <li>role : Role to check when 'insertAttribute' will be called.</li>
- </ul></p>
- <p>Value can also come from tag body. Tag body is taken into account only if
- value is not set by one of the tag attributes. In this case Attribute type is
- "string", unless tag body define another type.</p>
+ <p>
+ Enclosing attribute container tag can be :
+ <ul>
+ <li><initContainer></li>
+ <li><definition></li>
+ <li><insertAttribute></li>
+ <li><insertDefinition></li>
+ <li><putListAttribute></li>
+ </ul>
+ (or any other tag which implements the <code>PutAttributeTagParent</code> interface.
+ Exception is thrown if no appropriate tag can be found.</p>
+ <p>Put tag can have following atributes :
+ <ul>
+ <li>name : Name of the attribute</li>
+ <li>value : value to put as attribute</li>
+ <li>type : value type. Possible type are : string (value is used as direct string),
+ template (value is used as a page url to insert),
+ definition (value is used as a definition name to insert),
+ object (value is used as it is)</li>
+ <li>role : Role to check when 'insertAttribute' will be called.</li>
+ </ul></p>
+ <p>Value can also come from tag body. Tag body is taken into account only if
+ value is not set by one of the tag attributes. In this case Attribute type is
+ "string", unless tag body define another type.</p>
]]>
</description>
<name>putAttribute</name>
@@ -651,9 +651,9 @@
<body-content>scriptless</body-content>
<attribute>
<description>
- <![CDATA[
- <p>Attribute value. Can be a String or Object.</p>
- ]]>
+ <![CDATA[
+ <p>Attribute value. Can be a String or Object.</p>
+ ]]>
</description>
<name>value</name>
<required>false</required>
Modified: tiles/sandbox/trunk/tiles3/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactory.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactory.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactory.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactory.java Sat Nov 14 14:00:02 2009
@@ -79,7 +79,7 @@
/** {@inheritDoc} */
@Override
- public VariableResolver getVariableResolver(String name) {
+ public VariableResolver getVariableResolver(String name) {
if (isResolveable(name)) {
if (variableResolvers != null && variableResolvers.containsKey(name)) {
return variableResolvers.get(name);
Modified: tiles/sandbox/trunk/tiles3/tiles-mvel/src/test/java/org/apache/tiles/mvel/MVELAttributeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-mvel/src/test/java/org/apache/tiles/mvel/MVELAttributeEvaluatorTest.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-mvel/src/test/java/org/apache/tiles/mvel/MVELAttributeEvaluatorTest.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-mvel/src/test/java/org/apache/tiles/mvel/MVELAttributeEvaluatorTest.java Sat Nov 14 14:00:02 2009
@@ -55,7 +55,7 @@
/** {@inheritDoc} */
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {
super.setUp();
TilesRequestContextHolder requestHolder = new TilesRequestContextHolder();
VariableResolverFactory variableResolverFactory = new TilesContextVariableResolverFactory(
Modified: tiles/sandbox/trunk/tiles3/tiles-ognl/src/test/java/org/apache/tiles/ognl/OGNLAttributeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-ognl/src/test/java/org/apache/tiles/ognl/OGNLAttributeEvaluatorTest.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-ognl/src/test/java/org/apache/tiles/ognl/OGNLAttributeEvaluatorTest.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-ognl/src/test/java/org/apache/tiles/ognl/OGNLAttributeEvaluatorTest.java Sat Nov 14 14:00:02 2009
@@ -62,7 +62,7 @@
/** {@inheritDoc} */
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {
super.setUp();
PropertyAccessor objectPropertyAccessor = OgnlRuntime.getPropertyAccessor(Object.class);
PropertyAccessor mapPropertyAccessor = OgnlRuntime.getPropertyAccessor(Map.class);
Modified: tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDecorationFilter.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDecorationFilter.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDecorationFilter.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDecorationFilter.java Sat Nov 14 14:00:02 2009
@@ -233,9 +233,9 @@
TilesContainer container = ServletUtil.getContainer(
getServletContext(), containerKey);
- Request request = new ServletTilesRequestContext(container
- .getApplicationContext(), (HttpServletRequest) req,
- (HttpServletResponse) res);
+ Request request = new ServletTilesRequestContext(container
+ .getApplicationContext(), (HttpServletRequest) req,
+ (HttpServletResponse) res);
mutator.mutate(container.getAttributeContext(request), req);
if (preventDecorationToken != null) {
req.setAttribute(preventDecorationToken, Boolean.TRUE);
Modified: tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDispatchServlet.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDispatchServlet.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDispatchServlet.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDispatchServlet.java Sat Nov 14 14:00:02 2009
@@ -71,7 +71,7 @@
/** {@inheritDoc} */
@Override
- public void init() throws ServletException {
+ public void init() throws ServletException {
super.init();
containerKey = getServletConfig().getInitParameter(
@@ -91,14 +91,14 @@
/** {@inheritDoc} */
@Override
- protected void doGet(HttpServletRequest req, HttpServletResponse res)
+ protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
TilesContainer container = ServletUtil.getContainer(
getServletContext(), containerKey);
- Request request = new ServletTilesRequestContext(container
- .getApplicationContext(), (HttpServletRequest) req,
- (HttpServletResponse) res);
+ Request request = new ServletTilesRequestContext(container
+ .getApplicationContext(), (HttpServletRequest) req,
+ (HttpServletResponse) res);
mutator.mutate(container.getAttributeContext(request), req);
String definition = getDefinitionName(req);
if (log.isDebugEnabled()) {
@@ -127,7 +127,7 @@
/** {@inheritDoc} */
@Override
- protected void doPost(HttpServletRequest req, HttpServletResponse res)
+ protected void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
log.info("Tiles dispatch request received. Redirecting POST to GET.");
doGet(req, res);
Modified: tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/TestPortlet.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/TestPortlet.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/TestPortlet.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/TestPortlet.java Sat Nov 14 14:00:02 2009
@@ -57,11 +57,11 @@
String definition = (String) portletSession.getAttribute("definition");
if (definition != null) {
portletSession.removeAttribute("definition");
- TilesContainer container = getCurrentContainer(request,
- getPortletContext());
- Request currentRequest = new PortletTilesRequestContext(container
- .getApplicationContext(), getPortletContext(), request,
- response);
+ TilesContainer container = getCurrentContainer(request,
+ getPortletContext());
+ Request currentRequest = new PortletTilesRequestContext(container
+ .getApplicationContext(), getPortletContext(), request,
+ response);
if (container.isValidDefinition(definition, currentRequest)) {
container.render(definition, currentRequest);
addBackLink(response);
Modified: tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/IncludingServlet.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/IncludingServlet.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/IncludingServlet.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/IncludingServlet.java Sat Nov 14 14:00:02 2009
@@ -56,7 +56,7 @@
* {@link HttpServlet#init(ServletConfig)}
*/
@Override
- public void init(ServletConfig config) throws ServletException {
+ public void init(ServletConfig config) throws ServletException {
super.init(config);
include = config.getInitParameter("include");
@@ -72,7 +72,7 @@
* @throws IOException Thrown by the {@link #include} method.
*/
@Override
- protected void doGet(HttpServletRequest request,
+ protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if (org.apache.tiles.request.servlet.ServletUtil.isForceInclude(request)) {
request.getRequestDispatcher(include).include(request, response);
Modified: tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/GetAsStringVModel.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/GetAsStringVModel.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/GetAsStringVModel.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/GetAsStringVModel.java Sat Nov 14 14:00:02 2009
@@ -88,10 +88,10 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container
- .getApplicationContext(), request, response,
- velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container
+ .getApplicationContext(), request, response,
+ velocityContext, writer);
model.execute(container, writer,
VelocityUtil.toSimpleBoolean((Boolean) params
.get("ignore"), false), (String) params
@@ -112,9 +112,9 @@
VelocityUtil.getParameterStack(velocityContext).push(params);
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, null);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, null);
model.start(ServletUtil.getComposeStack(request), container, VelocityUtil
.toSimpleBoolean((Boolean) params.get("ignore"), false),
(String) params.get("preparer"), (String) params.get("role"),
@@ -135,9 +135,9 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
model.end(ServletUtil.getComposeStack(request), container, writer,
VelocityUtil.toSimpleBoolean((Boolean) params
.get("ignore"), false), currentRequest);
Modified: tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/ImportAttributeVModel.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/ImportAttributeVModel.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/ImportAttributeVModel.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/ImportAttributeVModel.java Sat Nov 14 14:00:02 2009
@@ -84,9 +84,9 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
Map<String, Object> attributes = model.getImportedAttributes(
container,
(String) params.get("name"), (String) params
Modified: tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertAttributeVModel.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertAttributeVModel.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertAttributeVModel.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertAttributeVModel.java Sat Nov 14 14:00:02 2009
@@ -88,9 +88,9 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
model.end(ServletUtil.getComposeStack(request), container,
VelocityUtil.toSimpleBoolean((Boolean) params
.get("ignore"), false), currentRequest);
@@ -105,9 +105,9 @@
VelocityUtil.getParameterStack(velocityContext).push(params);
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, null);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, null);
model.start(ServletUtil.getComposeStack(request), container,
VelocityUtil.toSimpleBoolean((Boolean) params.get("ignore"), false),
(String) params.get("preparer"), (String) params.get("role"),
@@ -127,9 +127,9 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
model.execute(container, VelocityUtil.toSimpleBoolean(
(Boolean) params.get("ignore"), false), (String) params
.get("preparer"), (String) params.get("role"), params
Modified: tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertDefinitionVModel.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertDefinitionVModel.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertDefinitionVModel.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertDefinitionVModel.java Sat Nov 14 14:00:02 2009
@@ -86,9 +86,9 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
model.execute(container, (String) params.get("name"),
(String) params.get("template"), (String) params
.get("templateType"), (String) params
@@ -111,9 +111,9 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
model.end(container, (String) params.get("name"),
(String) params.get("template"), (String) params
.get("templateType"), (String) params
@@ -131,9 +131,9 @@
VelocityUtil.getParameterStack(velocityContext).push(params);
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, null);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, null);
model.start(container, currentRequest);
}
}
Modified: tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertTemplateVModel.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertTemplateVModel.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertTemplateVModel.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/InsertTemplateVModel.java Sat Nov 14 14:00:02 2009
@@ -86,14 +86,14 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
- model.execute(container, (String) params.get("template"),
- (String) params.get("templateType"), (String) params
- .get("templateExpression"), (String) params
- .get("role"), (String) params.get("preparer"),
- currentRequest);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
+ model.execute(container, (String) params.get("template"),
+ (String) params.get("templateType"), (String) params
+ .get("templateExpression"), (String) params
+ .get("role"), (String) params.get("preparer"),
+ currentRequest);
return true;
}
};
@@ -110,9 +110,9 @@
throws IOException {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, writer);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, writer);
model.end(container, (String) params.get("template"),
(String) params.get("templateType"), (String) params
.get("templateExpression"), (String) params.get("role"),
@@ -129,9 +129,9 @@
VelocityUtil.getParameterStack(velocityContext).push(params);
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, null);
- model.start(container, currentRequest);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, null);
+ model.start(container, currentRequest);
}
}
Modified: tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutAttributeVModel.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutAttributeVModel.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutAttributeVModel.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutAttributeVModel.java Sat Nov 14 14:00:02 2009
@@ -79,9 +79,9 @@
Map<String, Object> params) {
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, null);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, null);
model.execute(container,
ServletUtil.getComposeStack(request), (String) params
.get("name"), params.get("value"), (String) params
@@ -100,9 +100,9 @@
velocityContext).pop();
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, null);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, null);
model.end(container,
ServletUtil.getComposeStack(request), (String) params
.get("name"), params.get("value"), (String) params
Modified: tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutListAttributeVModel.java
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutListAttributeVModel.java?rev=836180&r1=836179&r2=836180&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutListAttributeVModel.java (original)
+++ tiles/sandbox/trunk/tiles3/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/PutListAttributeVModel.java Sat Nov 14 14:00:02 2009
@@ -77,9 +77,9 @@
velocityContext).pop();
TilesContainer container = ServletUtil.getCurrentContainer(
request, servletContext);
- Request currentRequest = VelocityTilesRequestContext
- .createVelocityRequest(container.getApplicationContext(),
- request, response, velocityContext, null);
+ Request currentRequest = VelocityTilesRequestContext
+ .createVelocityRequest(container.getApplicationContext(),
+ request, response, velocityContext, null);
model.end(container,
ServletUtil.getComposeStack(request), (String) params
.get("name"), VelocityUtil.toSimpleBoolean(