Rather than adding two new tags to the tag library, I think it'd be easier to
make enhancements such as the following:
1. If the <display:column> has a body, then use that as the title.
<display:column property="fullName" sort="true" width="15%"
title='<%=resources.getMessage("userForm.fullName")%>' />
could become (in struts):
<display:column property="fullName" sort="true" width="15%">
<bean:message key="userForm.fullName"/>
</display:column>
However, the problem with this is that it'd be nice to expose the object for
use with an expression like syntax, so the following would be possible:
<display:column property="fullName" sort="true" width="15%">
<input type="checkbox" name="fullName${status.index}"
value="${userForm.fullName}"/>
</display:column>
This however, would require that we add a "display:title" tag similar to what
you're suggesting - but it would make it easier to get rid of the decorator
pattern and allow customization in the JSP.
Anyone else have any comments on this?
Matt
> Hello Display,
>
> I try to make some enhancements, connected with adding <title> and
> <control> tags inside <column> tag.
>
> The function of first is to set title property in the parent <column>
> tag by the value of its body. So if title attribute of the <column>
> tag is set, it will be replaced.
> Example:
> <display:column ...>
> <display:title>My title</display:title>
> </display:column>
>
> The function of second is to set special decorator for column and
> store the body of itself in <column> tag so the special property of
> decorator can be set in <table> tag and value of the column can be
> decorated properly.
> For the first time i choose such way of using <control> tag.
> Inside its body we use template string with "{0}" token means the
> current value of the column.
> Example:
> <display:column ...>
> <disp:control><input type="checkbox" name="cb_{0}"></disp:control>
> </display:column>
>
> The main goal of this example is to try to cooperate with You and
> hear some thougths about this solutions. Again, I try to prepare
> first patch to understand the way it can be done correct and to get
> some code convetion adviseses and recomendation for project
> integration. So this first patch is very simple.
>
> And a little question...
> When i tried to use command recommended by to create patch
>
> cvs -q diff -b -u -N > patch.diff
>
> I discovered, that my new files, that can't be included in CVS (it is
> certainly read only for me) wasn't included in patch.diff, though I
> used -N option. So i placed them in patch.zip file in /src folder,
> and patch.diff in that case holds changes for existed files only.
> So how to include them in my patch file correctly if I did something
> wrong?
> Now it is only me, who responsible for Display taglib enhancements so
> we don't need to create local cvs repository for this project now.
>
> Hope, my patch works ...
>
> --
> Best regards,
> Andrew mailto:[EMAIL PROTECTED]
-- Matt Raible, Raible Designs, Morrison CO US
-- Tel: +1 303 979-5340
-- Mob: +1 720 560-8460
-- Fax: +1 508 256-6471
-- Web: http://www.raibledesigns.com
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel