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.

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

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.

-----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]

Reply via email to