Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3322

Option to handle NULL values with <s:text> tag

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.1
    • Component/s: None
    • Labels:
      None

      Description

      <s:text> tag currently diaplays "null" if passed a NULL parameter value. Would be better to display an empty string (or allow user to specify a "default" value as the <property> tag allows). The following code will print "null" in the UI if "itemPrice" is null.

      jsp file:
      <s:text name="format.money"><s:param value="#itemPrice"/></s:text>

      package.properties file:
      format.money =

      {0,number,\u00A4###,##0}

        Attachments

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              burtonrhodes Burton Rhodes
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: