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/12 18:12:27 UTC

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

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


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.


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

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2780.
-----------------------------------

    Resolution: Fixed

tried with 1.4.10, when i enter 123456 in the second field i get: 

* '123456' is not a valid Date. 
* error 


> 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, 1.4.7
>         Environment: Tested with 1.4.1, but 1.4.7 code looks identical
>            Reporter: Adriano dos Santos Fernandes
>            Assignee: Juergen Donnerstag
>         Attachments: bordervalidation.zip, bordervalidation2.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.


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

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844835#action_12844835 ] 

Juergen Donnerstag commented on WICKET-2780:
--------------------------------------------

please provide a testcase or quickstart. Thanks.

> 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
>
> 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.


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

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848371#action_12848371 ] 

Juergen Donnerstag commented on WICKET-2780:
--------------------------------------------

I've tested against 1.4.7 and it works for me.

> 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
>            Assignee: Juergen Donnerstag
>         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.


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

Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848368#action_12848368 ] 

Juergen Donnerstag commented on WICKET-2780:
--------------------------------------------

I've tested it against the latest 1.4 release (1.4.7) and it works for me.

> 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
>            Assignee: Juergen Donnerstag
>         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.


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

Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
     [ 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: bordervalidation2.zip

Juergen, I insist the problem persist. I'm using 1.4.7.

Now is the test case with the getBodyContainer().

When you enter 123456 in the second field 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
>            Assignee: Juergen Donnerstag
>         Attachments: bordervalidation.zip, bordervalidation2.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.


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

Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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


I'm reopening this in the hope it's reviewed, as the proposed solution didn't worked even in 1.4.7.

> 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, 1.4.7
>         Environment: Tested with 1.4.1, but 1.4.7 code looks identical
>            Reporter: Adriano dos Santos Fernandes
>            Assignee: Juergen Donnerstag
>         Attachments: bordervalidation.zip, bordervalidation2.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.


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

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-2780.
----------------------------------------

    Resolution: Invalid
      Assignee: Juergen Donnerstag

you need to add <code>form.add(getBodyContainer());</code> to your myborder.java class. You need to tell Wicket that the body needs to be added to the form and not the border. 



> 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
>            Assignee: Juergen Donnerstag
>         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.


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

Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Affects Version/s: 1.4.7

> 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, 1.4.7
>         Environment: Tested with 1.4.1, but 1.4.7 code looks identical
>            Reporter: Adriano dos Santos Fernandes
>            Assignee: Juergen Donnerstag
>         Attachments: bordervalidation.zip, bordervalidation2.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.


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

Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848191#action_12848191 ] 

Adriano dos Santos Fernandes commented on WICKET-2780:
------------------------------------------------------

Juergen:

    public MyBorder(String id) {
    	super(id);

        Form<Void> form = new Form<Void>("form");
        form.add(getBodyContainer());     // ADDED
        add(form);

Does not solve the test case problem nor my real case problem.

> 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
>            Assignee: Juergen Donnerstag
>         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.