Ticket #286 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

form value is '0' when putting 'null' in the JsonObject

Reported by: bc Owned by: freya
Priority: major Milestone: 0.4
Component: modules/kauri-forms Version: trunk
Keywords: JsonObject Decimal Cc:

Description

When I put a null in a JsonObject? (jsonObject.put("key", null) ) a json-string {"key", null} is created.
when using this json-string as wire-value for a decimal control, the value in the form-field is "0" and not empty.

Change History

comment:1 Changed 3 years ago by freya

  • Owner changed from mpo to freya
  • Status changed from new to assigned

to check: wire-value parsing in decimal field

comment:2 Changed 3 years ago by freya

This occurs because inside the numeric parsing Javascript converts the 'null' to a number, and results in a '0'. What is the desired behavior? Should 'null' in an object be handled just like an 'undefined'?

comment:3 Changed 3 years ago by freya

  • Status changed from assigned to closed
  • Resolution set to fixed

fixed in r1595

'null' values are formatted as ""

Note: See TracTickets for help on using tickets.