> -----Original Message-----
> From: Kurt Post [mailto:[EMAIL PROTECTED]
> Sent: July 21, 2003 3:04 PM
> To: Struts Developers List
> Subject: RE: DO NOT REPLY [Bug 21560] - JavascriptValidatorTag creates
> invalida javascript method name when validating using action path in
> formName
>
>
> I was working last week with validation based on actionpath as opposed to
> ActionForm name and I had the same problem.  I worked around it
> by using the
> "method" attribute of <html:javascript>, but it did feel kind of like a
> hack.

Not ideal, I'll grant you, but not a hack :-). The "method" attribute exists
for exactly this type of situation.

> I did try leaving the '/' out of the <html:javascript> tag and
> that resulted in no validation.  I saw this on Struts 1.1.

My bad. I knocked up a quick test that appeared to work, but it only did so
because it was triggering a client side validation error and not getting
passed to the server.

> I really think you should consider leaving this as a valid low
> priority bug.
> I would think the fix would be very simple to implement and it would make
> life easier for people who are doing action path based validation for the
> first time.

I think this would classify as an enhancement as there is an existing
solution that works. Moving forward, the whole area of validator action
forms could probably do with another look.

Steve

>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 21, 2003 4:57 PM
> To: [EMAIL PROTECTED]
> Subject: DO NOT REPLY [Bug 21560] - JavascriptValidatorTag creates
> invalida javascript method name when validating using action path in
> formName
>
>
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21560>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
> INSERTED IN THE BUG DATABASE.
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21560
>
> JavascriptValidatorTag creates invalida javascript method name when
> validating using action path in formName
>
> [EMAIL PROTECTED] changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------------
> ----------
>              Status|NEW                         |RESOLVED
>          Resolution|                            |INVALID
>
>
>
> ------- Additional Comments From [EMAIL PROTECTED]  2003-07-21
> 20:56 -------
> You don't need to specify the forward slash in your validator
> configuration.
> This configuration works for an Action with a path /myAction -
>
> JSP:
>   <html:javascript formName="myAction" />
>   <html:form action="/myAction"  onsubmit="return
> validateMyAction(this);">
>
> Validation.xml
>   <form name="myAction" onsubmit="return validateMyAction(this);">
>
> If, for any reason, you did need to include the forward slashes,
> you can use
> the
> 'method' attribute of the <html:javascript> to specify a different
> javascript
> method name than the default. e.g.
>   <html:javascript formName="/myAction" method="validateMyAction" />
>
> ---------------------------------------------------------------------
> 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]

Reply via email to