martin.sladecek at oracle.com
Wed Jan 23 04:25:54 PST 2013
On 01/18/2013 07:15 PM, Richard Bair wrote:
> I think using a ListBinding would work, in that we already pay attention both to the reference changing or the items changing. The main question will be around how sorting a ListBinding target works (does it update the source as well?). Particularly if the ListBinding is doing some filtering (or based on 5 source lists or something).
No, the bindings should not update the source, it's the same as with
other bindings. The new value (new List in this case) is computed when
the binding is evaluated, leaving the source untouched.
The reason why I don't like this idea is that we already know we need
some additional methods for the index translation and TransformationList
clearly states it is a wrapper around something.
While ListExpression (this is the right class to use in the API, not
ListBinding) doesn't have to be a wrapper around anything. It might be a
concatenation of 2 different lists or a per-element sum of 2 lists or
maybe some list representing a tokenized String.
Putting index translation methods into ListExpression would be confusing
and wouldn't fit into Bindings API much.
I would rather see some TransformationList to ListExpression conversion
and leave TransformationList separate of bindings.
More information about the openjfx-dev