You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ap...@apache.org on 2007/01/08 14:06:01 UTC
svn commit: r494053 - in /struts/sandbox/trunk/tiles/tiles-core/src/main:
java/org/apache/tiles/taglib/ resources/META-INF/ resources/META-INF/tld/
Author: apetrelli
Date: Mon Jan 8 05:05:59 2007
New Revision: 494053
URL: http://svn.apache.org/viewvc?view=rev&rev=494053
Log:
Various fixes araised when creating showcase.
Added:
struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-INF/tld/
struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-INF/tld/tiles-core.tld
- copied, changed from r492128, struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-INF/tiles-core.tld
Removed:
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/ImportAttributeTag.java
struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/RenderTagSupport.java
Modified: struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/ImportAttributeTag.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/ImportAttributeTag.java?view=diff&rev=494053&r1=494052&r2=494053
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/ImportAttributeTag.java (original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/ImportAttributeTag.java Mon Jan 8 05:05:59 2007
@@ -38,6 +38,15 @@
*/
public class ImportAttributeTag extends AttributeTagSupport {
+ private String toName;
+
+ public String getToName() {
+ return toName;
+ }
+
+ public void setToName(String toName) {
+ this.toName = toName;
+ }
/**
* Expose the requested property from component context.
@@ -46,7 +55,8 @@
*/
public void execute() throws JspException {
if (attribute != null) {
- pageContext.setAttribute(name, attribute.getValue(), scope);
+ pageContext.setAttribute(toName != null? toName : name,
+ attribute.getValue(), scope);
} else {
Iterator names = componentContext.getAttributeNames();
while (names.hasNext()) {
Modified: struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/RenderTagSupport.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/RenderTagSupport.java?view=diff&rev=494053&r1=494052&r2=494053
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/RenderTagSupport.java (original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/RenderTagSupport.java Mon Jan 8 05:05:59 2007
@@ -21,6 +21,8 @@
*/
package org.apache.tiles.taglib;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.tiles.ComponentAttribute;
import org.apache.tiles.TilesException;
import org.apache.tiles.access.TilesAccess;
@@ -51,6 +53,8 @@
*/
public abstract class RenderTagSupport extends ContainerTagSupport
implements TryCatchFinally, PutTagParent {
+
+ private static Log LOG = LogFactory.getLog(RenderTagSupport.class);
protected String preparer;
protected boolean flush;
@@ -98,7 +102,7 @@
}
public void doCatch(Throwable throwable) throws Throwable {
- // noop;
+ LOG.error("Error during rendering", throwable);
}
public void doFinally() {
Copied: struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-INF/tld/tiles-core.tld (from r492128, 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/tld/tiles-core.tld?view=diff&rev=494053&p1=struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-INF/tiles-core.tld&r1=492128&p2=struts/sandbox/trunk/tiles/tiles-core/src/main/resources/META-INF/tld/tiles-core.tld&r2=494053
==============================================================================
--- 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/tld/tiles-core.tld Mon Jan 8 05:05:59 2007
@@ -693,6 +693,17 @@
</description>
</attribute>
<attribute>
+ <name>toName</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description>
+ <![CDATA[
+ <p>Name of the destination attribute. If not specified, the name will
+ be the same as specified in <code>name</code> attribute</p>
+ ]]>
+ </description>
+ </attribute>
+ <attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>