Flex Data Binding

Yesterday Joe Rinehart blogged about using the ternary operator in Flex data binding. I was glad to see this post as I'm in the middle of my first Flex project and I find my self using this technique quite a bit. Here is just one example, which changes a text input's background color to red if it has a negative value.

[More]

Comments
Jonathan Branam's Gravatar Binding is great! Remember that Flex will setup listeners on all the properties that are mentioned in the code you write in the binding expression. E.g. in your first one it will watch txtTotal AND txtTotal.txt for changes and update backgroundColor. It will watch model AND model.total for changes and update text. Also, you don't need parseInt('B9FFFF',16), just write 0xB9FFFF.
# Posted By Jonathan Branam | 5/23/08 11:40 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.