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
5
votes
1 answer

How can I update a object value by retrieving variable names from string?

I have a JavaScript object which looks like this. var myObj = [ { "HOLIDAY": { "Sun": "Date", "Mon": "Date", "Tue": "Date", "Wed": "Date", "Thr": "Date", "Fri": "Date", "Sat": "Date" } } ] and…
5
votes
3 answers

Trim method in databinding android

Is it possible trim() method is work on two ways data binding, when getting info from XML. If yes how? android:text='@={contact.contactDetails.name}'
5
votes
2 answers

How can I bind a Winform textbox to a class property?

I have read a number of questions on Stack Overflow and elsewhere that describe tying a textbox to a class but I cannot seem to even get the basics working without receiving an error from VS when compiling. (1) What I want to accomplish is to…
Bill
  • 582
  • 1
  • 7
  • 21
5
votes
4 answers

Polymer inter-component data binding?

I have a login component, and I'd like to make the login status available for other components in my application. Can anyone provide working code or examples? I need some sort of binding or eventing at least, so that when the login status changes,…
4
votes
1 answer

Data Binding EditText set null was replaced by set empty String

I have created a sample project which can reproduce this problem. Expected Behaviour I have an EditText. I have a TextView which shows the error about the input in this EditText. I also have a reset button which can reset the input inside…
Sira Lam
  • 5,179
  • 3
  • 34
  • 68
4
votes
1 answer

How to get notified when property changes in Android databinding?

I would like to get notified when property changes in my variable. In my Activity: viewDataBinding = DataBindingUtil.setContentView(this, R.layout.list); viewDataBinding.setViewFilter(viewFilter); My model: public class ViewFilter extends…
pixel
  • 24,905
  • 36
  • 149
  • 251
4
votes
1 answer

Trying to implement data binding in a Dialog in Android

I am trying to implement data binding in my android application. I have a Dialog as my login which sits over my main activity something like this this is my main activity public class MapsActivity extends FragmentActivity { …
4
votes
2 answers

AngularJS controller $scope not working inside ng-if directive

I have a login form but for some reason the data is not being binded between the HTML and the controller. This is my code: home.html

Welcome!

Some other welcome content...

Alvaro Pedraza
  • 1,176
  • 6
  • 20
  • 44
4
votes
1 answer

Prevent sending data to model if field in invalid in Angular 2

I Have a template-driven form with two-way data binding and validator How can I prevent sendind data from input do model if there are some validation errors? In my model I want to have only correct…
Jarosław Rewers
  • 1,059
  • 3
  • 14
  • 23
4
votes
1 answer

Android two-way databinding with radio button

I am trying to bind in two ways boolean value of my model to RadioButton. However, the code doesn't compile. I have following error messages: Error:(41, 21) error: variable receiveDataContainer is already defined in method onChange() Error:(45,…
4
votes
2 answers

2-way databinding with ObservableField<>, set() doesn't work?

I have a parent class, lets call it BaseViewModel, this class can be typed and have an ObservableField of the same type. Like this : public class BaseViewModel extends BaseObservable { ObservableField value = new ObservableField<>(); …
MHogge
  • 5,408
  • 15
  • 61
  • 104
4
votes
1 answer

Is there any 2-way(bidirectional) map in Qt?

Is there any 2-way(bidirectional) map in Qt? Simple map that implements 1-to-1 correspondence. Thanks
htzfun
  • 1,231
  • 10
  • 41
4
votes
1 answer

Polymer 1.0 Binding to sub-properties of not initialized object

I'd like to do two-way data binding on not initialized object. It looks like this: host-element.html JS: Polymer({ is: 'profile-editor', properties:…
4
votes
1 answer

What's the difference between binding to [[var]] and {{var}} in Polymer 1.x?

I am familiar with bindings with curly braces, like {{variable}}, from Polymer 0.5. However, in examples and code snippets for the release version of Polymer, I've begun to notice bindings with square brackets, such as [[variable]], as well. Does…
4
votes
2 answers

how to bind angularjs objects to their keys and values

I read through some articles on angular model binding, and just out of curiousity, I was wondering if its possible to bind keys to input too, http://jsfiddle.net/x3azn/jM28y/4/ so I am hoping ot update the main arr through the input boxes and…
user2167582
  • 5,986
  • 13
  • 64
  • 121
1 2
3
22 23