1
0

client_create.jsp 14 KB

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