Browse Source

控件校验完善

master
kerry 8 years ago
parent
commit
c7fad3e336
  1. 5
      designer_form/src/com/fr/design/designer/creator/XTextEditor.java

5
designer_form/src/com/fr/design/designer/creator/XTextEditor.java

@ -24,6 +24,7 @@ import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import jdk.nashorn.internal.runtime.regexp.joni.Regex;
/**
@ -38,6 +39,7 @@ public class XTextEditor extends XWrapperedFieldEditor {
/**
* 控件的属性列表
*
* @return 此控件所用的属性列表
* @throws IntrospectionException 异常
*/
@ -57,7 +59,8 @@ public class XTextEditor extends XWrapperedFieldEditor {
CRPropertyDescriptor[] sup = (CRPropertyDescriptor[]) ArrayUtils.addAll(new CRPropertyDescriptor[]{widgetValue}, super.supportedDescriptor());
Boolean displayRegField = true;
RegExp reg = ((TextEditor) toData()).getRegex();
if(reg == null || reg.toRegText().equals("")){
if (reg == null || !StringUtils.isNotEmpty(reg.toRegText())) {
displayRegField = false;
}
return displayRegField ? (CRPropertyDescriptor[]) ArrayUtils.addAll(sup,

Loading…
Cancel
Save