Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1817 closed defect (fixed)

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

Reported by: gbettencourt@… Owned by: joose
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: Cc:
Blocked By: Blocking:

Description

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 13 years ago by bill

Milestone: 0.4.10.5
Owner: changed from bill to joose

comment:2 Changed 13 years ago by joose@…

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. http://joose.iki.fi/dojo/Form+Repeater.patch

comment:3 Changed 13 years ago by bill

Milestone: 0.50.4.1

comment:4 Changed 13 years ago by bill

Resolution: fixed
Status: newclosed

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

comment:5 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.