I am using multiple methods off this action. I have add/edit/delete screens that all use the same action but different methods within the action. I grouped them together becase they just use the same form and same DTO and almost the same SQL stmts. So I'm not using DispatchAction just to click a button and get to the next page, I'd agree that it's a waste of resources. My problem is not to validate the very first page and the page it generates. I have a with a list of countries, radio button next to each country and three buttons add, edit, delete. Add and edit screens do use the actionForm and need to be validated. The screen with the list of countries is built using <bean:write> ( the bean is stored in a session ) and it doesn't use the form and doesn't need to be validated.
As per earlier suggestion, I added more action mappings for the same dispatch action where validate="false". It seems to be working. Is it an OK practice to have many mappings for the same dispatch action? Thanks NK -----Original Message----- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Monday, October 04, 2004 12:51 PM To: Struts Users Mailing List Subject: Re: Dispatch Action and Validate - rephrased subject If you are talking about this one action, I am not sure why you would want to use DispatchAction. If you were planning in the future to maybe use multiple methods off this action, then DispatchAction or something like DispatchAction might make sense. As it is, it doesn't make sense. You are using an action that has a method to determine what method is wanted, and you don't need that. The result is that you are using something that does something you don't need to do and the resources are just wasted. I am a big fan of code first and optimize later, but that does not mean to use resources that are clearly irrelevant first and change your whole strategy later. Have you looked at the code in DispatchAction? Why would you want to use it for this? Michael McGrady Nadia Kunkov wrote: >I rephrased the subject of this posting. The old one was really wrong. > > > >Hi, >I'm building an application using DispatchAction. I have several screens that use >the same ActionForm and I set validate to "true" for this action form. >The first page of my app is just a jsp with a single button ( I have to start >somewhere :) . When I click the button on this first page which is not the form and >has no input fields, I guess Struts tries to validate it. What I see in the log is >that I do get into the validate method, the validation fails and the action itself is >not performed. How can I tell struts to not validate this first page but validate >other screens where there are input fields. Since I use dispatch action I can't >specify validate "false" for some actions and "true" for the others, it's just one >validate... >That brings me to the next question. Should I use DispatchAction? >Thanks for your help. >NK > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > >. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]