tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Cockrill <jamie.cockr...@gmail.com>
Subject Re: ViewPreparers and InsertAttributeTag
Date Mon, 14 Jun 2010 12:19:28 GMT
Antonio,

Many thanks for your help, that seems to have largely done the trick.
The JIRA is at: https://issues.apache.org/jira/browse/TILES-511

Jamie

On 14 June 2010 13:12, Antonio Petrelli <antonio.petrelli@gmail.com> wrote:
> 2010/6/14 Jamie Cockrill <jamie.cockrill@gmail.com>:
>>         attributeContext.putAttribute(
>>             "my.attribute.name",
>>             new Attribute("This is the value added by the ViewPreparer"));
>>...
>> <tiles:insertAttribute value="${some EL which returns
>> 'my.attribute.name'}" flush="true" />
>>
>> When I attempt to render the page, I receive a stack trace with the
>> following root cause:
>>
>> java.lang.ClassCastException: java.lang.String cannot be cast to
>> org.apache.tiles.Attribute
>
> From the docs:
>
> http://tiles.apache.org/framework/tiles-jsp/tlddoc/tiles/insertAttribute.html
> name: Name of the attribute to insert. This attribute will be ignored
> if the value attribute is specified.
> value: Attribute object to render directly. If it specified, the name
> attribute will be ignored.
>
> Thus, use "name".
>
> Antonio
>
> P.S. Where's the JIRA issue?
>

Mime
View raw message