You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by t t <wa...@yahoo.com> on 2004/11/11 01:59:44 UTC
Re: Help needed on question regarding html:select and html:options...but...
Thanks, Erik. I did set it to false. But it's still
been validated when submitted. confusing...
--- Erik Weber <er...@mindspring.com> wrote:
> There is a "validate" attribute to the "action"
> element in
> struts-config.xml. You set it to true or false.
>
>
http://struts.apache.org/userGuide/dev_validator.html
>
> Erik
>
>
> t t wrote:
>
> >How can I turn off validator? THanks.
> >--- t t <wa...@yahoo.com> wrote:
> >
> >
> >
> >>Or I can set a parameter before executing the
> added
> >>action.
> >>--- t t <wa...@yahoo.com> wrote:
> >>
> >>
> >>
> >>>Hi, Erik,
> >>>I got an idea. I can insert another action before
> >>>the actual action be executed. And use
> javascript
> >>>change a hidden property before executing the
> >>>
> >>>
> >>added
> >>
> >>
> >>>action, then I can do what i want to do in the
> >>>added action. What do you think? I will try it
> >>>later.
> >>>Thanks for your help!
> >>>Tong
> >>>
> >>>Erik Weber <er...@mindspring.com> wrote:
> >>>JavaScript can change the action URL on the fly.
> >>>
> >>>
> >>For
> >>
> >>
> >>>example:
> >>>
> >>>
> >>>
> >>>
>
>http://www.willmaster.com/possibilities/archives/wmp20030527001.shtml
> >
> >
> >>>However, I'm not sure how compatible this type of
> >>>thing will be with the
> >>>Struts form tag. I've never tried it. I'm
> >>>
> >>>
> >>surprised
> >>
> >>
> >>>others aren't
> >>>speaking up because the "multiple submit" problem
> >>>comes up a lot. If you
> >>>search the archives for "multiple submit buttons"
> >>>you might find other
> >>>ideas.
> >>>
> >>>Erik
> >>>
> >>>
> >>>t t wrote:
> >>>
> >>>
> >>>
> >>>>Hi,Erik,
> >>>>I think that helps. I have another question.
> >>>>
> >>>>
> >>>Besides the "action" attribute in html:form, is
> >>>anywhere else we can specify another "action"
> >>>corresponding the submission of javascript?
> >>>
> >>>
> >>>>Thanks.
> >>>>Tong
> >>>>
> >>>>Erik Weber wrote:
> >>>>There may be other ways or better ways, but one
> >>>>
> >>>>
> >>>thing you could do is
> >>>
> >>>
> >>>>vary the action URL. You could have the same
> >>>>
> >>>>
> >>action
> >>
> >>
> >>>class serving
> >>>
> >>>
> >>>>slightly different action mappings, some with
> >>>>
> >>>>
> >>>validation set to true and
> >>>
> >>>
> >>>>some with validation set to false.
> >>>>
> >>>>I did what you are trying to do in a non-Struts
> >>>>
> >>>>
> >>>Servlet app, and there I
> >>>
> >>>
> >>>>just used a query string parameter to indicate
> >>>>
> >>>>
> >>>which type of submit was
> >>>
> >>>
> >>>>happening (but I didn't have to worry about
> >>>>
> >>>>
> >>getting
> >>
> >>
> >>>past the validator).
> >>>
> >>>
> >>>>Remember that JavaScript can change the value of
> >>>>
> >>>>
> >>a
> >>
> >>
> >>>field (including a
> >>>
> >>>
> >>>>hidden field) before it submits the form.
> >>>>
> >>>>Also, another technique for conditionally using
> >>>>
> >>>>
> >>the
> >>
> >>
> >>>validator is to turn
> >>>
> >>>
> >>>>automatic form validation off, override the
> >>>>
> >>>>
> >>>validate method in your
> >>>
> >>>
> >>>>ActionForm, but there simply invoke the
> validator
> >>>>
> >>>>
> >>>manually just as
> >>>
> >>>
> >>>>Struts would have done with automatic
> validation.
> >>>>
> >>>>
> >>>This gives you a
> >>>
> >>>
> >>>>chance to insert a switch before invoking the
> >>>>
> >>>>
> >>>validator.
> >>>
> >>>
> >>>>Probably there are others on the list who know a
> >>>>
> >>>>
> >>>lot more about this
> >>>
> >>>
> >>>>than me and might have a better idea. Hope that
> >>>>
> >>>>
> >>>helps.
> >>>
> >>>
> >>>>Erik
> >>>>
> >>>>
> >>>>t t wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>The problem is, when the form is submitted, it
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org