<强> 强>
package com.hg.free.plugin.customcombo.param; , import com.fr.design.designer.creator.XComboBox; import com.fr.design.fun.impl.AbstractParameterWidgetOptionProvider; import com.fr.form.ui.Widget; , public class  WidgetRegister extends AbstractParameterWidgetOptionProvider  { , ,,,,,,@Override ,,,,,,,public Class<?, extends Widget>, classForWidget (), { ,,,,,,,,,,,,,,,return CustomComboBox.class; ,,,,,,,} ,,,,,,, ,,,,,,@Override ,,,,,,,public Class<?祝辞,appearanceForWidget (), { ,,,,,,,,,,,,,,,return XComboBox.class; ,,,,,,,} , ,,,,,,@Override ,,,,,,,public String iconPathForWidget (), { ,,,,,,,,,,,,,,,return “/com/fr/web/p_w_picpaths/combobox.png”; ,,,,,,,} , ,,,,,,@Override ,,,,,,,public String nameForWidget (), { ,,,,,,,,,,,,,,,return “自定义下拉框”; ,,,,,,,} , }
<强> 强>
package com.hg.free.plugin.customcombo.param; , import com.fr.form.ui.ComboBox; import com.fr.ui.DataFilter; , public class  CustomComboBox extends ComboBox  { , ,,,,,,,private static final long serialVersionUID =, 7169771062153345236 l; ,,,,,,, ,,,,,,@Override ,,,,,,,public String getXType (), { ,,,,,,,return “customcombo”; ,,,} ,,,,,,, ,,,,,,@Override ,,,,,,,protected DataFilter createDataFilter (), { ,,,,,,,return new CustomComboBoxDataFilter (); ,,,} }
package com.hg.free.plugin.customcombo.param; , import com.fr.form.ui.ComboBoxDataFilter; , public class  CustomComboBoxDataFilter extends ComboBoxDataFilter  { ,,,,,,@Override ,,,,,,,public boolean isMatch (String txt, String 过滤器),{ ,,,,,,,,,,,,,,,如果(null==txt ,,,零!=过滤器)return 假; ,,,,,,,,,,,,,,,如果(null==txt ,,, null==过滤器)return 真实; ,,,,,,,,,,,,,,,return txt.indexOf(过滤器)!=1; ,,,,,,,} }
<强> 强> <强> JS 强>
; (函数(美元){ ,,,,,,,FR.CustomComboBoxEditor =, FR.extend (FR.ComboBoxEditor, { ,,,,,,,,,,,,,,,_init:, function (), { ,,,,,,,,,,,,,,,,,,,,,,,FR.CustomComboBoxEditor.superclass._init.apply(,,参数); ,,,,,,,,,,,,,,,} ,,,,,,,}); ,,,,,,,.shortcut美元(“customcombo”, FR.CustomComboBoxEditor); })(jQuery);
~
<强> 强> <强> 强>
CustomComboBoxEditor
~
~
组合框