Re: How does one get the "validate" method to be called?
So, as I was saying, I don't like having to define multiple namespaces just to be able to define a default stack for a different group of actions. In the last example, if I give package B a namespace, it will work with each package having its own default stack. -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15169391.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
When you specify a default stack for a package in which an action is part of, you do not have to specify an interceptor or interceptor stack on the action mapping. This makes maintenance far easier. In any case, I am referring to being able to do this: aPage.jsp aPage.jsp The only thing preventing being able to do that, is that the default stack defined in package B will override the default stack define in package A because they have the same namespace. -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15169389.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
Right now, I am forced to define a different namespace for each group of actions with a different default stack. Unlike the example discussed thus far, my action definitions don't specify an interceptor. The code posted is a little unique in that only this action uses the shown set of interceptors. So, this is what I do: package x-name namespace X -> default stack -> actions package y-name namespace Y -> different default stack -> actions I wish I did not have to define a different namespace just to be able to define different default stacks. -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15165239.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
Dave, I have to disagree with you on customizing the interceptors. It is just sloppy to use a generic stack that calls every interceptor. Important issues also get lost when you do that. The true issue with Struts2 is the poor documentation. Worst is the fact that some of the defaults just aren't smart. I really wish there was a way to group actions for the purpose of applying default stacks without being forced to define a namespace or overriding the default stack of an existing namespace. newton.dave wrote: > > From: specdev2 <[EMAIL PROTECTED]> >> The action validate() method gets called properly by the Workflow >> Interceptor. >> http://struts.apache.org/2.x/docs/workflow-interceptor.html > > > Oh, you're right [for that version of XWork]. > > > You'll need to change that when you upgrade S2, though; current XWork does > not work this way. > > > While I can appreciate the desire to "optimize" your interceptor stacks > you are configuring yourself into a corner and are opening your > application up to potential issues as the framework evolves. > > > IMO it's not worth it. > > > Dave > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15164612.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
Just to clarify, the following works as desired: toHtmlUtilityViewDef The action validate() method gets called properly by the Workflow Interceptor. http://struts.apache.org/2.x/docs/workflow-interceptor.html -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15163957.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
Ok, I found the issue. The Workflow Interceptor is the one that calls validate. Hence, that's the interceptor I needed. The application now works fine. Thanks for all the help Dave. -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15163616.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
A break point in debug mode. Again, I get to the break point if I use the default stack as follow: toHtmlUtilityViewDef newton.dave wrote: > > From: specdev2 <[EMAIL PROTECTED]> >> There is just no logical reason as to why my stack would not work. > > > Oh. > > >> Again, here is my stack: > > > What evidence do you have that your validate() method isn't being called? > > > Dave > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15163537.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
I also have this: So: 1. I override the default stack. 2. I specify the exact interceptor(s) I need per action. This is to avoid useless processing. There is a fix in the work (a dtd fix) that will enable me to have a truely empty stack. Currently, the dtd forces you to define at least one interceptor whereas there is no requirement to have an interceptor in a given stack. -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15163494.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
This is the default stack: dojo\..* input,back,cancel,browse input,back,cancel,browse There is just no logical reason as to why my stack would not work. Again, here is my stack: toHtmlUtilityViewDef servletConfig, fileUpload, and params are called just fine. -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15163199.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one get the "validate" method to be called?
Thanks Dave. In fact, my problem relate to an interceptor stack problem. If I use the defautStack, it works. But if I do the following it does not: toHtmlUtilityViewDef newton.dave wrote: > > specdev2 <[EMAIL PROTECTED]> wrote: >> My action is extending ActionSupport and overriding the >> "validate" method. However, the validate method is not >> being called. > > > 1. Are you using the default interceptor stack? > 2. Have you configured any interceptors for the action in question? > > >> I have set the form tag validate attribute to true, but >> it makes no difference. > > > 's "validate" attribute does not control server-side validation > (unless you're using the "ajax" theme, I guess). > > > Dave > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15162591.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How does one get the "validate" method to be called?
Hi, My action is extending ActionSupport and overriding the "validate" method. However, the validate method is not being called. I have set the form tag validate attribute to true, but it makes no difference. What am I missing? Thanks. -- View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15160502.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]