You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/07/31 17:11:35 UTC

[jira] [Resolved] (WICKET-4685) ValidationError addKey fails with error abort

     [ https://issues.apache.org/jira/browse/WICKET-4685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4685.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.0
    
> ValidationError addKey fails with error abort
> ---------------------------------------------
>
>                 Key: WICKET-4685
>                 URL: https://issues.apache.org/jira/browse/WICKET-4685
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta3
>         Environment: wicket 6.0.0. beta3
> Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
> debian 64 bit
>            Reporter: Birger Hafenwasser
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>
> // own code
> 	TextField<String> field = new TextField<String>( "fldItem", getPropertyModel() );
> 	field.add( new PatternValidator( pattern ) {
> 		protected ValidationError decorate( ValidationError error, IValidatable<String> validatable ) {
> 			error.setMessage( "Input is not matching pattern=" + pattern );
> 			return error;
> 		}
> 	} );
> // this will fail in the class ValidationError at
> 	public ValidationError addKey(IValidator<?> validator)
> 	{
> 		Args.notNull(validator, "validator");
> 		addKey(validator.getClass().getSimpleName());      // <-- fail, because getSimpleName is empty
> 		return this;
> 	}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira