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 2011/09/21 10:23:08 UTC

[jira] [Assigned] (WICKET-4072) Form Input example fails when changing the language

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

Martin Grigorov reassigned WICKET-4072:
---------------------------------------

    Assignee: Igor Vaynberg

The following patch fixes the problem but the comment in Form.dispatchEvent() makes me uncertain. It says that the current Url should be 'wicket/page?...' but actually it is just "?...".


@@ -881,8 +881,10 @@
 	public void resolveRelative(final Url relative)
 	{
 		// strip the first non-folder segment
-		getSegments().remove(getSegments().size() - 1);
-
+		if (getSegments().size() > 0)
+		{
+			getSegments().remove(getSegments().size() - 1);
+		}


> Form Input example fails when changing the language
> ---------------------------------------------------
>
>                 Key: WICKET-4072
>                 URL: https://issues.apache.org/jira/browse/WICKET-4072
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-examples
>    Affects Versions: 1.5.1
>            Reporter: Martin Grigorov
>            Assignee: Igor Vaynberg
>
> Trying to change the language of http://localhost:8080/forminput example fails with:
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> 	at java.util.ArrayList.remove(ArrayList.java:390)
> 	at org.apache.wicket.request.Url.resolveRelative(Url.java:884)
> 	at org.apache.wicket.markup.html.form.Form.dispatchEvent(Form.java:1028)
> 	at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:699)
> 	at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:670)
> 	... 37 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira