currency.jsp 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. String path = request.getContextPath();
  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6. %>
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  12. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  13. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  14. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  15. <script type="text/javascript">
  16. Ext.onReady(function(){
  17. Ext.create('Ext.form.Panel', {
  18. title: 'FieldContainer实现FormPanel分组Example',
  19. id: 'form',
  20. width: '100%',
  21. bodyPadding: 10,
  22. layout: 'column',
  23. defaultType: 'textfield',
  24. items: [{
  25. html: '<div onclick="javascript:collapse(1)" class="x-form-group-label"><h6>分组1</h6></div>',
  26. columnWidth: 1
  27. },{
  28. fieldLabel: 'First Name',
  29. group: 1,
  30. name: 'firstName',
  31. columnWidth: 0.5
  32. }, {
  33. fieldLabel: 'Last Name',
  34. group: 1,
  35. name: 'lastName',
  36. columnWidth: 0.5
  37. }, {
  38. fieldLabel: 'First Name',
  39. group: 1,
  40. name: 'firstName',
  41. columnWidth: 0.5
  42. }, {
  43. fieldLabel: 'Last Name',
  44. group: 1,
  45. name: 'lastName',
  46. columnWidth: 0.5
  47. },{
  48. html: '<div onclick="javascript:collapse(2);" class="x-form-group-label"><h6>分组2</h6></div>',
  49. columnWidth: 1
  50. },{
  51. fieldLabel: 'First Name',
  52. name: 'firstName',
  53. group: 2,
  54. columnWidth: 0.5
  55. }, {
  56. fieldLabel: 'Last Name',
  57. name: 'lastName',
  58. group: 2,
  59. columnWidth: 0.5
  60. }, {
  61. fieldLabel: 'First Name',
  62. name: 'firstName',
  63. group: 2,
  64. columnWidth: 0.5
  65. }, {
  66. fieldLabel: 'Last Name',
  67. name: 'lastName',
  68. group: 2,
  69. columnWidth: 0.5
  70. },{
  71. html: '<div onclick="javascript:collapse(3);" class="x-form-group-label"><h6>分组3</h6></div>',
  72. columnWidth: 1
  73. },{
  74. fieldLabel: 'First Name',
  75. name: 'firstName',
  76. group: 3,
  77. columnWidth: 0.5
  78. }, {
  79. fieldLabel: 'Last Name',
  80. name: 'lastName',
  81. group: 3,
  82. columnWidth: 0.5
  83. }, {
  84. fieldLabel: 'First Name',
  85. name: 'firstName',
  86. group: 3,
  87. columnWidth: 0.5
  88. }, {
  89. fieldLabel: 'Last Name',
  90. name: 'lastName',
  91. group: 3,
  92. columnWidth: 0.5
  93. },{
  94. html: '<div onclick="javascript:collapse(4);" class="x-form-group-label"><h6>分组4</h6></div>',
  95. columnWidth: 1
  96. },{
  97. fieldLabel: 'First Name',
  98. name: 'firstName',
  99. group: 4,
  100. columnWidth: 0.5
  101. }, {
  102. fieldLabel: 'Last Name',
  103. name: 'lastName',
  104. group: 4,
  105. columnWidth: 0.5
  106. }, {
  107. fieldLabel: 'First Name',
  108. name: 'firstName',
  109. group: 4,
  110. columnWidth: 0.5
  111. }, {
  112. fieldLabel: 'Last Name',
  113. name: 'lastName',
  114. group: 4,
  115. columnWidth: 0.5
  116. },{
  117. html: '<div onclick="javascript:collapse(5);" class="x-form-group-label"><h6>分组5</h6></div>',
  118. columnWidth: 1
  119. },{
  120. fieldLabel: 'First Name',
  121. name: 'firstName',
  122. group: 5,
  123. columnWidth: 0.5
  124. }, {
  125. fieldLabel: 'Last Name',
  126. name: 'lastName',
  127. group: 5,
  128. columnWidth: 0.5
  129. }, {
  130. fieldLabel: 'First Name',
  131. name: 'firstName',
  132. group: 5,
  133. columnWidth: 0.5
  134. }, {
  135. fieldLabel: 'Last Name',
  136. name: 'lastName',
  137. group: 5,
  138. columnWidth: 0.5
  139. }],
  140. renderTo: Ext.getBody()
  141. });
  142. });
  143. function collapse(id){
  144. Ext.each(Ext.getCmp('form').items.items, function(item){
  145. if(item.group && item.group == id){
  146. if(item.hidden == false){
  147. item.hide();
  148. } else {
  149. item.show();
  150. }
  151. }
  152. });
  153. }
  154. </script>
  155. </head>
  156. <body >
  157. </body>
  158. </html>