PDA

View Full Version : [OPEN-983] Compositefield doesn't work properly with trackResetOnLoad



astoltz
20 May 2010, 12:45 PM
Ext version tested:


Ext 3.2.1



Adapter used:


ext



css used:


only default ext-all.css





Browser versions tested against:


All



Operating System:


WinXP Pro



Description:


trackResetOnLoad makes no difference for composite fields. trackResetOnLoad is processed in setValues of basicform, including the step to track originalValue. This logic is never called for the compositefield's originalvalues, yet isdirty still asks its fields if they're dirty. This results in isDirty comparing against the original originalValue rather than the one last set by setValues().



Test Case:




Steps to reproduce the problem:


Create a composit field
Set trackResetOnLoad to true
Call setValues() on the form
see value of getFieldValues(true)



The result that was expected:


Field will not be marked dirty



The result that occurs instead:


Field is marked dirty



Screenshot or Video:


attached



Possible fix:


Make the logic to set originalValue as a new function of Field, and override it in compositField to cascade.