flex4 数据绑定的问题

 这里说数据绑定将无法检测对maximum的制定!!跪求高人!...  这里说数据绑定将无法检测对maximum的制定!!跪求高人! 展开
 我来答
fqxdcvouun
2011-08-24 · TA获得超过311个赞
知道答主
回答量:663
采纳率:100%
帮助的人:384万
展开全部
补充:你把所需要显示的列表的dataProvider和你自己定义的那个ArrayCollection用BindingUtils邦定,只要你的这个ArrayCollection的值发生了变化,那么你显示出来的列表随时也跟着变了。

可以通过使用mx.binding.utils.BindingUtils类来实现
其中有一个方法bindProperty(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher

使用时比如
BindingUtils.bindProperty(list,"dataProvider",this,"thisData");
或者
BindingUtils.bindProperty(textInput, "text", userVO, "name");
具体的帮助中是这样写的:(可以参见)
bindProperty () method

public static function bindProperty(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher

Binds a public property, prop on the site Object, to a bindable property or property chain. If a ChangeWatcher instance is successfully created, prop is initialized to the current value of chain.

Parameters site:Object — The Object defining the property to be bound to chain.

prop:String — The name of the public property defined in the site Object to be bound. The property will receive the current value of chain, when the value of chain changes.

host:Object — The object that hosts the property or property chain to be watched.

chain:Object — A value specifying the property or chain to be watched. Legal values are:
String containing the name of a public bindable property of the host object.
An Object in the form: }. This Object must contain the name of, and a getter function for, a public bindable property of the host object.
A non-empty Array containing a combination of the first two options that represents a chain of bindable properties accessible from the host. For example, to bind the property host.a.b.c, call the method as: bindProperty(host, ["a","b","c"], ...).
Note: The property or properties named in the chain argument must be public, because the describeType() method suppresses all information about non-public properties, including the bindability metadata that ChangeWatcher scans to find the change events that are exposed for a given property. However, the getter function supplied when using the argument form described above can be used to associate an arbitrary computed value with the named (public) property.
commitOnly:Boolean (default = false) — Set to true if the handler should be called only on committing change events; set to false if the handler should be called on both committing and non-committing change events. Note: the presence of non-committing change events for a property is indicated by the [NonCommittingChangeEvent(<event-name>)] metadata tag. Typically these tags are used to indicate fine-grained value changes, such as modifications in a text field prior to confirmation.
Returns ChangeWatcher — A ChangeWatcher instance, if at least one property name has been specified to the chain argument; null otherwise.
ZESTRON
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸... 点击进入详情页
本回答由ZESTRON提供
jiayamei_
2011-08-30
知道答主
回答量:7
采纳率:0%
帮助的人:1.2万
展开全部
在声明maximum上面加上[Bindable]就好了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式