That was my first thought as well, though I had envisioned it as a function
defined in a <bxml:script> block rather than a method on a class. This would be
pretty easy to do - we'd just have to come up with an appropriate
cross-language "function" syntax. The Java/JavaScript method syntax
("myFunction()") is probably sufficient.
We could even potentially support multiple bindings this way:
<PushButton enabled="${foo(var1, var2)}"/>
G
On Aug 23, 2010, at 3:19 PM, Duto wrote:
>
> In fact the problem is to transform a class to a other,
> In my case the problem is I have TableView.selectedRanges propertie (to
> indicate the modification of item selection) and the the PushButton.enabled
> propertie. If I have a mecanism to transform the TableView.selectedRanges to
> Boolean via a method (myMethod) it's will be nice like this :
>
> <ListView bxml:id="listView">
> ....
> </ListView>
> <PusButton bxml:id="pushBtn" enable="${myMethod(listView.selectedRanges)}/>
>
> and my method :
>
> public Boolean myMethod(ListSelection selectedRanges) {
> return (selectedRanges.getLength() == 0) ? false : true;
> }
>
> I don't think if it's possible and solve all problems but it's a start ^^
>
>
>
> --
> View this message in context:
> http://apache-pivot-users.399431.n3.nabble.com/Question-of-new-dynamic-data-binding-model-of-pivot-2-0-tp1292820p1297981.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.