You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ian Fieldhouse <ia...@ed.ac.uk> on 2009/01/29 11:35:48 UTC

XHTML and form element name attribute

When using a form component in my template with the following markup  
<t:form t:id="search"/> the rendered html includes a 'name' attribute  
for the form element. I'm trying to author my pages in 'XHTML  
Strict' (having included the relevant DOCTYPE in my page template) so  
the name attribute is not valid. I read on the form component  
reference page that:

> Form Ids
> ...
> These ids propogate down to the client side as element names and/or  
> ids...
> ...

I don't suppose anyone can point me in the right direction to some  
documentation that shows you how to disable the propagation of the id  
to an element name while still preserving the id?

Thanks in advance.

Cheers,

Ian

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: XHTML and form element name attribute

Posted by cordenier christophe <ch...@gmail.com>.
Tapestry Form components adds name attribute directly name attribute via
MarkupWriter.

A workaround is maybe to create MarkupWriterListener that listens to node
creation and use forceAttributes to remove the name attribute from form
elements. If you set name to 'null' it must be removed. Here is an extract
of Javadoc for the forceAttributes method.


Forces changes to a number of attributes. The new attributes
<em>overwrite</em> previous values. Overriding an
attribute's value to null will remove the attribute entirely.



2009/9/30 Daniel Jones <da...@murieston.com>

>
> Hi Ian,
>
> Did you find a solution for this?
>
> Cheers,
> Daniel
>
>
> Ian Fieldhouse wrote:
> >
> > When using a form component in my template with the following markup
> > <t:form t:id="search"/> the rendered html includes a 'name' attribute
> > for the form element. I'm trying to author my pages in 'XHTML
> > Strict' (having included the relevant DOCTYPE in my page template) so
> > the name attribute is not valid. I read on the form component
> > reference page that:
> >
> >> Form Ids
> >> ...
> >> These ids propogate down to the client side as element names and/or
> >> ids...
> >> ...
> >
> > I don't suppose anyone can point me in the right direction to some
> > documentation that shows you how to disable the propagation of the id
> > to an element name while still preserving the id?
> >
> > Thanks in advance.
> >
> > Cheers,
> >
> > Ian
> >
> > --
> > The University of Edinburgh is a charitable body, registered in
> > Scotland, with registration number SC005336.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/XHTML-and-form-element-name-attribute-tp21724379p25679085.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: XHTML and form element name attribute

Posted by Daniel Jones <da...@murieston.com>.
Hi Ian,

Did you find a solution for this?

Cheers,
Daniel


Ian Fieldhouse wrote:
> 
> When using a form component in my template with the following markup  
> <t:form t:id="search"/> the rendered html includes a 'name' attribute  
> for the form element. I'm trying to author my pages in 'XHTML  
> Strict' (having included the relevant DOCTYPE in my page template) so  
> the name attribute is not valid. I read on the form component  
> reference page that:
> 
>> Form Ids
>> ...
>> These ids propogate down to the client side as element names and/or  
>> ids...
>> ...
> 
> I don't suppose anyone can point me in the right direction to some  
> documentation that shows you how to disable the propagation of the id  
> to an element name while still preserving the id?
> 
> Thanks in advance.
> 
> Cheers,
> 
> Ian
> 
> -- 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XHTML-and-form-element-name-attribute-tp21724379p25679085.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org