2012-07-17 31 views
0

我想爲複選框字段提供類似於ValueBoxEditorDecorator的東西。由於CheckBox不擴展ValueBoxBase,我需要創建自己的。爲複選框字段創建編輯器裝飾器

於是我開始通過調整ValueBoxEditorDecorator代碼到我的新的自定義類的編碼是:

public class CheckBoxDecorator extends Composite implements HasEditorErrors<CheckBox>, IsEditor<LeafValueEditor<Boolean>> { 
... 
The code here is the adaptation of ValueBoxEditorDecorator 
... 
} 

遺憾的是它不工作,我有以下運行時錯誤:

[ERROR] [website] - Errors in  'generated://50642882199077F9FB1890056A90477A/com/test/client/core/MyView_RequestFactoryEditorDelegate.java' 
[ERROR] [website] - Line 112: The constructor MyView_acceptTerms_Context(MyvalueProxy, CheckBoxDecorator, String) is undefined 

在此先感謝您的幫助。

+0

您可能需要提供更多的代碼,因爲是由一個類中的代碼調用產生的錯誤MyView_RequestFactoryEditorDelegate,你不會在問題中描述這個。 – Bobulous 2012-07-17 18:15:46

回答

0

很抱歉,在我的代碼中的錯誤,這裏是正確的代碼:

public class CheckBoxDecorator extends Composite implements HasEditorErrors<Boolean>, IsEditor<LeafValueEditor<Boolean>> { 
... 
The code here is the adaptation of ValueBoxEditorDecorator 
... 
}