1/25/2011

Little error in ICEFaces TLD description for inputFile (fileNamePattern)

Regarding the fileNamePattern of the ICEFaces inputFile component which is described in the official Tag description here: http://www.icefaces.org/docs/v1_8_2/tld/ice/inputFile.html:


This is the correct call to identify files with an incorrect file type in the backend:


if (inputFile.getFileInfo().getStatus() == InputFile.INVALID_NAME_PATTERN) {...
}


I don´t know why they still show a deprecated method call and an incorrect   constant ...




Update:


If you are looking for a case insensitive fileNamePattern working with the ICEFaces inputFile component, take this one:


<ice:inputFile fileNamePattern=".+\.((?i)png|(?i)jpg|(?i)jpeg|(?i)gif) "actionListener="#{...}"/>



If you liked this tutorial it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.