Upload component and INVALID_NAME_PATTERN
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
Upload component and INVALID_NAME_PATTERN  XML
Forum Index -> Components
Author Message
Baleyba

Joined: 16/11/2006 00:00:00
Messages: 110
Offline


Hi,

I would like to define a name pattern for input files.
For example I would like to allow only ".xls" files.

I didn't find any example to set up this feature on this component.

What format should I use into INVALID_NAME_PATTERN parameter to define my pattern?

thanks for your help

regards,

Chris

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
eashwaranp

Joined: 12/02/2007 00:00:00
Messages: 135
Offline


Have you tried using fileNamePattern attribute of inputFile (http://www.icefaces.org/docs/v1_7_0/tld/index.html? I think it takes a regular expression as value. The link above uses example of allowing only *.pdf files. So, in your case this could be ".+\.xls".

Regards,
Eashwaran.
Baleyba

Joined: 16/11/2006 00:00:00
Messages: 110
Offline


Hi eashwaranp,

Thanks a lot for your help and this information.
It perfectly works ;)

I just added a "\". =>".+\\.xls"


thanks

regards,
Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team