|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[patch] Fix for multiFile validation bugHowdy,
Problem: multifile validation fails when no files are selected and allowEmptyValue is set to true. While validateFile() was implemented correctly, validateField() was not. It, for some reason, assumed that when no files are selected there would still be a null/empty propert present.. Solution: See patch against trunk below. Also, the multifile documentation is confusing. It should be corrected to state that, for starters, the element is called multiFile with a capital F and that the multipleVariables (and other properties) belong on the <spec> element and not on the <field> element. Have a nice day, - Bram Index: lib/com/izforge/izpack/panels/MultipleFileInputField.java =================================================================== --- lib/com/izforge/izpack/panels/MultipleFileInputField.java (revision 2876) +++ lib/com/izforge/izpack/panels/MultipleFileInputField.java (working copy) @@ -243,7 +243,11 @@ public boolean validateField(){ boolean result = false; int fileCount = model.getSize(); - + + if (fileCount == 0 && allowEmpty){ + result = true; + } + for (int i=0; i < fileCount; i++){ result = validateFile((String) model.getElementAt(i)); if (!result){ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [patch] Fix for multiFile validation bugThanks for posting a JIRA issue, I will handle it.
On Tue, Nov 3, 2009 at 9:55 AM, Bram Van Dam <bram.vandam@...> wrote: > Howdy, > > Problem: multifile validation fails when no files are selected and > allowEmptyValue is set to true. While validateFile() was implemented > correctly, validateField() was not. It, for some reason, assumed that when > no files are selected there would still be a null/empty propert present.. > > Solution: See patch against trunk below. > > Also, the multifile documentation is confusing. It should be corrected to > state that, for starters, the element is called multiFile with a capital F > and that the multipleVariables (and other properties) belong on the <spec> > element and not on the <field> element. > > Have a nice day, > > - Bram > > > > Index: lib/com/izforge/izpack/panels/MultipleFileInputField.java > =================================================================== > --- lib/com/izforge/izpack/panels/MultipleFileInputField.java (revision > 2876) > +++ lib/com/izforge/izpack/panels/MultipleFileInputField.java (working > copy) > @@ -243,7 +243,11 @@ > public boolean validateField(){ > boolean result = false; > int fileCount = model.getSize(); > - > + > + if (fileCount == 0 && allowEmpty){ > + result = true; > + } > + > for (int i=0; i < fileCount; i++){ > result = validateFile((String) model.getElementAt(i)); > if (!result){ > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- http://izpack.org/ http://jpz-log.info/ http://julien.ponge.info/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [patch] Fix for multiFile validation bugHi again,
I'm getting the impression that my bugfix has not (yet?) been included in the latest version -- at least not in the maven plugin, haven't tested the stand-alone version. Are there any plans for a new release any time soon? It's a pretty annoying bug and I'd really like to be able to use the maven version without having to do nasty trickery. Thanks a bunch, - Bram On 04/11/09 10:01, Julien Ponge wrote: > Thanks for posting a JIRA issue, I will handle it. > > On Tue, Nov 3, 2009 at 9:55 AM, Bram Van Dam<bram.vandam@...> wrote: >> Howdy, >> >> Problem: multifile validation fails when no files are selected and >> allowEmptyValue is set to true. While validateFile() was implemented >> correctly, validateField() was not. It, for some reason, assumed that when >> no files are selected there would still be a null/empty propert present.. >> >> Solution: See patch against trunk below. >> >> Also, the multifile documentation is confusing. It should be corrected to >> state that, for starters, the element is called multiFile with a capital F >> and that the multipleVariables (and other properties) belong on the<spec> >> element and not on the<field> element. >> >> Have a nice day, >> >> - Bram --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [patch] Fix for multiFile validation bugHi,
It's in the pipe! There will be a maintenance release before the end of the month. Cheers On Thu, Dec 3, 2009 at 10:49 AM, Bram Van Dam <bram.vandam@...> wrote: > Hi again, > > I'm getting the impression that my bugfix has not (yet?) been included in > the latest version -- at least not in the maven plugin, haven't tested the > stand-alone version. > > Are there any plans for a new release any time soon? It's a pretty annoying > bug and I'd really like to be able to use the maven version without having > to do nasty trickery. > > Thanks a bunch, > > - Bram > > On 04/11/09 10:01, Julien Ponge wrote: >> >> Thanks for posting a JIRA issue, I will handle it. >> >> On Tue, Nov 3, 2009 at 9:55 AM, Bram Van Dam<bram.vandam@...> >> wrote: >>> >>> Howdy, >>> >>> Problem: multifile validation fails when no files are selected and >>> allowEmptyValue is set to true. While validateFile() was implemented >>> correctly, validateField() was not. It, for some reason, assumed that >>> when >>> no files are selected there would still be a null/empty propert present.. >>> >>> Solution: See patch against trunk below. >>> >>> Also, the multifile documentation is confusing. It should be corrected to >>> state that, for starters, the element is called multiFile with a capital >>> F >>> and that the multipleVariables (and other properties) belong on the<spec> >>> element and not on the<field> element. >>> >>> Have a nice day, >>> >>> - Bram > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- http://izpack.org/ http://jpz-log.info/ http://julien.ponge.info/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [patch] Fix for multiFile validation bugFixed!
On Thu, Dec 3, 2009 at 7:47 PM, Julien Ponge <julien.ponge@...> wrote: > Hi, > > It's in the pipe! > > There will be a maintenance release before the end of the month. > > Cheers > > On Thu, Dec 3, 2009 at 10:49 AM, Bram Van Dam <bram.vandam@...> wrote: >> Hi again, >> >> I'm getting the impression that my bugfix has not (yet?) been included in >> the latest version -- at least not in the maven plugin, haven't tested the >> stand-alone version. >> >> Are there any plans for a new release any time soon? It's a pretty annoying >> bug and I'd really like to be able to use the maven version without having >> to do nasty trickery. >> >> Thanks a bunch, >> >> - Bram >> >> On 04/11/09 10:01, Julien Ponge wrote: >>> >>> Thanks for posting a JIRA issue, I will handle it. >>> >>> On Tue, Nov 3, 2009 at 9:55 AM, Bram Van Dam<bram.vandam@...> >>> wrote: >>>> >>>> Howdy, >>>> >>>> Problem: multifile validation fails when no files are selected and >>>> allowEmptyValue is set to true. While validateFile() was implemented >>>> correctly, validateField() was not. It, for some reason, assumed that >>>> when >>>> no files are selected there would still be a null/empty propert present.. >>>> >>>> Solution: See patch against trunk below. >>>> >>>> Also, the multifile documentation is confusing. It should be corrected to >>>> state that, for starters, the element is called multiFile with a capital >>>> F >>>> and that the multipleVariables (and other properties) belong on the<spec> >>>> element and not on the<field> element. >>>> >>>> Have a nice day, >>>> >>>> - Bram >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > > > -- > http://izpack.org/ > http://jpz-log.info/ > http://julien.ponge.info/ > -- http://izpack.org/ http://jpz-log.info/ http://julien.ponge.info/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |