[richfaces-issues] [JBoss JIRA] Updated: (RF-5177) fileUpload: validator attribute doesn't work.

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Tue Oct 19 08:06:57 EDT 2010


     [ https://jira.jboss.org/browse/RF-5177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-5177:
-------------------------------

    Assignee: Konstantin Mishin  (was: Andrey Markhel)


> fileUpload: validator attribute doesn't work.
> ---------------------------------------------
>
>                 Key: RF-5177
>                 URL: https://jira.jboss.org/browse/RF-5177
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-input
>    Affects Versions: 3.3.0
>         Environment: IE6, IE7, FF 3.1.3, Safari 3.1, Opera 9.62(3.3.0.BETA1)
>            Reporter: Mikhail Vitenkov
>            Assignee: Konstantin Mishin
>             Fix For: 4.0.0.Milestone4
>
>
> #1. Create class that implements Validator class.
> #2. Override validate method, like this:
> public void validate(FacesContext context, UIComponent component,
> 			Object value) throws ValidatorException {
> 		File f = (File)value;		
> 		if(f.getName().toString().contains("emo")){
> 			throw new ValidatorException(new FacesMessage("Test validator: no 'emo' should present in file name!"));
> 		}		
> 	}
> #3. Pass method from previous step to "validator" component's attribute: validator="#{fileUpload.validate}".
> #4. Navigate to page.
> #5. Add & upload any file with 'emo' substring.
> Actual behavior:
> validate method wasn't called.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list