dataQuery_list.jsp 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <%@ include file="../common/header.jsp"%>
  2. <%
  3. if (seq==0){
  4. seq = (Integer) request.getAttribute("dataQuery_start");
  5. }
  6. %>
  7. <script type="text/javascript" language="javascript">
  8. <!--
  9. function page(start, count){
  10. document.forms.dataQuery.start.value=start;
  11. document.forms.dataQuery.count.value=count;
  12. document.forms.dataQuery.action.value="list";
  13. document.forms.dataQuery.submit();
  14. doDisable(document.forms.dataQuery, "button");
  15. }
  16. function doChangePage(count){
  17. document.forms.dataQuery.start.value= (document.forms.dataQuery.startx.value-1)*20;
  18. if(document.forms.dataQuery.start.value=="NaN") document.forms.dataQuery.start.value = 0;
  19. document.forms.dataQuery.count.value=count;
  20. document.forms.dataQuery.action.value="list";
  21. document.forms.dataQuery.submit();
  22. doDisable(document.forms.dataQuery, "button");
  23. }
  24. function doCreate(){
  25. document.forms.dataQuery.action.value="create";
  26. document.forms.dataQuery.submit();
  27. doDisable(document.forms.dataQuery, "button");
  28. }
  29. function fillIndex(val){
  30. document.forms.dataQuery.startx.value = val.value;
  31. }
  32. function doDetail(dataqueryPk){
  33. document.forms.dataQuery.dataqueryPk.value=dataqueryPk;
  34. document.forms.dataQuery.action.value="detail";
  35. document.forms.dataQuery.submit();
  36. }
  37. function doFilter(){
  38. document.forms.dataQuery.action.value="list";
  39. document.forms.dataQuery.submit();
  40. doDisable(document.forms.dataQuery, "button");
  41. }
  42. function doReset(){
  43. document.forms.dataQuery.dataQuery_dbconnectionFk_filter.value="";
  44. document.forms.dataQuery.dataQuery_queryCode_filter.value="";
  45. document.forms.dataQuery.clear.value="true";
  46. document.forms.dataQuery.action.value="list";
  47. document.forms.dataQuery.submit();
  48. doDisable(document.forms.dataQuery, "button");
  49. }
  50. function doOrder(field, type){
  51. document.forms.dataQuery.dataQuery_fieldOrder.value=field;
  52. document.forms.dataQuery.dataQuery_orderType.value=type;
  53. document.forms.dataQuery.action.value="list";
  54. document.forms.dataQuery.submit();
  55. doDisable(document.forms.status, "button");
  56. }
  57. -->
  58. </script>
  59. <!-- CONTENT -->
  60. <form name="dataQuery" method="post" action="dataQuery.do">
  61. <input type="hidden" name="start" value="">
  62. <input type="hidden" name="startx" value="">
  63. <input type="hidden" name="action" value="">
  64. <input type="hidden" name="count" value="">
  65. <input type="hidden" name="clear" value="">
  66. <input type="hidden" name="dataqueryPk" value="">
  67. <input type="hidden" name="dataQuery_fieldOrder" value="<bean:write name="dataQuery_fieldOrder"/>">
  68. <input type="hidden" name="dataQuery_orderType" value="<bean:write name="dataQuery_orderType"/>">
  69. <input type="hidden" name="focus_field" value=""/>
  70. <!--td width="80%" valign="top"-->
  71. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  72. <tr>
  73. <td class="titleHeader"><bean:message key="project.dataQuery.key"/> - LIST</td>
  74. </tr>
  75. <tr>
  76. <td><%@ include file="../common/paging.jsp"%>
  77. </td>
  78. </tr>
  79. </table>
  80. <table width="100%" border="0" cellspacing="1" cellpadding="1">
  81. <tr>
  82. <td width="5%" class="titleField"><div align="center">#</div></td>
  83. <td align="left" height="10" valign="top" class="titleField"><bean:message key="dataQuery.querycode.key" />
  84. <logic:equal name="dataQuery_fieldOrder" value="queryCode">
  85. <logic:equal name="dataQuery_orderType" value="ASC">
  86. <a href="#" onclick="doOrder('queryCode', 'DESC');"><img src="./images/arrow_down.gif" border="0"></a>
  87. </logic:equal>
  88. <logic:equal name="dataQuery_orderType" value="DESC">
  89. <a href="#" onclick="doOrder('queryCode', 'ASC');"><img src="./images/arrow_up.gif" border="0"></a>
  90. </logic:equal>
  91. </logic:equal>
  92. <logic:notEqual name="dataQuery_fieldOrder" value="queryCode">
  93. <a href="#" onclick="doOrder('queryCode', 'ASC');"><img src="./images/arrow.gif" border="0"></a>
  94. </logic:notEqual>
  95. </td>
  96. <td align="left" height="10" valign="top" class="titleField"><bean:message key="dataQuery.dbconnectionFk.key" />
  97. <logic:equal name="dataQuery_fieldOrder" value="dbconnectionFk.dsn">
  98. <logic:equal name="dataQuery_orderType" value="ASC">
  99. <a href="#" onclick="doOrder('dbconnectionFk.dsn', 'DESC');"><img src="./images/arrow_down.gif" border="0"></a>
  100. </logic:equal>
  101. <logic:equal name="dataQuery_orderType" value="DESC">
  102. <a href="#" onclick="doOrder('dbconnectionFk.dsn', 'ASC');"><img src="./images/arrow_up.gif" border="0"></a>
  103. </logic:equal>
  104. </logic:equal>
  105. <logic:notEqual name="dataQuery_fieldOrder" value="dbconnectionFk.dsn">
  106. <a href="#" onclick="doOrder('dbconnectionFk.dsn', 'ASC');"><img src="./images/arrow.gif" border="0"></a>
  107. </logic:notEqual>
  108. <td width="5%" class="titleField">&nbsp;</td>
  109. </tr>
  110. <logic:notEmpty name="dataQueryList">
  111. <logic:iterate id="element" name="dataQueryList" scope="request" indexId="index">
  112. <%
  113. sequence++;
  114. String bgcolor = "FFFFFF";
  115. if(sequence%2 == 0){
  116. bgcolor = "EDEDE8";
  117. }
  118. %>
  119. <tr bgcolor="<% out.print(bgcolor); %>" onmouseover="mOvr(this);" onmouseout="mOut(this, '<% out.print(bgcolor); %>');">
  120. <td align="center" class="celBorder"><%=++seq%>&nbsp;</td>
  121. <td align="left" class="celBorder">
  122. &nbsp;<bean:write name="element" property="dataqueryPk"/>
  123. </td>
  124. <td align="left" class="celBorder">
  125. &nbsp;<bean:write name="element" property="dbconnectionFk.dsn"/>
  126. </td>
  127. <td align="center" class="celBorder" ><a href="#" ><img src="./images/detail.gif" border="0" onclick="doDetail('<bean:write name="element" property="dataqueryPk"/>');" alt="see detail"/></a>
  128. </td>
  129. </tr>
  130. </logic:iterate>
  131. </logic:notEmpty>
  132. </TABLE>
  133. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  134. <tr>
  135. <td class="search"><bean:message key="project.search.key" /></td>
  136. </tr>
  137. </table>
  138. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  139. <tr>
  140. <td width="20%"><b><bean:message key="dataQuery.querycode.key"/></b></td>
  141. <td width="1%">:</td>
  142. <td width="29%">
  143. <label>
  144. <input type="text" name="dataQuery_queryCode_filter" value="<logic:notEmpty name="dataQuery_queryCode_filter"><bean:write name="dataQuery_queryCode_filter"/></logic:notEmpty>">
  145. </label>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td width="20%"><b><bean:message key="dataQuery.dbconnectionFk.key"/></b></td>
  150. <td width="1%">:</td>
  151. <td width="29%">
  152. <label>
  153. <select name="dataQuery_dbconnectionFk_filter">
  154. <option value="">--- Select Connection ---</option>
  155. <logic:notEmpty name="dbconnectionFkList">
  156. <logic:iterate id="dbconnectionFkElement" name="dbconnectionFkList">
  157. <option value="<bean:write name="dbconnectionFkElement" property="dbconnectionPk"/>"
  158. <logic:equal name="dbconnectionFkElement" property="dbconnectionPk" value="${dataQuery_dbconnectionFk_filter}">
  159. SELECTED
  160. </logic:equal>
  161. >
  162. <bean:write name="dbconnectionFkElement" property="dsn"/></option>
  163. </logic:iterate>
  164. </logic:notEmpty>
  165. </select>
  166. </label>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td>&nbsp;</td>
  171. <td>&nbsp;</td>
  172. <td colspan="3" align="left">
  173. <input type="button" size="50" maxlength="25" value="<bean:message key="button.reset"/>" onclick="doReset();"/>
  174. &nbsp;&nbsp;
  175. <input type="button" value="<bean:message key="button.search"/>" onclick="doFilter();"/>
  176. </td>
  177. <td>&nbsp;</td>
  178. <td>&nbsp;</td>
  179. <td>&nbsp;</td>
  180. </tr>
  181. </table>
  182. </td>
  183. </form>
  184. <!-- END CONTENT -->
  185. <logic:notEmpty name="focus"><bean:write name="focus" filter="false" /></logic:notEmpty>
  186. <%@ include file="../common/footer.jsp"%>