I've posted this question on stackoverflow as well: 
 
http://stackoverflow.com/questions/25670939/best-practice-for-managing-controlling-object-state-with-2-way-databinding-usi


On Monday, 8 September 2014 12:04:22 UTC-7, [email protected] wrote:
>
> I'm new to polymer (and getting back into web dev after a relatively long 
> absence), and I'm wondering what the recommended approach might be to more 
> closely manage object state while employing 2 way databinding.  I am 
> currently consuming rest API (json) objects.  My question is if polymer 
> keeps a copy of the original object before initiating updates to the bound 
> object's properties/attributes...so one might be able to easily undo the 
> changes?  While allowing 2 way databinding to work its magic is often 
> desired, there are cases where I'd like to prevent / delay changes to the 
> object / DOM until the user approves the changes (say via the paper-dialog 
> component for instance).  I suppose one could make a temporary copy of the 
> object and bind fields to that version, and then only persist the changes 
> back to the source object upon user approval.  In any case, I'd be 
> interested to hear thoughts and see an example or two of recommended 
> approaches (especially if I am off-track with my ideas!)
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/e31d47d5-0dd2-4b59-a8ce-10fd56ea7a95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to