Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1895

handle empty city in ordercontactinfo.ftl

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • Release Branch 4.0, Trunk
    • order
    • None
    • ubuntu 8.10, java 1.6, postgres 8.2

    Description

      this expression in applications/order/webapp/ordermgr/order/ordercontactinfo.ftl (line 83) fails if city is empty:

      ${postalAddress.city}

      so changed it to ${postalAddress.city?if_exists} and it's ok. simply add ?if_exists

      context:

      <#if postalAddress.toName?has_content><span class="label">${uiLabelMap.CommonTo}</span> ${postalAddress.toName}<br/></#if>
      <#if postalAddress.attnName?has_content><span class="label">${uiLabelMap.CommonAttn}</span> ${postalAddress.attnName}<br/></#if>
      ${postalAddress.address1}<br/>
      <#if postalAddress.address2?has_content>${postalAddress.address2}<br/></#if>
      ${postalAddress.city?if_exists}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId} </#if>
      ${postalAddress.postalCode?if_exists}<br/>
      ${postalAddress.countryGeoId?if_exists}<br/>
      <#if !postalAddress.countryGeoId?exists || postalAddress.countryGeoId == "USA">

      Attachments

        1. ordercontactinfo.ftl.diff
          1 kB
          Luke Prentice

        Activity

          People

            jleroux Jacques Le Roux
            lukeprentice Luke Prentice
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified