Dear Paul,

Thanks. I think it shall be a improvement. And before creating JIRA ticket,
please give me some time to extract this portion from the big codes
repository.

My project probably could not wait until the bug is resolved. Do you know is
there any alternative to resolve this problem? I'm thinking to define
another Form Bean with same properties in struts-config.xml and have two
forms in the web page. But it's awkward. 

Best Regards,
Eric


Paul Benedict-2 wrote:
> 
> Eric,
> 
> If you think this is a bug, please create a JIRA ticket for it so it can
> be
> tracked. You can copy the contents of your email in for the description.
> Also if you have a sample webapp I can test with, that will allow me to
> diagnose the problem. Just attach it to the ticket.
> 
> Paul
> 
> On Dec 26, 2007 2:09 AM, Eric Xin Zhang <[EMAIL PROTECTED]> wrote:
> 
>>
>> The circumstance is:
>>
>> 1) One JSP with only one <form> tag can be submitted to two different
>> actions, and the two actions have different validation rules.
>> 2) In struts-config.xml, the two actions shares same form bean, and the
>> form
>> bean's class is DynaValidatorActionForm.
>> 3) In validation.xml, two forms are defined for the two actions
>> respectively.
>> 4) In JSP, the <html:javascript> tag is called twice with two actions as
>> the
>> formName respectively, i.e.
>>
>> <html:javascript formName='/action1' method='validateForm1'/>
>> <html:javascript formName='/action2' method='validateForm2'/>
>>
>> The intention is to call validateForm1() or validateForm2() respectively
>> when submitting the page to different actions.
>>
>> However, now the problem is, JavaScript function for 'required' validator
>> generated by the tag will use the [FormBean Name]_required as the name,
>> and
>> thus two functions with same name are generated in such case. Actually
>> not
>> only the function for required validator, all functions are duplicated.
>> And
>> in IE, the latter function will overwrite the former and thus my idea
>> can't
>> work.
>>
>> Can somebody help? Thank you!
>>
>> I'm using struts 1.3.8.
>> --
>> View this message in context:
>> http://www.nabble.com/%3Chtml%3Ajavascript%3E-tag-generate-two-JavaScript-functions-with-same-name-tp14500278p14500278.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Chtml%3Ajavascript%3E-tag-generate-two-JavaScript-functions-with-same-name-tp14500278p14509105.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to