client_edit.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. <%@ include file="../common/header.jsp"%>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doEditSearch(){
  5. document.forms.client.action.value="client_edit_search";
  6. document.forms.client.submit();
  7. doDisable(document.forms.client, "button");
  8. }
  9. function doUpdateClient(){
  10. var x = window.confirm("<bean:message key="confirm.edit"/>");
  11. if(x){
  12. document.forms.client.action.value = "client_edit_ok";
  13. document.forms.client.post.value = "true";
  14. document.forms.client.submit();
  15. }
  16. }
  17. function doBack(){
  18. document.forms.client.action.value="client_detail";
  19. document.forms.client.submit();
  20. doDisable(document.forms.client, "button");
  21. }
  22. function doAddClientItem(){
  23. document.forms.client.addClientItemBtn.disabled=true;
  24. document.forms.client.action.value="add_clientTarget";
  25. document.forms.client.itemFocus.value="host";
  26. document.forms.client.submit();
  27. }
  28. function doEditClientItem(sequence){
  29. document.forms.client.action.value="edit_clientTarget";
  30. document.forms.client.itemFocus.value="host";
  31. document.forms.client.sequence.value=sequence;
  32. document.forms.client.submit();
  33. }
  34. function doDeleteClientItem(sequence){
  35. var x = window.confirm("<bean:message key="confirm.delete"/>");
  36. if(x){
  37. document.forms.client.action.value="delete_clientTarget";
  38. //document.forms.client.itemFocus.value="host";
  39. document.forms.client.sequence.value=sequence;
  40. document.forms.client.submit();
  41. }
  42. }
  43. function doAddAdaptorCodex(){
  44. document.forms.client.addAdaptorCodexBtn.disabled=true;
  45. document.forms.client.action.value="add_adaptorCodexClient";
  46. document.forms.client.submit();
  47. }
  48. function doEditAdaptorCodex(sequence){
  49. document.forms.client.action.value="edit_adaptorCodexClient";
  50. document.forms.client.sequence.value=sequence;
  51. document.forms.client.submit();
  52. }
  53. function doDeleteAdaptorCodex(sequence){
  54. var x = window.confirm("<bean:message key="confirm.delete"/>");
  55. if(x){
  56. document.forms.client.action.value="delete_adaptorCodexClient";
  57. document.forms.client.sequence.value=sequence;
  58. document.forms.client.submit();
  59. }
  60. }
  61. -->
  62. </script>
  63. <!-- CONTENT -->
  64. <form name="client" method="post" action="adaptor.do">
  65. <input type="hidden" name="action">
  66. <input type="hidden" name="itemFocus">
  67. <html:hidden name="client_${ts}" property="adaptorId"/>
  68. <input type="hidden" name="sequence">
  69. <logic:notEmpty name="idx"><input type="hidden" name="idx" value="<bean:write name="idx"/>"/></logic:notEmpty>
  70. <input type="hidden" name="ts" value="<bean:write name="ts"/>">
  71. <input type="hidden" name="post">
  72. <input type="hidden" name="redirect" value="client_edit">
  73. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  74. <tr>
  75. <td class="titleHeader"><bean:message key="project.client.key"/> - EDIT</td>
  76. </tr>
  77. </table>
  78. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  79. <tr>
  80. <td colspan="7"><html:errors/></td>
  81. </tr>
  82. <logic:empty name="client_${ts}" property="adaptorId">
  83. <tr>
  84. <td width="15%"><b><bean:message key="client.adaptorId.key"/> <font color="#FF0000">*</font></b></td>
  85. <td width="1%">:</td>
  86. <td width="84%">
  87. <input type="text" name="idSearch" value="">
  88. </td>
  89. </tr>
  90. <tr>
  91. <td width="15%"></td>
  92. <td width="10"></td>
  93. <td width="30%">
  94. <input type="button" value="<bean:message key="button.edit"/>" onclick="javascript:doEditSearch();">
  95. </td>
  96. <td width="5%">&nbsp;</td>
  97. <td width="15%">&nbsp;</td>
  98. <td width="10">&nbsp;</td>
  99. <td width="30%">&nbsp;</td>
  100. </tr>
  101. <tr>
  102. <td>&nbsp;</td>
  103. <td>&nbsp;</td>
  104. <td>&nbsp;</td>
  105. <td>&nbsp;</td>
  106. <td>&nbsp;</td>
  107. <td>&nbsp;</td>
  108. <td>&nbsp;</td>
  109. </tr>
  110. </logic:empty>
  111. <logic:notEmpty name="adaptor_${ts}" property="id">
  112. <logic:notEmpty name="client_${ts}" property="adaptorId">
  113. <tr>
  114. <td width="30%"><b><bean:message key="client.adaptorId.key"/> <font color="#FF0000">*</font></b></td>
  115. <td width="5">:</td>
  116. <td width="60%">
  117. <bean:write name="client_${ts}" property="adaptorId"/>
  118. </td>
  119. </tr>
  120. <tr>
  121. <td width="15%"><b><bean:message key="client.idleWait.key"/></b></td>
  122. <td width="10">:</td>
  123. <td width="30%">
  124. <html:text name="client_${ts}" property="idleWait"/>
  125. </td>
  126. <td width="5%">&nbsp;</td>
  127. <td width="15%">&nbsp;</td>
  128. <td width="10">&nbsp;</td>
  129. <td width="30%">&nbsp;</td>
  130. </tr>
  131. <tr>
  132. <td width="15%"><b><bean:message key="client.timeout.key"/></b></td>
  133. <td width="10">:</td>
  134. <td width="30%">
  135. <html:text name="client_${ts}" property="timeout"/>
  136. </td>
  137. <td width="5%">&nbsp;</td>
  138. <td width="15%">&nbsp;</td>
  139. <td width="10">&nbsp;</td>
  140. <td width="30%">&nbsp;</td>
  141. </tr>
  142. <tr>
  143. <td width="15%"><b><bean:message key="client.closeQueue.key"/></b></td>
  144. <td width="10">:</td>
  145. <td width="30%">
  146. <html:text name="client_${ts}" property="closeQueue"/>
  147. </td>
  148. <td width="5%">&nbsp;</td>
  149. <td width="15%">&nbsp;</td>
  150. <td width="10">&nbsp;</td>
  151. <td width="30%">&nbsp;</td>
  152. </tr>
  153. <tr>
  154. <td width="15%"><b><bean:message key="client.controlQueue.key"/></b></td>
  155. <td width="10">:</td>
  156. <td width="30%">
  157. <html:text name="client_${ts}" property="controlQueue"/>
  158. </td>
  159. <td width="5%">&nbsp;</td>
  160. <td width="15%">&nbsp;</td>
  161. <td width="10">&nbsp;</td>
  162. <td width="30%">&nbsp;</td>
  163. </tr>
  164. <tr>
  165. <td width="15%"><b><bean:message key="client.keepConn.key"/></b></td>
  166. <td width="1%">:</td>
  167. <td width="84%" align="left" colspan="5">
  168. <SELECT name="keepConn">
  169. <option value="">Pilih Salah Satu</option>
  170. <option value="1"
  171. <logic:equal name="client_${ts}" property="keepConn" value="1">
  172. SELECTED
  173. </logic:equal>
  174. >Yes</option>
  175. <option value="0"
  176. <logic:equal name="client_${ts}" property="keepConn" value="0">
  177. SELECTED
  178. </logic:equal>
  179. >No</option>
  180. </SELECT>
  181. </td>
  182. </tr>
  183. <tr>
  184. <td width="15%"><b><bean:message key="client.reuseDelay.key"/></b></td>
  185. <td width="1%">:</td>
  186. <td width="84%" align="left" colspan="5">
  187. <html:text name="client_${ts}" property="reuseDelay"/>
  188. </td>
  189. </tr>
  190. <tr>
  191. <td width="15%"><b><bean:message key="client.node.key"/></b></td>
  192. <td width="1%">:</td>
  193. <td width="84%" align="left" colspan="5">
  194. <html:text name="client_${ts}" property="node"/>
  195. </td>
  196. </tr>
  197. <tr>
  198. <td width="15%"><b><bean:message key="adaptor.description.key"/></b></td>
  199. <td width="10">:</td>
  200. <td width="30%">
  201. <html:text name="adaptor_${ts}" property="description"/>
  202. </td>
  203. <td width="5%">&nbsp;</td>
  204. <td width="15%">&nbsp;</td>
  205. <td width="10">&nbsp;</td>
  206. <td width="30%">&nbsp;</td>
  207. </tr>
  208. <tr>
  209. <td width="15%"><b><bean:message key="adaptor.asynchronous.key"/></b></td>
  210. <td width="10">:</td>
  211. <td width="30%">
  212. <SELECT name="asynchronous">
  213. <option value="">Pilih Salah Satu</option>
  214. <option value="0"
  215. <logic:equal name="adaptor_${ts}" property="asynchronous" value="0">
  216. SELECTED
  217. </logic:equal>
  218. >Synchronous</option>
  219. <option value="1"
  220. <logic:equal name="adaptor_${ts}" property="asynchronous" value="1">
  221. SELECTED
  222. </logic:equal>
  223. >Asynchronous</option>
  224. </SELECT>
  225. </td>
  226. <td width="5%">&nbsp;</td>
  227. <td width="15%">&nbsp;</td>
  228. <td width="10">&nbsp;</td>
  229. <td width="30%">&nbsp;</td>
  230. </tr>
  231. <tr>
  232. <td width="15%"></td>
  233. <td width="10"></td>
  234. <td width="30%">
  235. <input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();"/>&nbsp;
  236. <input type="button" value="<bean:message key="button.submit"/>" onclick="doUpdateClient();"/></td>
  237. <td colspan="4">&nbsp;</td>
  238. </tr>
  239. <tr>
  240. <td>&nbsp;</td>
  241. <td>&nbsp;</td>
  242. <td>&nbsp;</td>
  243. <td>&nbsp;</td>
  244. <td>&nbsp;</td>
  245. <td>&nbsp;</td>
  246. <td>&nbsp;</td>
  247. </tr>
  248. <tr>
  249. <td colspan="7">
  250. <br>
  251. <table border="0" width="98%" align="center" cellpadding="2" cellspacing="1">
  252. <tr >
  253. <td colspan="7" class="titleHeader" align="left"><bean:message key="project.clientTarget.key"/></td>
  254. </tr>
  255. <tr class="titlefield">
  256. <td align="left" class="titleField"><bean:message key="clientTarget.id.key"/> <font color="#FF0000">*</font></td>
  257. <td align="left" class="titleField"><bean:message key="clientTarget.host.key"/> <font color="#FF0000">*</font></td>
  258. <td align="left" class="titleField"><bean:message key="clientTarget.weight.key"/></td>
  259. <td class="titleField">&nbsp;</td>
  260. </tr>
  261. <logic:notEmpty name="client_${ts}" property="clientTargets">
  262. <% int index = 0; %>
  263. <logic:iterate id="element_clientTargets" name="client_${ts}" property="clientTargets">
  264. <tr bgcolor="<%= index%2 == 0 ? "FFFFFF" : "EDEDE8" %>" >
  265. <td align="left"><bean:write name="element_clientTargets" property="id.id"/></td>
  266. <td align="left"><bean:write name="element_clientTargets" property="host"/></td>
  267. <td align="left"><bean:write name="element_clientTargets" property="weight" /></td>
  268. <td align="center">
  269. <img alt="<bean:message key="button.edit" />&nbsp;<bean:message key="project.clientTarget.key" />" src="images/edit.gif" onclick="javascript:doEditClientItem(<%=index%>);">
  270. <img alt="<bean:message key="button.delete" />&nbsp;<bean:message key="project.clientTarget.key" />" src="images/recylce.gif" onclick="javascript:doDeleteClientItem(<%=index%>);">
  271. </td>
  272. </tr>
  273. <% index++; %>
  274. </logic:iterate>
  275. </logic:notEmpty>
  276. <tr>
  277. <td>
  278. <input type="text" name="idClientTarget" value="<logic:notEmpty name="clientTargets_${ts}" property="id"><bean:write name="clientTargets_${ts}" property="id.id"/></logic:notEmpty>">
  279. </td>
  280. <td>
  281. <input type="text" name="host" value="<logic:notEmpty name="clientTargets_${ts}" property="host"><bean:write name="clientTargets_${ts}" property="host"/></logic:notEmpty>">
  282. </td>
  283. <td>
  284. <input type="text" name="weight" value="<logic:notEmpty name="clientTargets_${ts}" property="weight"><bean:write name="clientTargets_${ts}" property="weight"/></logic:notEmpty>">
  285. </td>
  286. <td align="center">
  287. <input type="button" name="addClientItemBtn" value="<bean:message key="button.add" />" onclick="javascript:doAddClientItem();"></td>
  288. </tr>
  289. </table>
  290. <br>
  291. </td>
  292. </tr>
  293. <tr>
  294. <td>&nbsp;</td>
  295. </tr>
  296. <tr>
  297. <td class="titleHeader" align="left" colspan="7"><b><bean:message key="project.adaptorCodex.key"/></b></td>
  298. </tr>
  299. <!-- LIST ADD ADAPTOR CODEX -->
  300. <tr>
  301. <td colspan="7">
  302. <table width="100%" border="0" cellspacing="1" cellpadding="1">
  303. <tr>
  304. <td class="titleField" height="22" width="5%" align="center"><bean:message key="adaptorCodex.no.key"/></td>
  305. <td nowrap="nowrap" class="titleField" width="30%"><bean:message key="adaptorCodex.id.key"/></td>
  306. <td class="titleField" width="55%"><bean:message key="adaptorCodex.codex.key"/></td>
  307. <td class="titleField" width="10%">&nbsp;</td>
  308. </tr>
  309. <!-- START ADAPTOR CODEX -->
  310. <logic:notEmpty name="adaptor_${ts}" property="adaptorCodexes">
  311. <% int index = 0; %>
  312. <logic:iterate id="element_adaptorCodexes" name="adaptor_${ts}" property="adaptorCodexes">
  313. <tr bgcolor="<%= index%2 == 0 ? "FFFFFF" : "EDEDE8" %>" >
  314. <td align="center"><%=++seq2%>&nbsp;</td>
  315. <td align="left">&nbsp;<bean:write name="element_adaptorCodexes" property="id.id"/></td>
  316. <td align="left">&nbsp;<bean:write name="element_adaptorCodexes" property="codexId.id"/></td>
  317. <td align="center">
  318. <a href="#" ><img src="./images/edit.gif" border="0" onclick="javascript:doEditAdaptorCodex(<%=index%>);" alt="edit"></a>
  319. <a href="#" ><img src="./images/trash.gif" border="0" onclick="javascript:doDeleteAdaptorCodex(<%=index%>);" alt="remove"></a>
  320. </td>
  321. </tr>
  322. <% index++; %>
  323. </logic:iterate>
  324. </logic:notEmpty>
  325. <!-- END LIST ADD ADAPTOR CODEX -->
  326. <!-- ADD ANAK ADAPTOR CODEX-->
  327. <tr>
  328. <td>&nbsp;</td>
  329. <td align="left" >
  330. <input type="text" name="idAdaptorCodexes" value="<logic:notEmpty name="adaptorCodexes_${ts}" property="id"><bean:write name="adaptorCodexes_${ts}" property="id.id"/></logic:notEmpty>">
  331. </td>
  332. <td align="left">
  333. <select name="codex">
  334. <option value="">-- Pilih Salah Satu --</option>
  335. <logic:notEmpty name="codexList">
  336. <logic:iterate id="codexElement" name="codexList">
  337. <option value="<bean:write name="codexElement" property="id"/>"
  338. <logic:notEmpty name="adaptorCodexes_${ts}" property="codexId">
  339. <logic:equal name="adaptorCodexes_${ts}" property="codexId.id" value="${codexElement.id}">
  340. SELECTED
  341. </logic:equal>
  342. </logic:notEmpty>
  343. >
  344. <bean:write name="codexElement" property="id"/></option>
  345. </logic:iterate>
  346. </logic:notEmpty>
  347. </select>
  348. </td>
  349. <td align="center">
  350. <br><input type="button" name="addAdaptorCodexBtn" value="<bean:message key="button.add"/>" onclick="javascript:doAddAdaptorCodex();">
  351. </td>
  352. </tr>
  353. </table>
  354. </td>
  355. </tr>
  356. </logic:notEmpty>
  357. </logic:notEmpty>
  358. <!-- END ANAK ADAPTOR CODEX-->
  359. </table>
  360. </form>
  361. <!-- END CONTENT -->
  362. <%@ include file="../common/footer.jsp"%>