You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <dc...@fixed.com> on 2003/04/29 17:21:05 UTC

xyz@Form and the name=xyz generation

Hi,

I'm not sure about the following piece of code.

Should:
<form name="addForm" jwcid="addForm@Form">
...
</form>

generate the piece of code below. Esp the name="Form1" strikes me as odd!

<form method="post" name="Form1" action="/t2/app" name="addForm">
...
</form>

I thought I would get a name="addForm" only.

Fermin DCG

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

RE: xyz@Form and the name=xyz generation

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
I'm thinking about changing it in that way, so that the likely name for the
form would be "addForm".  Unless you had multiple components with id
addForm, in which case you'd get addForm, addForm_0, addForm_1, etc.  The
code change is ten seconds, the time to update the unit test suite is a
couple of hours that I just don't have this week.  

Again (and here's the important part) you will not know what the name of the
form is until the Form starts to render.  It then allocates a unique form
name that is not going to be predictable due to a) construction of the page
and b) future changes to the framework.  So you always want to use a Script
component and a Script Specification and obtain the actual name of the form
from the Form component itself.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: F. Da Costa Gomez [mailto:dcg@fixed.com] 
> Sent: Tuesday, April 29, 2003 11:21 AM
> To: tapestry-user@jakarta.apache.org
> Subject: xyz@Form and the name=xyz generation
> 
> 
> Hi,
> 
> I'm not sure about the following piece of code.
> 
> Should:
> <form name="addForm" jwcid="addForm@Form">
> ...
> </form>
> 
> generate the piece of code below. Esp the name="Form1" 
> strikes me as odd!
> 
> <form method="post" name="Form1" action="/t2/app" 
> name="addForm"> ... </form>
> 
> I thought I would get a name="addForm" only.
> 
> Fermin DCG
> 
> -- 
> Using M2, Opera's revolutionary e-mail client: 
> http://www.opera.com/m2/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>