[ http://issues.apache.org/jira/browse/COCOON-1780?page=all ] vincent Demay reopened COCOON-1780: -----------------------------------
I tried you patch on a form with a on-value-changed listener on upload and it works. but when there isn't any on-value-change-listener and you submit the form with another input type="submit" the fallowing error occurs java.lang.IllegalStateException: Submit widget already set to Upload 'upload'. Cannot set also Submit 'ok' I think it's because we set the submit-id with the upload and after we set it again. > [PATCH] Upload Widget : Can not change selected file > ---------------------------------------------------- > > Key: COCOON-1780 > URL: http://issues.apache.org/jira/browse/COCOON-1780 > Project: Cocoon > Type: Bug > Components: Blocks: Forms > Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN) > Reporter: vincent Demay > Assignee: Jean-Baptiste Quenot > Fix For: 2.1.9-dev (current SVN) > > When a file is selected with the upload widget and a on-value-change event is > fired, the value of the widget can not be changed by user. > here is the patch > Index: > /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl > =================================================================== > --- > /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl > (revision 377974) > +++ > /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl > (working copy) > @@ -486,7 +486,7 @@ > <xsl:text>[</xsl:text> > <xsl:value-of select="fi:value"/> > <xsl:text>] </xsl:text> > - <input type="button" id="[EMAIL PROTECTED]:input" name="[EMAIL > PROTECTED]" value="..." onclick="forms_submitForm(this)"/> > + <input type="submit" id="[EMAIL PROTECTED]:input" name="[EMAIL > PROTECTED]" value="..." onclick="forms_submitForm(this)"/> > </xsl:when> > <xsl:otherwise> > <input type="file" id="[EMAIL PROTECTED]:input" name="[EMAIL > PROTECTED]" title="{fi:hint}" accept="[EMAIL PROTECTED]"> -- 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
