Hi

I have a java object which I am passing into a tiles tag. For example:

I can print out pcobj outside of the tags


<@tiles.insertDefinition name="pagination.tile">
    <@tiles.putAttribute name="personalContact" value=pcobj />
</@tiles.insertDefinition>


in my pagination tile I am doing:


<@tiles.importAttribute name="personalContact" />

EMAIL : ${personalContact.email} <br/>
FIRST NAME: ${personalContact.firstName} <br/>
LAST NAME: ${personalContact.lastName} <br/>


However I am getting the following

Attribute with name 'personalContact' not found
The problematic instruction:
----------
==> user-directive tiles.importAttribute [on line 3, column 1 in
WEB-INF/freemarker/pagination.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Attribute with name
'personalContact' not found
    at
freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:479)
    at freemarker.core.Environment.visit(Environment.java:230)
    at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116)
    at freemarker.core.Environment.visit(Environment.java:196)
    at freemarker.core.MixedContent.accept(MixedContent.java:92)
    at freemarker.core.Environment.visit(Environment.java:196)
    at freemarker.core.Environment.process(Environment.java:176)
    at freemarker.template.Template.process(Template.java:232)


I would be grateful if anyone could advise me on what i'm doing wrong..

Cheers

Amin

Reply via email to