DisplayTag
  1. DisplayTag
  2. DISPL-582

The "format" property of a column should not apply to HREF parameter

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2
    • Component/s: Tag Library
    • Labels:
      None
    • Application server:
      N/A (Spring/Jetty)

      Description

      When you put a format in the <display:column>, the format is also applied to the parameter of the HREF. It is not a good thing as we expect a format for the user but a non-formatted value for the system (Freemarker example below should also work for plain JSP):

      <@displayTag.column title="ID" style="text-align: right;" href="products.action?" paramId="productId" property="id" format="{0,number,#,###}" />

      In this example, I expect to display my values with commas as thousand separator (displays "1,586,425" when the internal identifier stored as "1586425", a plain integer).

        Activity

        Hide
        William Rey added a comment -
        By looking in the code, it is possible to workaround by adding the "paramProperty" in the <column> tag:

        <@display.column title="ID" style="text-align: right;" href="products.action?" paramId="productId" property="id" paramProperty="id" format="{0,number,#,###}" />

        Sorry to have created this issue for nothing.
        Show
        William Rey added a comment - By looking in the code, it is possible to workaround by adding the "paramProperty" in the <column> tag: <@display.column title="ID" style="text-align: right;" href="products.action?" paramId="productId" property="id" paramProperty="id" format="{0,number,#,###}" /> Sorry to have created this issue for nothing.

          People

          • Reporter:
            William Rey
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: