Here is a summary of the changes we made to support this (minor, easy changes):
1) Create a ColumnListTag...
public class ColumnListTag extends AbstractColumnTag { ...
2) Create an AbstractColumnTag...
public abstract class AbstractColumnTag extends TemplateTag {
a) This holds all the common tag information between the EL and non EL versions.
3) Create an interfaces package with this class in it: public interface DisplayTagColumn {
a) Copy all the relative methods to this interface
4) Make HeaderCell, HeaderCellImpl, and AbstractDisplayColumn implement the DisplayTagColumnInterface
Make small changes throughout the code to refer to the interface instead of the concrete classes and you are good to go.
I am willing to submit my code if anyone thinks this is useful, maybe it's just me ;)
Matt Dowell
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am very intersted how to dynamicly set columns for displaytag. Is it the only solution, you posted here (or better to say, you're willing to post :)) or there are some "standardized" way to do it.
Do you know any online example?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am currently using my solution in production and it seems to work well. If anyone wants the source code I will be happy to zip it up and send it. Just reply with your email add.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! I am interested to the code you wrote. Can you send it to me at emanuelep@users.sourceforge.net?
Thanks! So, did you extend the current library defining a new tag columnList? I think that I need to add the new library, too, right?
Emanuele
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I require something like this to be able to give the functionality to the managers to be able to define their reports by selecting the fields they would like to see in their reports. Would be a great addition..
I am sure other people would also appreciate this feature.. can you please checkin the code or maybe if its too insignificant, could you please email
the code to me kris7077@yahoo.com
appreciate all the good work
thanks
kris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This functionality would be extremely useful in our project. We want the ability to have user defined table layouts.
Are there plans to have this code included within the display tag library code?
My vote is to have Matt submit his code.
Russell Giebelhaus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have added this functionality and I would like to see if we can merge our changes so we can keep up on all the good development being done.
Here is an example of how you use it:
<display:table name="requestScope.test" id="table" requestURI="/goforit">
<display:columnList columnList="requestScope.columns" />
</display:table>
Here is a summary of the changes we made to support this (minor, easy changes):
1) Create a ColumnListTag...
public class ColumnListTag extends AbstractColumnTag { ...
2) Create an AbstractColumnTag...
public abstract class AbstractColumnTag extends TemplateTag {
a) This holds all the common tag information between the EL and non EL versions.
3) Create an interfaces package with this class in it: public interface DisplayTagColumn {
a) Copy all the relative methods to this interface
4) Make HeaderCell, HeaderCellImpl, and AbstractDisplayColumn implement the DisplayTagColumnInterface
Make small changes throughout the code to refer to the interface instead of the concrete classes and you are good to go.
I am willing to submit my code if anyone thinks this is useful, maybe it's just me ;)
Matt Dowell
I am very intersted how to dynamicly set columns for displaytag. Is it the only solution, you posted here (or better to say, you're willing to post :)) or there are some "standardized" way to do it.
Do you know any online example?
I am currently using my solution in production and it seems to work well. If anyone wants the source code I will be happy to zip it up and send it. Just reply with your email add.
Hi! I am interested to the code you wrote. Can you send it to me at emanuelep@users.sourceforge.net?
Thanks! So, did you extend the current library defining a new tag columnList? I think that I need to add the new library, too, right?
Emanuele
Whomever wants the source package, can you email me directly at mdowell -at- gmail.com
I have tried responding to a few of you and the server will not let it through. Thanks.
Matt
I require something like this to be able to give the functionality to the managers to be able to define their reports by selecting the fields they would like to see in their reports. Would be a great addition..
I am sure other people would also appreciate this feature.. can you please checkin the code or maybe if its too insignificant, could you please email
the code to me kris7077@yahoo.com
appreciate all the good work
thanks
kris
This functionality would be extremely useful in our project. We want the ability to have user defined table layouts.
Are there plans to have this code included within the display tag library code?
My vote is to have Matt submit his code.
Russell Giebelhaus
When you can specify dynamic columns, can you also specify sorting on each column?
Sri
Yes, your ColumnImpl class would implement all the methods / attributes that displaytag needs.
Can you be more specific. May be include the code like the one on your first email...
<display:table name="requestScope.test" id="table" requestURI="/goforit">
<display:columnList columnList="requestScope.columns" />
</display:table>
How do you specify sorting attribute to the above lines...Any help is greately appreciated...
Sri
..and I forgot to mention, it is backwork compatable.
Note: I attached the my zipped src package to the JIRA for this.