Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3305

formatNumber method in tld core does not check for null values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 8.0.2
    • None
    • None

      When having a zul with:

      <?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
      <label value="@load(c:formatNumber(item.price, '0.00'))" />

      and item.price is a null value then zk gives a message: Cannot format given Object as a Number.

      According to
      https://www.zkoss.org/wiki/ZUML%20Reference/EL%20Expressions/Core%20Methods/formatNumber
      it should be the same as CommonFns.formatNumber(Object, String)
      which according to the documentation should return an empty string if a null value is passed to it.

            Unassigned Unassigned
            yennor yennor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: