Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 17th, 2006, 04:52 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default showing error message but not validating

hello everybody,

iam doing validation using Struts validator.(validation.xml) i have a jsp page with 3 buttons add,edit,delete.
i have one field department. i have used DispatchAction with three methods
add,edit,delete. if i press add button i will send a "add" value from jsp page with <html:hidden>. this will call add method of DispatchAction.
which inturn add department field to persistent store and go back to my jsp page.

when i donot give any value in department field IT WILL SHOW ME THAT DEPARTMENT FEILD IS REQUIRED.BUT THE ADD METHOD OF MY DISPATCHACTION GETS CALLED AND BLANK VALUE IS ENTERED IN DATABASE.ACTUALLY ADD METHOD OF DISPATHACTION MUST NOT GET CALLED.

if any one has faced similar problem please tell me the solution.

thanks in advance.
 
Old October 26th, 2006, 12:13 AM
Registered User
 
Join Date: Oct 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sparun1607
Default

I think you are using a DynaValidatorForm, change to DynaValidatorActionForm.
You may use only one bean...
if you are using different bean for different action then you can go for DynaValidatorForm or else if you are using same bean for different action then you can go for DynaValidatorActionForm

Arun





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
help me about this quary its showing runtime error ravijoshi09 SQL Server 2000 1 March 17th, 2008 09:10 PM
Web Part - Showing error angshujit ASP.NET 2.0 Basics 2 June 21st, 2007 03:28 AM
An error occurred while validating. HRESULT = '80 Medes Excel VBA 0 May 10th, 2006 02:01 AM
Resin Server showing error ghalebro Pro JSP 0 July 22nd, 2005 04:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.