Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1817 closed defect (fixed)

Form widget setValues method should not empty out text input elements value

Reported by: [email protected] Owned by: joose
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: Cc:
Blocked By: Blocking:


Not sure if this is a bug, or an enhancement request, but the form widgets setValues method will set a text input elements value to the empty string if that element is not in the passed in value object. Other elements in the switch simply continue if the value is not in the object. This is a limitation, because on large forms, when I go back to the server, I only want to pass back values that have changed in a json object and call setValues on the form. If this is common paradigm, I think the form widget should leave text input element alone if the value is not in the value object. We might even be able to improve the performance of the setValues method by looping through the values object rather then the form elements.

Change History (5)

comment:1 Changed 15 years ago by bill

Owner: changed from bill to joose

comment:2 Changed 15 years ago by [email protected]

ignoreNullValues: true == does what you wanted
ignoreNullValues: false == current behaviour, also default action.

I've submitted patch to Bill, but you can also try it yourself before it gets commited.

comment:3 Changed 15 years ago by bill


comment:4 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

(In [6429]) Patch from Joose (CLA on file). Fixes #1817, #1818.

comment:5 Changed 15 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.