Hi  Peter, Roberto

I think the correct way to use decorator is as follows:

<display:table name="resultList" id="myTable"
decorator="com.abc.xyz.MailDecorator">
        <display:column property="name" title="Name"/>
</display:table>


public class MailDecoratorextends TableDecorator{

        //displaytag comes to this decorator class first and see if you
have overwritten any of the properties  //getters, if yes, get value
returned from here else goes and get it from your resultList
        public String getName()
        {
                AddressBean addr = (AddressBean)getCurrentRowObject();
                String name = addr.getName();
                //addr is your current row, do whatever processing you
want to do with name and return it
                //the returned string would be rendered in your
displaytag table
                return name;
        }

}

Hope this helps,
Bhumit Mody


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, July 20, 2006 3:04 PM
To: [email protected]
Subject: displaytag-user Digest, Vol 3, Issue 25

Send displaytag-user mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/displaytag-user
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of displaytag-user digest..."


Today's Topics:

   1. Is there any display:setProperty to access sort url generated
      by dispaly (vhedge)
   2. Re: Is it an error in DisplaytagColumnDecorator?
      (Roberto Leiva M. (Lista))


----------------------------------------------------------------------

Message: 1
Date: Wed, 19 Jul 2006 22:46:32 -0700 (PDT)
From: vhedge <[EMAIL PROTECTED]>
Subject: [displaytag-user] Is there any display:setProperty to access
        sort url generated by dispaly
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii


Hi Tech pals,
   I would like to know is there any mechanism [ like,
name="paging.banner.full" through which we will be able to access href
of
pagination ] to access SORT urls generated by the display:column taglib
if
the column is made sortable.

If there is no property, provided by displaytag framework for my
requirement, please do let me know your ideas of how to achive the same.

Thanks in Advance,
vhedge
-- 
View this message in context:
http://www.nabble.com/Is-there-any-display%3AsetProperty-to-access-sort-
url-generated-by-dispaly-tf1970412.html#a5409275
Sent from the DisplayTag - General forum at Nabble.com.




------------------------------

Message: 2
Date: Thu, 20 Jul 2006 11:28:35 -0400
From: "Roberto Leiva M. (Lista)" <[EMAIL PROTECTED]>
Subject: Re: [displaytag-user] Is it an error in
        DisplaytagColumnDecorator?
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Rick Herrick escribi?:
> [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.

I have the same problem.... I try to get the current row(bean) from my
custom decoratorColumn.

you know howto get the current row (bean) from the pageContext or an
other way ???


regards.

--
Roberto Leiva M.
Santiago - Chile




------------------------------

------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V

------------------------------

_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user


End of displaytag-user Digest, Vol 3, Issue 25
**********************************************

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to