Questions tagged [2-way-object-databinding]

Two-way data binding (bidirectional data binding) refers to two components acting as the source object for the destination properties of each other.

333 questions
130
votes
10 answers

React input defaultValue doesn't update with state

I'm trying to create a simple form with react, but facing difficulty having the data properly bind to the defaultValue of the form. The behavior I'm looking for is this: When I open my page, the Text input field should be filled in with the text of…
121
votes
15 answers

Angular 2 two way binding using ngModel is not working

Can't bind to 'ngModel' since it isn't a know property of the 'input' element and there are no matching directives with a corresponding property Note: im using alpha.31 import { Component, View, bootstrap } from 'angular2/angular2' @Component({ …
yajra
  • 1,335
  • 2
  • 9
  • 11
52
votes
3 answers

angular2: Error: TypeError: Cannot read property '...' of undefined

I have attached the plunker of my angular2 code piece. I want to print a field from my JSON but unable to print that as initially my Object is null and it is being populated via a Promise. This is my component file import {Component, NgModule,…
Partha Sarathi Ghosh
  • 10,936
  • 20
  • 59
  • 84
43
votes
2 answers

Where to place android BindingAdapter method?

This has to be the most basic of question but after a full day of reading tutorials and the documentation here I can't seem to understand where to put these methods. None of the guides mention where this thing is placed it just mentions to use the…
chaser
  • 3,107
  • 4
  • 29
  • 34
26
votes
6 answers

Edittext cursor resetting to left after Android Data Binding update

I am trying out the new Android Data Binding library (1.0-rc1) and I have made a User object with three String fields (name, email, and age) and linked them to 3 EditTexts in my layout. On the first field (name) I placed a TextWatcher. Everything…
Carl Poole
  • 1,970
  • 2
  • 23
  • 28
23
votes
2 answers

Angular2 - two way databinding on a component variable / component class property?

In Angular2 (Beta 6) I have a component for a main menu. I want to bind a boolean for wide or narrow. So I made it into this: But what I want (I think) is to bind to a javascript…
DanAbdn
  • 7,151
  • 7
  • 27
  • 38
23
votes
8 answers

Angular2 two-way data binding

I know Angular2 doesn't have two-way data binding but is there a way to mimick the two-way data binding behavior from Angular1.x?
Ronald Wildenberg
  • 31,634
  • 14
  • 90
  • 133
22
votes
3 answers

How do data binding engines work under the hood?

Technically, how does data binding engines work under the hood? Especially, how does the mechanism of the "synchroniser" in data binding look like and work like? In many frameworks like in .NET, Java, Flex, etc, they provide a data binding engine. I…
Carven
  • 14,988
  • 29
  • 118
  • 161
21
votes
5 answers

How do I fix "Two-way binding requires Path or XPath" exception in WPF Datagrids?

Background/context for this question: I have a WPF desktop application. It uses LINQ to SQL to connect to its SQL database, and it displays its data in WPF Datagrids. It was working fairly well, but performance was a problem because LINQ can be…
Dronz
  • 1,970
  • 4
  • 27
  • 50
17
votes
2 answers

Android Spinner Setting Selection with 2-Way Binding

I am struggling to get some functionality to work with Android spinners when configured with 2-way databinding. I would like to set the initial value of the spinner via the 2-way databinding on android:selectedItemPosition. The spinner entries are…
Adrian Medioli
  • 391
  • 1
  • 2
  • 8
16
votes
4 answers

2-way data binding in native web components

I've been reading up on web components and am pretty intrigued by the nascent spec. Does anyone know if there is any support for 2-way data binding in the DOM, without having to use Polymer? An example would be appreciated.
aamiri
  • 2,420
  • 4
  • 38
  • 58
11
votes
3 answers

How does AngularJS implement its two-way data binding mechanism?

AngularJS allows you to implement two-way data binding. However, the interesting part is how it detects model changes? The model is usually a plain object like the code below. We can change the name property of $scope.user but how does AngularJS…
mind1n
  • 1,196
  • 3
  • 15
  • 34
8
votes
3 answers

Room annotation processor with Data binding

I have used Data binding in my existing code and now I am migrating to Room for persistence. I have followed the steps mentioned in Florina's Blog for room My Code builds fine without java code error or BR related error when I remove room…
8
votes
4 answers

Android Bindings Stopped working

Just suddenly my bindings for android stoped working, anything I build now, I just get this message. Error:Execution failed for task ':app:compileDevDebugJavaWithJavac'. java.lang.RuntimeException: Found data binding errors. ****/ data binding…
8
votes
1 answer

c# binding to fields on a nested object

I can't seem to find a simple, concrete explanation of how to bind controls in a WinForms app to nested objects using data binding. For example: class MyObject : INotifyPropertyChanged { private string _Name; public string Name { …
1
2 3
22 23