Struts 1 yah I assume Pas di reset juga kosongin ActionMessage ato ActionError nya dong..
Adelwin Handoyo COTS (DS) Consultant, Financial Services Industry NCS Pte. Ltd. (Reg. No. 198101793G) A member of the Singapore Telecom Group 5 Ang Mo Kio St 62, NCS Hub, Singapore (569141) DID : (65) 6556 6785 Fax: (65) 6483 5420 Email ID : [EMAIL PROTECTED] Website: http://www.ncs.com.sg **** DISCLAIMER ***** This e-mail and any attachments thereto are intended for the sole use of the recipient(s) named above and may contain information that is confidential and/or proprietary to the NCS Group. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication, or dissemination in any form) by persons other than the intended recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete it. **** NCS Pte. Ltd. - Reg. No. 198101793G **** -----Original Message----- From: jug-indonesia@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bohell_muslim Sent: Tuesday, November 04, 2008 11:54 AM To: jug-indonesia@yahoogroups.com Subject: [JUG-Indonesia] Tanya Struts Error Handling Ak buat applikasi menggunakan Framework struts, untuk menyimpan data yang inputanya dari TEXTFIELD. pas ak tekan tombol SUBMIT...ketika data benar gak ada masalah, langsung ke page selanjutnya (TAMPILDATA.JSP) dan masuk ke DataBase .....Tetapi ada masalah ketika data yang diinput primarykey databasenya duplikat, handlingnya jalan yaitu mengmpilkan Pesan Error "DUPLIKAT" dan tetap menampilkan page yang sama(TAMBAHDATA.JSP) ....nah, masalahnya napa ya tombol RESET jd seperti g berfungsi, jadi gmana caranya ketika ditekan tombol RESET, TEXTFIELD dan PESANERROR jadi clear lg seperti semula...berikut contoh potongan programnya di celas MhsAction extends Action... int n = stmt.executeUpdate(query); if(n==1){ return mapping.findForward("TampilMhs"); } else{ errors.add("nrp", new ActionMessage("exist")); saveErrors(request,errors); return mapping.getInputForward(); } SEDANGKAN UNTUK POTONGAN PROGRAM untuk melakukan fungsi reset hapus DIKELAS MhsForm extends ActionForm.... public void reset(ActionMapping mapping, HttpServletRequest request) { nrp = nama = alamat = null; } ------------------------------------ Kalau mau keluar dari mailing list ini, caranya kirim sebuah email ke [EMAIL PROTECTED] Jangan lupa, website JUG Indonesia adalah http://www.jug.or.id Yahoo! Groups Links