Community
Participate
Working Groups
Add support to bind against single list entries. Model example: class Person { List<String> hobbies; } There should be a way to bind against a single hobby from this list.
Just want to clarify: It would be nice if given the Person object, we can observe (for example) the nth hobby.
So something like this? IObservableList list = ... IObservableValue item4 = Observables.observeListElement(list, 4) We could possibly also allow using an IObservableValue to control which index to get at. Is this what you're looking for?
Yes. That's what I'm looking for. What about modifications to the list after the creation of the IObservableValue for the item? Would this be solved by also having the index as an IObservableValue?
EMF-Databinding introduced support for this using the properties-API but we are not forcing a specific index but pass a callback which calculates the index to observe
See also bug 300043 which had a ListReducers proposal of which one of the reducers was to use the element at the nth index. This is potentially more generically applicable.
(In reply to comment #5) > See also bug 300043 which had a ListReducers proposal of which one of the > reducers was to use the element at the nth index. This is potentially more > generically applicable. Yeah this one looks very similar to ours but ours has the difference that we also allow to write back to the list.