cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Error in forms-field-styling.xsl in svn
Date Fri, 29 Jul 2005 08:25:22 GMT
Joerg Heinicke wrote:

> On 26.07.2005 13:54, Christoph Hermann wrote:
>
>> <input type="button" id="{@id}-input" name="{@id}-input" value="..."
>> onclick="forms_submitForm(this)"/>
>>
>> where it should be
>>
>> <input type="button" id="{@id}-input" name="{@id}" value="..."
>>                                             ^^^^^^
>> onclick="forms_submitForm(this)"/>
>>
>> Becaus using the line above with "-input" cocoon will tell:
>> Invalid submit id (no such widget): upload-input (for a widget called
>> "upload").
>
>
> Sylvain? It was introduced with 
> http://svn.apache.org/viewcvs.cgi/cocoon/blocks/core/forms/trunk/samples/resources/forms-field-styling.xsl?rev=161264&r1=157119&r2=161264&diff_format=h.

> The both <input type="file"/> are indeed different. Should the @id and 
> @name differ?


Yes, because of the Ajax stuff. The tag that has an @id equal to the 
widget's id should enclose everything that's used to render a widget. In 
this case, it's an enclosing span.

The input's id is {@id}-input so that we can produce <label 
for="{@id}-input"> tags that effectively link the label to the right input.

I will commit the fix ASAP (SVN is currently down).

Thanks for reporting!

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


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


Mime
View raw message