[ http://issues.apache.org/jira/browse/COCOON-1846?page=all ]
Simone Gianni reassigned COCOON-1846:
-------------------------------------
Assign To: Simone Gianni
> [PATCH] BooleanField and radio do not send on-value-changed at the rigth time
> with IE
> -------------------------------------------------------------------------------------
>
> Key: COCOON-1846
> URL: http://issues.apache.org/jira/browse/COCOON-1846
> Project: Cocoon
> Type: Bug
> Components: Blocks: Forms
> Versions: 2.1.9
> Reporter: vincent Demay
> Assignee: Simone Gianni
>
> BooleanField and radio list do not send on-value-changed event when the value
> changed but when the widget loose focus with IE.
> So with ajax mode and submit-on-change='true', the form is submitted only
> when the widget lost the focus.
> Here is a patch to use event onclick rather than on value change :
> --- forms-field-styling.xsl 2006-05-09 14:53:40.014409000 +0200
> +++ forms-field-styling.xsl 2006-05-09 14:45:01.499752000 +0200
> @@ -91,11 +91,20 @@
> +-->
> <xsl:template match="fi:*" mode="styling">
> <xsl:apply-templates select="fi:styling/@*" mode="styling"/>
> -
> <!-- Auto submit on fields which are listening -->
> - <xsl:if test="@listening = 'true' and not(fi:styling/@submit-on-change
> ='false') and not(fi:styling/@onchange) and not(fi:styling/@list-type =
> 'double-listbox')">
> - <xsl:attribute name="onchange">forms_submitForm(this)</xsl:attribute>
> - </xsl:if>
> + <xsl:choose>
> + <xsl:when test="name() = 'fi:booleanfield' or fi:styling/@list-type =
> 'radio' ">
> + <xsl:if test="@listening = 'true' and
> not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange) and
> not(fi:styling/@list-type = 'double-listbox')">
> + <xsl:attribute
> name="onclick">forms_submitForm(this)</xsl:attribute>
> + </xsl:if>
> + </xsl:when>
> + <xsl:otherwise>
> + <xsl:if test="@listening = 'true' and
> not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange) and
> not(fi:styling/@list-type ='double-listbox')">
> + <xsl:attribute
> name="onchange">forms_submitForm(this)</xsl:attribute>
> + </xsl:if>
> + </xsl:otherwise>
> + </xsl:choose>
> +
> <xsl:if test="@state = 'disabled'">
> <xsl:attribute name="disabled">disabled</xsl:attribute>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira