You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org> on 2010/03/15 13:12:27 UTC

[jira] Updated: (WICKET-2780) Containers in forms inside a border is not validated correctly

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

Adriano dos Santos Fernandes updated WICKET-2780:
-------------------------------------------------

    Attachment: bordervalidation.zip

Enter something invalid in the first datefield and submit. It says "error".
Enter something invalid in the second datefield and submit. It says "ok".

> Containers in forms inside a border is not validated correctly
> --------------------------------------------------------------
>
>                 Key: WICKET-2780
>                 URL: https://issues.apache.org/jira/browse/WICKET-2780
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.1
>         Environment: Tested with 1.4.1, but 1.4.7 code looks identical
>            Reporter: Adriano dos Santos Fernandes
>         Attachments: bordervalidation.zip
>
>
> I've a border that have a form and in that form there is a DateField component. DateField is a FormComponentPanel with a embedded DateTextField.
> This code below in Form.java does not validate that component correctly, when an invalid date is entered.
> 		// Borders need special treatment
> 		if (!error[0] && (getParent() instanceof Border))
> 		{
> 			MarkupContainer border = getParent();
> 			Iterator<? extends Component> iter = border.iterator();
> 			while (!error[0] && iter.hasNext())
> 			{
> 				Component child = iter.next();
> 				if ((child != this) && (child instanceof FormComponent))
> 				{
> 					visitor.component(child);
> 				}
> 			}
> 		}
> The problem is that the visitor is not used to go deeper in the hierarchy, so the DateTextField is never reached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.