简体   繁体   English

如何告诉我表单控件的值已更改?

[英]How can I tell my form that the value of a control changed?

I am trying to implement an MVC type pattern in my Eclipse plugin, but I'm stuck. 我试图在我的Eclipse插件中实现MVC类型模式,但是我陷入了困境。 I can't figure out how to have my controls tell the form that they belong to that they have changed. 我不知道如何让控件告诉表单它们属于已更改的表单。 There's no isDirty() method and no firePropertyChanged() method like I am using in the form/editor relationship. 没有isDirty()方法和firePropertyChanged()方法,就像我在表单/编辑器关系中使用的那样。

In your FormPage derived class you add form page parts based on SectionPart or AbstractFormPart or IFormPart which contain the controls for the page. 在您的FormPage派生类中,添加基于SectionPartAbstractFormPartIFormPart表单页面部件,其中包含页面的控件。

AbstractFormPart has a markDirty method (also markStale , refresh and commit ) which are intended to be the main ways to manage the form state. AbstractFormPart具有markDirty方法(还有markStalerefreshcommit ),该方法旨在作为管理表单状态的主要方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM