Пример #1
0
 public static Mapx initDialog(Mapx params) {
   String Code = params.getString("Code");
   if (XString.isEmpty(Code)) {
     params.put("VerifyType", HtmlUtil.mapxToOptions(VerifyTypeMap));
     params.put("InputType", HtmlUtil.mapxToOptions(InputTypeMap));
     params.put("IsMandatory", HtmlUtil.codeToRadios("IsMandatory", "YesOrNo", "N"));
     params.put("MaxLength", "100");
     params.put("Cols", "265");
     params.put("Rows", "90");
   } else {
     ZDMemberFieldSchema field = new ZDMemberFieldSchema();
     field.setCode(Code);
     field.setSiteID(ApplicationPage.getCurrentSiteID());
     field.fill();
     params = field.toMapx();
     params.put("VerifyType", HtmlUtil.mapxToOptions(VerifyTypeMap, field.getVerifyType()));
     params.put("InputType", HtmlUtil.mapxToOptions(InputTypeMap, field.getInputType()));
     params.put(
         "IsMandatory", HtmlUtil.codeToRadios("IsMandatory", "YesOrNo", field.getIsMandatory()));
   }
   return params;
 }