[EMAIL PROTECTED] wrote:
> <display:table name="resultList" id="myTable">
> <display:column property="name" decorator="MailDecorator">
> </display:table>
>
> If I am right myTable contains the current row.
You are correct.
> So my MailDecorator looks like this:
>
> AddressBean addr = (AddressBean)
pageContext.getAttribute("myTable");
I think that your problem is here. You're basically getting the last
iteration of myTable, not the current iteration, so that will of course
always resolve to the same e-mail address.
> Is this an error or am I doing something wrong?
I think you're doing something wrong. And I can't tell you how to fix it.
But I'd make another suggestion as to how to do this, avoiding the
decorator issue entirely (the reason I always have trouble debugging
decorator problems is because I always avoid them :^).
Instead just use EL/JSTL to simplify the process:
<display:table name="resultList" id="myTable">
<display:column title="Name">
<a href="mailto:${myTable.email}">${myTable.name}</a>
</display:column>
</display:table>
Voila. You'll get a clickable e-mail link with the name as the link text.
No decorators. If you're not using JSP 2.4, you'll need to convert
${xxx} to <c:out value="${xxx}"/> and include the JSTL C taglib ref.
--
Rick Herrick
[EMAIL PROTECTED]
I haven't got time for inner peace.
"No reasonable definition of reality could be expected to permit
this."--Albert Einstein, Boris Podolsky and Nathan Rosen in 1935
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user