%@ page pageEncoding="UTF-8"%> <%@ page contentType="text/html; charset=UTF-8" language="java" %> <%@ page language="java" import="com.sysmodel.datamodel.xmlmodel.ModelFactory, com.sysmodel.datamodel.xmlmodel.impl.TemplateImpl, com.sysmodel.datamodel.xmlmodel.impl.PropertyImpl, com.sysmodel.datamodel.xmlmodel.able.SysModel, com.sysmodel.xformmodel.impl.RegExpImpl, com.sysmodel.XFormModelImpl, com.sysmodel.xformmodel.able.Validate, com.sysmodel.xformmodel.impl.DojoInputTypeImpl, java.util.ArrayList"%> <% String propertyName = request.getParameter("propertyName") == null ? "0" : request.getParameter("propertyName"); String templateName = request.getParameter("templateName") == null ? "0" : request.getParameter("templateName"); String name=""; String description=""; String dataType=""; String length=""; String scale=""; String referenceParentName=""; String display=""; String unique=""; String promptMessage=""; String invalidMessage=""; String need=""; String trime=""; String regxValue = ""; String dojoInuptType = ""; SysModel sysmodel = ModelFactory.getSysmodel(); TemplateImpl TemplateImpl = (TemplateImpl)sysmodel.getTemplateByName(templateName); String action = ""; if(propertyName.equals("0")){ action = "save"; }else{ action = "edit"; PropertyImpl PropertyImpl = (PropertyImpl)TemplateImpl.getPropertyByName(propertyName); Validate Validate = PropertyImpl.getValidate(); need = new Boolean(Validate.isNeed()).toString(); trime = new Boolean(Validate.isTrim()).toString(); invalidMessage = Validate.getInvalidMessage(); promptMessage = Validate.getPromptMessage(); regxValue = Validate.getRegxValue(); dojoInuptType = Validate.getDojoType(); name = PropertyImpl.getName(); description = PropertyImpl.getDescription(); dataType = PropertyImpl.getDataType(); length = "" + PropertyImpl.getLength(); scale = PropertyImpl.getScale(); referenceParentName = PropertyImpl.getReferenceParentName(); display = new Boolean(PropertyImpl.isDisplay()).toString(); unique = new Boolean(PropertyImpl.isUnique()).toString(); } %>