Menu

Newbie Question

Help
Julian Ray
2005-03-01
2012-10-08
  • Julian Ray

    Julian Ray - 2005-03-01

    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

     
    • Marcey R.

      Marcey R. - 2005-03-08

      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!

       

Log in to post a comment.

MongoDB Logo MongoDB