You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Robert Leland <le...@speakeasy.net> on 2004/04/03 18:35:31 UTC
JavaScriptTag and multiple forms.
Every since I applied the patch to allow the validator to work,
with multiple forms, there has been one thing that has bothered me:
The JavaScriptTag requires the name of the form.
So now both the form name and the action name are required in the JSP, and this increases the coupling.
How about we change it to take an 'action' instead of a form name ?
That way the JSP need only know about the actions.
-Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: JavaScriptTag and multiple forms.
Posted by Joe Germuska <Jo...@Germuska.com>.
At 4:35 PM +0000 4/3/04, Robert Leland wrote:
>Every since I applied the patch to allow the validator to work,
>with multiple forms, there has been one thing that has bothered me:
>
>The JavaScriptTag requires the name of the form.
>
>So now both the form name and the action name are required in the
>JSP, and this increases the coupling.
>
>How about we change it to take an 'action' instead of a form name ?
>That way the JSP need only know about the actions.
If you did that, how would it know whether to use the 'path' or the
'name' to look up the validation rules?
I don't love the coupling, but I'm not thinking of a great solution.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers, and
nobody thinks of complaining."
-- Jef Raskin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: JavaScriptTag and multiple forms.
Posted by Matt Raible <li...@raibledesigns.com>.
On Apr 4, 2004, at 2:11 PM, Niall Pemberton wrote:
> Now that the four flavours of validator form (ValidatorForm,
> ValidatorActionForm, DynaValidatorForm, DynaValidatorActionForm) have a
> getValidatorKey() method, maybe the JavaScriptTag should get hold of
> these
> and call the getValidatorKey() - that way the formName could become
> optional, or even removed?
>
> Then no coupling at all.
+1 - sounds like the logical choice to me!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: JavaScriptTag and multiple forms.
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Now that the four flavours of validator form (ValidatorForm,
ValidatorActionForm, DynaValidatorForm, DynaValidatorActionForm) have a
getValidatorKey() method, maybe the JavaScriptTag should get hold of these
and call the getValidatorKey() - that way the formName could become
optional, or even removed?
Then no coupling at all.
Niall
----- Original Message -----
From: "Robert Leland" <le...@speakeasy.net>
To: <de...@struts.apache.org>
Sent: Saturday, April 03, 2004 5:35 PM
Subject: JavaScriptTag and multiple forms.
> Every since I applied the patch to allow the validator to work,
> with multiple forms, there has been one thing that has bothered me:
>
> The JavaScriptTag requires the name of the form.
>
> So now both the form name and the action name are required in the JSP, and
this increases the coupling.
>
> How about we change it to take an 'action' instead of a form name ?
> That way the JSP need only know about the actions.
>
> -Rob
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org