You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Medina, Hiram Alberto" <hi...@hp.com> on 2013/09/11 23:29:06 UTC

Get help for Apache Wicket users list

Hi wicket team!

I want to report a problem regarding the UrlValidator, I'm trying to use this to validate some URL, but I require to validate Absolute Paths too on this kind of fields. When I use the UrlValidator some of his methods, for example the UrlValidator method isValid(String value) is declared like final  by that I cannot modify the functionality and add another validations  when I have absolute paths on this kind of fields. Do you know if it possible to change this library and overwrite this method to add another validations? Or, on a next version from the current 1.2.6 it´s going to have some changes to make it possible?
[cid:image002.png@01CEAE4D.584254E0]

Regards

Hiram Medina
HP Java senior Developer

Re: Get help for Apache Wicket users list

Posted by Gabriel Landon <gl...@piti.pf>.
Hi,

isValid is final, but you can overrides onValidate

	/**
	 * @see AbstractValidator#onValidate(IValidatable)
	 */
	@Override
	protected void onValidate(IValidatable<String> validatable)
	{
		String url = validatable.getValue();
		if (url != null && !isValid(url))
		{
			error(validatable);
		}
	}

By the way current release is 6.10.0 not 1.2.6! 
1.2 branch is not supported anymore..

Regards,

Gabriel.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Get-help-for-Apache-Wicket-users-list-tp4661294p4661295.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org