Alex Harui wrote > So instead of: > <mdl:Button text="DISABLED" raised="true"> > > <mdl:beads> > > <mdl:Disabled/> > > </mdl:beads> > </mdl:Button> > > It would look like: > <mdl:Button text="DISABLED" raised="true"> > > <mdl:beads> > > <js:ConditionalBead if="{data.twitter == null}"> > > <mdl:Disabled/> > > </js:ConditionalBead> > > </mdl:beads> > </mdl:Button>
I'm not sure how this would work. I assume ConditionalBead is added to the strand and stays there, listening to changes in data.twitter. Now suppose data.twitter goes from null to non-null. What's supposed to happen? How is the button state changed to enabled? Simply calling removeBead won't automatically do it. Now, what happens when data.twitter goes back to null? Are you suggesting to keep Disabled as a member of ConditionalBead? If so, it doesn't look like we've saved any memory and we could have just as well put the binding condition on the Disabled bead. What am I missing? -- View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-How-to-set-beads-based-on-a-condition-tp57798p57879.html Sent from the Apache Flex Development mailing list archive at Nabble.com.