cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 許議中 <john...@erp.tw>
Subject Re: BUG in forms-field-styling.xsl
Date Sat, 26 Aug 2006 15:58:42 GMT
I have a form with a disabled check-box in it, If there is no name 
attribute in it, I can see the value in the form, but I can't read the 
fields value by script, that's why I think it's a bug.

If others aggree it,  I'll report it to JIRA.

Best Regards

johnson

Jason Johnston 提到:

> 許議中 wrote:
>
>> Hi!
>>
>> I found there's a bug in forms-field-styling.xsl.
>>
>> <xsl:template match="fi:booleanfield[@state='output' or
>> fi:styling/@type='output']" priority="3">
>> <input id="{@id}" type="checkbox" title="{fi:hint}" disabled="disabled"
>> value="{@true-value}">
>> <xsl:if test="fi:value != 'false'">
>> <xsl:attribute name="checked">checked</xsl:attribute>
>> </xsl:if>
>> </input>
>> </xsl:template>
>>
>> must add a name attribute.
>>
>> <xsl:template match="fi:booleanfield[@state='output' or
>> fi:styling/@type='output']" priority="3">
>> <input id="{@id}" type="checkbox" title="{fi:hint}" disabled="disabled"
>> value="{@true-value}" name="{@id}">
>> <xsl:if test="fi:value != 'false'">
>> <xsl:attribute name="checked">checked</xsl:attribute>
>> </xsl:if>
>> </input>
>> </xsl:template>
>
>
>
> Is there a negative symptom caused by the absence of the name 
> attribute?  The above template creates a disabled checkbox, which 
> won't send a name-value pair on the submit request anyway, so the name 
> shouldn't be needed, right?
>
> I'm happy to commit your patch, I'm just trying to understand the 
> motivation behind it and what, if any, bug it fixes.
>
> BTW, in the future please submit bug reports and patches to JIRA, as 
> they tend to get lost on the mailing lists. 
> https://issues.apache.org/jira/browse/COCOON
>
> Thanks
> --Jason
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



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


Mime
View raw message