Hi Wes, thanks for the explaination, we decide to use the simple theme and use the tag to display the error. Case closed, thanks for others also that already help...
Regards Yanto On Wed, Jun 17, 2009 at 8:57 PM, Wes Wannemacher <w...@wantii.com> wrote: > All of the themes "work" with validation, it just depends on what you > are expecting out of validation. The validation workflow interceptors > will stop processing if validation fails and then indicate to the > framework that the "input" result should be rendered. Whether and how > you show the validation errors is a function of the view. The simple > theme does not display validation/action errors without the help of > tags such as s:fielderror and s:actionerror. The xhtml and css themes > will show the errors, but you do not have as much freedom, as far as > placement. The ajax theme is pretty much like xhtml. > > -Wes > > On Wed, Jun 17, 2009 at 6:15 AM, Yanto<yantob...@gmail.com> wrote: > > Finally we found the issue is actually with the theme, > > > > we need to stop using simple theme....and the validation and interceptor > > will work. > > > > > http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple-td23127366.html > > > > just wondering, is there any other theme that working with validation ? > > > > Regards > > Yanto > > > > On Wed, Jun 17, 2009 at 11:39 AM, Yanto <yantob...@gmail.com> wrote: > > > >> Hi Dave, > >> > >> after following your note, we are able to run our sample interceptor, > >> however now we have another issue the sample interceptor will always > >> looping, > >> > >> since we have the following code in the sample interceptor, > >> *return* invocation.invoke(); > >> > >> but the sample interceptor will not run, if we are not include this > code. > >> > >> > >> > >> > ====================================================================================== > >> > >> <interceptors> > >> > >> <interceptor name=*"sample"* class=* > >> "com.obs.ssts.framework.interceptor.InterceptorSample"*/> > >> > >> > >> > >> <interceptor-stack name=*"MyInterceptorStack"*> > >> > >> <interceptor-ref name=*"prepare"*/> > >> > >> <interceptor-ref name=*"modelDriven"*/> > >> > >> <interceptor-ref name=*"exception"*/> > >> > >> <interceptor-ref name=*"servletConfig"*/> > >> > >> <interceptor-ref name=*"checkbox"*/> > >> > >> <interceptor-ref name=*"params"*/> > >> > >> *<**interceptor-ref** name="**sample"**/>*** > >> > >> </interceptor-stack> > >> > >> </interceptors> > >> > >> <default-interceptor-ref name=*"MyInterceptorStack"*/> > >> > >> <action name=*"authentication"* method=*"authentication"* > class=* > >> "loginAction"*> > >> > >> <result>main.*jsp*</result> > >> > >> </action> > >> > >> > >> > >> Now my action calls going in loop and after added the myinterceptostack > >> > >> > >> > >> *public* *class* *InterceptorSample* *extends* AbstractInterceptor { > >> > >> > >> > >> @Override > >> > >> *public* String intercept(ActionInvocation invocation) > *throws*Exception { > >> > >> // *TODO* Auto-generated method stub > >> > >> System.*out*.println("Testing the interceptor flow from > TEST:" > >> ); > >> > >> System.*out*.println("Testing the interceptor flow from TEST > >> &&&&&:"); > >> > >> *return* invocation.invoke(); > >> > >> } > >> > >> > >> > >> } > >> > >> > >> Thanks > >> Yanto > >> > >> > >> > >> On Tue, Jun 16, 2009 at 7:32 PM, Dave Newton <newton.d...@yahoo.com > >wrote: > >> > >>> Yanto wrote: > >>> > >>>> <action name="test" class="test.QuizAction"> > >>>> <interceptor-ref name="sample" /> > >>>> </action> > >>>> > >>> > >>> This will configure *only* the "sample" interceptor. > >>> > >>> If you specify *any* interceptors on a per-action basis you must > configure > >>> *all* interceptors. This can be done in several ways. > >>> > >>> - specify all interceptors in the action's configuration (you can > specify > >>> interceptor stacks as well as single interceptors) > >>> - creating a new stack including your custom interceptor and using that > >>> stack in your action configuration > >>> - same, but define the new stack and using it as the default stack > >>> > >>> Dave > >>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >>> For additional commands, e-mail: user-h...@struts.apache.org > >>> > >>> > >> > > > > > > -- > Wes Wannemacher > Author - Struts 2 In Practice > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more > http://www.manning.com/wannemacher > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >