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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.2.1
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: