Sorry to keep questioning your commits, but I just want to clarify
one thing:
The purpose of the direct attribute is to allow you to insert HTML
directly as the value of the tile, perhaps like this:
<tiles:put name="something" value="<title>Something</title>"
direct="true"/>
as opposed to
<tiles:put name="something" value="/somepage.jsp"/>
Also you are supposed to be able to use the body of the <put> tag as
the value:
<tiles:put name="something">
<title>something</title>
</tiles:put>
If this type of behavior is still supported by the removal of the
direct attribute then I am +1 for this change.
Thanks,
Greg
On Sep 27, 2006, at 6:43 AM, [EMAIL PROTECTED] wrote:
Author: apetrelli
Date: Wed Sep 27 04:43:33 2006
New Revision: 450403
URL: http://svn.apache.org/viewvc?view=rev&rev=450403
Log:
SB-21
Removed "direct" attribute from <tiles:put> and <tiles:add>
Modified:
struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/
tiles/taglib/PutTag.java
struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-
INF/tiles-core.tld
Modified: struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/
apache/tiles/taglib/PutTag.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-
core/src/main/java/org/apache/tiles/taglib/PutTag.java?
view=diff&rev=450403&r1=450402&r2=450403
======================================================================
========
--- struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/
tiles/taglib/PutTag.java (original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/
tiles/taglib/PutTag.java Wed Sep 27 04:43:33 2006
@@ -71,11 +71,6 @@
private Object value = null;
/**
- * JSP Template compatibility.
- */
- private String direct = null;
-
- /**
* Requested type for the value.
*/
private String valueType = null;
@@ -113,7 +108,6 @@
attributeName = null;
valueType = null;
- direct = null;
value = null;
role = null;
body = null;
@@ -179,14 +173,6 @@
}
/**
- * Set direct.
- * Method added for compatibility with JSP1.1.
- */
- public void setDirect(String isDirect) {
- this.direct = isDirect;
- }
-
- /**
* Set type.
*/
public void setType(String value) {
@@ -243,21 +229,16 @@
// Test body content in case of empty body.
if (body != null) {
realValue = body;
+ valueType = "string";
} else {
realValue = "";
}
}
// Is there a type set ?
- // First check direct attribute, and translate it to a
valueType.
- // Then, evaluate valueType, and create requested typed
attribute.
- // If valueType is not set, use the value "as is".
- if (valueType == null && direct != null) {
- if (Boolean.valueOf(direct).booleanValue() == true) {
- valueType = "string";
- } else {
- valueType = "page";
- }
+ // If valueType is not set, defaults to "page".
+ if (valueType == null) {
+ valueType = "page";
}
}
@@ -321,7 +302,7 @@
// Do we need to evaluate body ?
if (value == null) {
- return EVAL_BODY_TAG;
+ return EVAL_BODY_BUFFERED;
} else {
// Value is set, don't evaluate body.
return SKIP_BODY;
Modified: struts/sandbox/trunk/tiles/tiles-core/src/main/resources/
META-INF/tiles-core.tld
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-
core/src/main/resources/META-INF/tiles-core.tld?
view=diff&rev=450403&r1=450402&r2=450403
======================================================================
========
--- struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-
INF/tiles-core.tld (original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-
INF/tiles-core.tld Wed Sep 27 04:43:33 2006
@@ -240,17 +240,6 @@
</description>
</attribute>
<attribute>
- <name>direct</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- <![CDATA[
- <p>Determines how content is handled: true means content is
- printed <em>direct</em></p>
- ]]>
- </description>
- </attribute>
- <attribute>
<name>type</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
@@ -329,19 +318,6 @@
<p>Element value. Can be a String or Object.</p>
]]>
</description>
- </attribute>
- <attribute>
- <name>direct</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- <![CDATA[
- <p>
- Determines how content is handled: true means content is
- printed <em>direct</em>
- </p>
- ]]>
- </description>
</attribute>
<attribute>
<name>type</name>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]