home *** CD-ROM | disk | FTP | other *** search
/ 61.19.244.139 / 61.19.244.139.zip / 61.19.244.139 / 2015-02-19 / views / car-type-setup-edit.jsp < prev    next >
Text File  |  2015-02-19  |  4KB  |  104 lines

  1.  
  2. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  3. <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
  4. <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
  5. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
  6. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  7. <form:form  cssClass="form-horizontal well" method="Post" action="updateVehCode" modelAttribute="vehCodeForm" id="frmSaveVehCode" name="frmSaveVehCode" >
  8.                         <fieldset>
  9.                             <div class="control-group">
  10.                                 <label class="control-label" for="input01">α╕¢α╕úα╕░α╣Çα╕áα╕ùα╕úα╕ûα╕óα╕Öα╕òα╣î</label>
  11.                                 <div class="controls">
  12.                                   <form:select cssClass="span3" path="vehType" name="vehType" id="vehType" multiple="false"  itemLabel="vehType" itemValue="vehType">
  13.                                      <form:options items="${vehTypeList}" itemValue="refCode" itemLabel="refDesc1"/>
  14.                                   </form:select> 
  15.                                  </div>
  16.                             </div>
  17.  
  18.                             <div class="control-group">
  19.                                 <label class="control-label" for="input01" >α╕Ñα╕▒α╕üα╕⌐α╕ôα╕░α╕üα╕▓α╕úα╣âα╕èα╣ëα╕úα╕ûα╕úα╕ûα╕óα╕Öα╕òα╣î</label>
  20.                                 <div class="controls">
  21.                                   <form:select cssClass="span3" path="vehUsage"  name="vehUsage" id="vehUsage" multiple="false"  >
  22.                                      <form:options items="${vehUsageList}" itemValue="refCode" itemLabel="refDesc1"/>
  23.                                   </form:select> 
  24.                 
  25.                                 </div>
  26.                             </div>
  27.  
  28.                             <div class="control-group">
  29.                                 <label class="control-label" for="input01">α╕úα╕½α╕▒α╕¬α╕úα╕ûα╕óα╕Öα╕òα╣î</label>
  30.                                 <div class="controls">
  31.                                     <form:input  cssClass="input-small" type="text" placeholder="α╕úα╕½α╕▒α╕¬α╕úα╕ûα╕óα╕Öα╕òα╣î" name="vehCode" id="vehCode" path="vehCode" readonly="true"/>
  32.                                  
  33.  
  34.                                 </div>
  35.                             </div>
  36.                             
  37.                                 <div class="control-group">
  38.                                 <label class="control-label" for="input01">α╕éα╕Öα╕▓α╕öα╕úα╕ûα╕óα╕Öα╕òα╣î:</label>
  39.                                 <div class="controls">
  40.  
  41.                                     <form:radiobutton  path="vehSizeFlag"  name="vehSizeFlag" value="C" /> CC <form:radiobutton    path="vehSizeFlag"    name="vehSizeFlag" value="S" /> Seat <form:radiobutton  path="vehSizeFlag"  name="vehSizeFlag" value="W" /> Weight
  42.  
  43.                                 </div>
  44.                             </div>
  45.                             
  46.                             <div class="control-group">
  47.                                 <label class="control-label" for="input02">α╕éα╣ëα╕¡α╕äα╕ºα╕▓α╕íα╕½α╕Öα╣ëα╕▓α╕òα╕▓α╕úα╕▓α╕çα╕üα╕úα╕íα╕ÿα╕úα╕úα╕íα╣î</label>
  48.                                 <div class="controls">
  49.                                     <form:input cssClass="input-xlarge" type="text" id="vehPrintPol" name="vehPrintPol" path="vehPrintPol"
  50.                                         placeholder="α╕éα╣ëα╕¡α╕äα╕ºα╕▓α╕íα╕½α╕Öα╣ëα╕▓α╕òα╕▓α╕úα╕▓α╕çα╕üα╕úα╕íα╕ÿα╕úα╕úα╕íα╣î"/>
  51.                                 </div>
  52.                             </div> 
  53.                              <hr/> 
  54.                              
  55.                              <br/>
  56.                               <br/>
  57.                               
  58.                             <%
  59.                                     if (request.getParameter("vehCode") == null) {
  60.                                 %>
  61.                                 <button class="btn btn-success" name="saveBtn" id="saveBtn">α╕Üα╕▒α╕Öα╕ùα╕╢α╕ü</button>
  62.                                 <%
  63.                                     } else {
  64.                                 %>
  65.                                 <button class="btn btn-primary" name="editBtn" id="editBtn">α╣üα╕üα╣ëα╣äα╕é</button>
  66.                                 <%
  67.                                     }
  68.                                 %>
  69.                                     <a class="btn" id="cancelBtn" onClick="$('#tableFrm').dialog('close');">α╕óα╕üα╣Çα╕Ñα╕┤α╕ü/α╕¢α╕┤α╕ö</a>
  70.                         </fieldset>
  71.                     </form:form>
  72.                     
  73.                     <script> 
  74.                     $(function() {
  75.  
  76.                         $("#vehType").select2({ width: 'resolve' });
  77.                         $("#vehUsage").select2({ width: 'resolve' });
  78.                         
  79.                     $(document).ready(function() {
  80.                         $("#carSizeForm").dynamiclist();
  81.                     });
  82.  
  83.                     $("#frmSaveVehCode").submit(function() {
  84.                         var url = "updateVehCode";  
  85.                         $.ajax({
  86.                                type: "POST",
  87.                                url: url,
  88.                                data: $("#frmSaveVehCode").serialize(),  
  89.                                success: function(data)
  90.                                {
  91.                              
  92.                                    $('#grid').trigger("reloadGrid", [{ page: 1 }]);
  93.                                    $('#tableFrm').dialog('close');
  94.                                },
  95.                                error: function (xhr, ajaxOptions, thrownError) {
  96.                                    var obj = JSON.parse( xhr.responseText);
  97.                                    alert(obj.errorMessages ) ; 
  98.                                  }
  99.                              });
  100.  
  101.                         return false;
  102.                     }); 
  103.                     });
  104.                     </script>