struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stanl...@gmail.com
Subject Re: Action Validator ans <s:url...
Date Thu, 05 Apr 2007 14:54:30 GMT
Thanks Ted.  Let us suppose for a moment there are no parameters passed with
the URL.  Is there an S2 pulley or chain I can tug on to bypass the
validation?  Maybe this is not a case where I should be using a S2 tag?  It
strikes me as odd that a hyperlink not related to the form would be
intercepted by the form validator.  I recently discovered the Java
annotation @SkipValidation and now wonder if there might be an attribute,
flag, switch, bit of XML, or interceptor stack I could massage to avoid this
unwanted feature.

You know, this extreme flexibility reminds me of a Dilbert I saw a few years
back illustrating the boneless chicken ranch.  Seriously, S2 seems to offer
an unbounded combination of techniques for about anything you need to do.
Granted, I think a framework should be flexible, but as I read these
threads, I am more confused about the most recent "best S2 technique" I used
yesterday!

Scott

On 4/5/07, Ted Husted <husted@apache.org> wrote:
>
> A hyperlink is a get, and if coded correctly a get shouldn't have side
> effects, and so at first blush validation might seem redundant.
> Although, the struts controller doesn't distinguish between get and
> post. If there is a validator associated with the course action, then
> it would be called regardless of whether the request is coded as a
> hyperlink or form. I note that the link takes a parameter, and if the
> parameter is required to consummate the get, then validation would
> seem appropriate.
>
> HTH, Ted
> <http://www.husted.com/ted/blog/>
>
> On 4/4/07, stanlick@gmail.com <stanlick@gmail.com> wrote:
> > Should the Action class validator be getting called when a hyperlink is
> > clicked?  This is the behavior I am experiencing.  My hyperlink is coded
> as
> > follows:
> >
> >                         <s:url id="url" action="course!remove">
> >                             <s:param name="course.id">
> >                                 <s:property value="id" />
> >                             </s:param>
> >                         </s:url>
> >
> > The hyperlink is outside the form tags!
> >
> > --
> > Scott
> > stanlick@gmail.com
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Scott
stanlick@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message