I have a list of beans which I would like to display but don't want to hard-code the column info into a JSP page. Rather, I have a renderer which knows how to display the bean in various ways depending on the view context.
Is it possible to write the display tag info using another taglib for example:
<mytag:renderDisplayTag param1='... />
Perhaps there is a better way which I have yet to discover. Any help appreciated.
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do the same thing...here's how:
At some point in the page above the <display:table> populate the request with a label from your resource bundle, using a custom tag you create which just populates the request, e.g.
<mytag:populateRequest name="dateLabel" label="label.billing.statementHistory.column.date" />
Then in your <display:column> use the variable from the request as the title:
I have a list of beans which I would like to display but don't want to hard-code the column info into a JSP page. Rather, I have a renderer which knows how to display the bean in various ways depending on the view context.
Is it possible to write the display tag info using another taglib for example:
<mytag:renderDisplayTag param1='... />
Perhaps there is a better way which I have yet to discover. Any help appreciated.
Thanks in advance
I do the same thing...here's how:
At some point in the page above the <display:table> populate the request with a label from your resource bundle, using a custom tag you create which just populates the request, e.g.
<mytag:populateRequest name="dateLabel" label="label.billing.statementHistory.column.date" />
Then in your <display:column> use the variable from the request as the title:
<display:column sortable="true" headerClass="sortable" property="date1" title="<%=dateLabel%>" />
Hope this helps!