123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- <%@ 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();
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <HTML>
- <HEAD>
- <TITLE></TITLE>
- <META http-equiv="Content-Type" content="text/html; charset=GB2312">
- <link rel="stylesheet" href="../../../../../../styles/css.css" type="text/css">
- <script type="text/javascript" src="../../../../../../scripts/dojo/dojo/dojo.js" djConfig="isDebug: false, parseOnLoad: true"></script>
- <script type="text/javascript">
- dojo.require("dijit.form.Form");
- dojo.require("dijit.form.ValidationTextBox");
- dojo.require("dijit.form.FilteringSelect");
- dojo.require("dijit.form.Button");
- dojo.require("dijit.Tooltip");
-
- </script>
- <style type="text/css">
- @import "../../../../../../scripts/dojo/dojo/resources/dojo.css";
- @import "../../../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
- @import "../../../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
- @import "../../../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
- .formQuestion {
- background-color:#d0e3f5;
- padding:0.3em;
- font-weight:900;
- font-family:Verdana, Arial, sans-serif;
- font-size:0.8em;
- color:#5a5a5a;
- }
- .formAnswer {
- background-color:#f5eede;
- padding:0.3em;
- margin-bottom:1em;
- width: 100%;
- }
- .pageSubContentTitle {
- color:#8e8e8e;
- font-size:1em;
- font-family:Verdana, Arial, sans-serif;
- margin-bottom:0.75em;
- }
- .small INPUT {
- width: 2.5em;
- }
- .medium INPUT {
- width: 10em;
- }
- .long INPUT {
- width: 20em;
- }
- .firstLabel {
- display: inline-block;
- display: -moz-inline-box;
- width: 10em;
- min-width: 10em;
- }
- .secondLabel {
- width: auto;
- margin-left: 5em;
- margin-right: 1em;
- }
- fieldset label {
- margin-right: 1em;
- }
- .noticeMessage {
- display: block;
- float: right;
- font-weight: normal;
- font-family:Arial, Verdana, sans-serif;
- color:#663;
- font-size:0.9em;
- }
- </style>
- </HEAD>
- <body class="tundra">
- <form action="editExc.jsp" method="post">
- <input type="hidden" name="action" value="<%=action%>">
- <input type="hidden" name="templateName" value="<%=templateName%>">
- <input type="hidden" name="oldname" value="<%=name%>">
- <div id=total>
- <div class="whiteborder">
- <div class="titback">
- <div class="floatleft"><img src="../../../../../../images/index/arrow1.gif" width="20" height="24"/></div>
- <div class="dropshadow">常量模版</div>
- <div class="clear"></div>
- </div>
- <div class="report">
- <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
-
- <tr>
- <td align="right">英文名称 <span class="redcolor">*</span> </td>
- <td align="left">
- <input type="text" id="name" name="name" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- regExp="^[A-Za-z0-9$_]+$"
- value="<%=name %>"
- <%if(action.equals("edit")){ %> readonly<%} %>/>
- </td>
- </tr>
- <tr>
- <td align="right">中文描述 <span class="redcolor">*</span> </td>
- <td align="left">
- <input type="text" id="description" name="description" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=description %>"
- invalidMessage="中文描述必须录入!"/>
- </td>
- </tr>
- <tr>
- <td align="right">字段类型 <span class="redcolor">*</span> </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect"
- required="true" name="dataType" id="dataType" autocomplete="true">
- <option value="string" <%if(dataType.equals("string")) out.print("selected");%>>字符</option>
- <option value="number" <%if(dataType.equals("number")) out.print("selected");%>>整数 </option>
- <option value="boolean" <%if(dataType.equals("boolean")) out.print("selected");%>>逻辑</option>
- <option value="date" <%if(dataType.equals("date")) out.print("selected");%>>日期</option>
- </select>
- </td>
- </tr>
- <tr>
- <td align="right">字段长度 <span class="redcolor">*</span> </td>
- <td align="left">
- <input type="text" id="lengths" name="lengths" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- value="<%=length %>"
- invalidMessage="字段长度必须录入!"/>
- </td>
- </tr>
- <tr>
- <td align="right">格式化类型 </td>
- <td align="left">
- <input type="text" id="scale" name="scale" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- value="<%=scale %>"/>
- </tr>
- <tr>
- <td align="right">上级节点 </td>
- <td align="left">
- <input type="text" id="referenceParentName" name="referenceParentName" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- value="<%=referenceParentName %>"/>
- </tr>
- <tr>
- <td align="right">是否显示 <span class="redcolor">*</span> </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect"
- required="true"
- name="display"
- id="display"
- autocomplete="true" >
- <option value="true" <%if(display.equals("true")) out.print("selected");%>>true</option>
- <option value="false" <%if(display.equals("false")) out.print("selected");%>>false </option>
- </select>
- </td>
- </tr>
- <tr>
- <td align="right">是否重复 <span class="redcolor">*</span> </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect"
- required="true" name="unique" id="unique" autocomplete="true">
- <option value="true" <%if(unique.equals("true")) out.print("selected");%>>true</option>
- <option value="false" <%if(unique.equals("false")) out.print("selected");%>>false</option>
- </select>
- </td>
- </tr>
- </table>
- <table align="center" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
- <tr class="TableBgColorBlack">
- <td colspan="4" align="left">录入验证</td>
- </tr>
- <tr class="">
- <td>录入提示</td>
- <td align="left">
- <input type="text" value="<%=promptMessage %>"
- id="promptMessage" name="promptMessage" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="false"
- ucfirst="true"
- invalidMessage="">
- </td>
- </tr><tr class="">
- <td>验证失败提示</td>
- <td align="left"><input type="text" value="<%=invalidMessage %>"
- id="invalidMessage" name="invalidMessage" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="false"
- ucfirst="true"
- invalidMessage=""></td>
- </tr>
-
- <tr class="">
- <td>是否必填 <font color="red">*</font></td>
- <td align="left" >
- <select id="need" name="need"
- dojoType="dijit.form.FilteringSelect"
- required="true"
- autocomplete="true">
- <option value="true" <%if(need.equals("true"))out.print("selected"); %>>true</option>
- <option value="false"<%if(need.equals("false"))out.print("selected"); %>>false</option>
- </select>
- </td>
- </tr>
- <tr class="">
- <td>是否去掉空格</td>
- <td align="left" >
- <select id="trime" name="trime"
- dojoType="dijit.form.FilteringSelect"
- required="true"
- autocomplete="true">
- <option value="true" <%if(trime.equals("false"))out.print("selected"); %>>true</option>
- <option value="false" <%if(trime.equals("false"))out.print("selected"); %>>false</option>
- </select>
- </td>
- </tr>
- <tr class="">
- <td>dojo]控件类型</td>
- <td align="left">
- <select id="dojoInuptType" name="dojoInuptType"
- dojoType="dijit.form.FilteringSelect"
- required="true"
- autocomplete="true">
- <option value="0">--请选择--</option>
- <% ArrayList dojoInuptTypes = XFormModelImpl.getInstance().getDojoInuptTypesByType("text");
- for(int m = 0; m<dojoInuptTypes.size(); m++){
- DojoInputTypeImpl DojoInputTypeImpl=(DojoInputTypeImpl)dojoInuptTypes.get(m);
- %>
- <option value="<%=DojoInputTypeImpl.getCode() %>" <%if(DojoInputTypeImpl.getCode().equals(dojoInuptType))out.print("selected");%>><%=DojoInputTypeImpl.getName() %></option>
- <%} %>
- </select>
- </td>
- </tr>
- <tr class="">
- <td>正则表达式</td>
- <td align="left"><select id="regxValue" name="regxValue"
- dojoType="dijit.form.FilteringSelect"
- required="true"
- autocomplete="true">
- <option value="0">--请选择--</option>
- <% ArrayList regExps=XFormModelImpl.getInstance().getRegExps();
- for(int j = 0; j<regExps.size(); j++){
- RegExpImpl RegExpImpl=(RegExpImpl)regExps.get(j);
- %>
- <option value="<%=RegExpImpl.getCode()%>" <%if(RegExpImpl.getCode().equals(regxValue))out.print("selected");%>><%=RegExpImpl.getName() %></option>
- <%} %>
- </select></td>
- </tr>
- </table>
-
- </div>
- <div class="btmbox">
- <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple")' type="submit" iconClass="plusIcon">
- 保存
- </button>
- <span dojoType="dijit.Tooltip" connectId="save">保存按钮</span>
- </div>
- </div>
- </div>
- </form>
- </BODY>
- </HTML>
|