You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexander (JIRA)" <ji...@apache.org> on 2010/11/15 14:08:13 UTC

[jira] Created: (WICKET-3172) If page is mounted with IndexedHybridUrlCodingStrategy and this page contains form on form submit error occurred.

If page is mounted with IndexedHybridUrlCodingStrategy and this page contains form on form submit error occurred.
-----------------------------------------------------------------------------------------------------------------

                 Key: WICKET-3172
                 URL: https://issues.apache.org/jira/browse/WICKET-3172
             Project: Wicket
          Issue Type: Bug
          Components: wicket
         Environment: Windows XP SP3, Wicket 1.4.12.
            Reporter: Alexander


If page is mounted with IndexedHybridUrlCodingStrategy and this page contains form on form submit error occurred.

Here is quick start application:

Application.java:

import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.target.coding.IndexedHybridUrlCodingStrategy;

public class Application extends WebApplication {

	@Override
	public Class<? extends Page> getHomePage() {
		return Page.class;
	}
	
	@Override
	protected void init() {
		super.init();
		
		mount( new IndexedHybridUrlCodingStrategy( "/root", Page.class, true ) );
	}
	
}


Page.java:

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.Model;

public class Page extends WebPage {

	public Page() {
		super();
		
		Form<Void> form = new Form<Void>( "form" );
		form.add( new TextField<String>( "text", new Model<String>( "Text" ) ) );
		add( form );
	}
	
}

Page.html:

<html>
<body>
<form wicket:id="form">
<input type="text" wicket:id="text"/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>


Stack trace:

org.apache.wicket.WicketRuntimeException: Not all parameters were encoded. Make sure all parameter names are integers in consecutive order starting with zero. Current parameter names are: [wicket:interface]
	at org.apache.wicket.request.target.coding.IndexedHybridUrlCodingStrategy.appendParameters(IndexedHybridUrlCodingStrategy.java:94)
	at org.apache.wicket.request.target.coding.HybridUrlCodingStrategy.encode(HybridUrlCodingStrategy.java:431)
	at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:522)
	at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:254)
	at org.apache.wicket.RequestCycle.encodeUrlFor(RequestCycle.java:811)
	at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:927)
	at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:976)
	at org.apache.wicket.Component.urlFor(Component.java:3425)
	at org.apache.wicket.markup.html.WebPage$PageMapChecker.renderHead(WebPage.java:158)
	at org.apache.wicket.Component.renderHead(Component.java:2768)
	at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:218)
	at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:137)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
	at org.apache.wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:80)
	at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
	at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
	at org.apache.wicket.Page.onRender(Page.java:1575)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.Page.renderPage(Page.java:913)
	at org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:186)
	at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)
	at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
	at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
	at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:317)

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


[jira] Resolved: (WICKET-3172) If page is mounted with IndexedHybridUrlCodingStrategy and this page contains form on form submit error occurred.

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

Igor Vaynberg resolved WICKET-3172.
-----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Igor Vaynberg

could not reproduce with latest snapshot. please attach a complete quickstart that reproduces this.

> If page is mounted with IndexedHybridUrlCodingStrategy and this page contains form on form submit error occurred.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3172
>                 URL: https://issues.apache.org/jira/browse/WICKET-3172
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>         Environment: Windows XP SP3, Wicket 1.4.12.
>            Reporter: Alexander
>            Assignee: Igor Vaynberg
>
> If page is mounted with IndexedHybridUrlCodingStrategy and this page contains form on form submit error occurred.
> Here is quick start application:
> Application.java:
> import org.apache.wicket.protocol.http.WebApplication;
> import org.apache.wicket.request.target.coding.IndexedHybridUrlCodingStrategy;
> public class Application extends WebApplication {
> 	@Override
> 	public Class<? extends Page> getHomePage() {
> 		return Page.class;
> 	}
> 	
> 	@Override
> 	protected void init() {
> 		super.init();
> 		
> 		mount( new IndexedHybridUrlCodingStrategy( "/root", Page.class, true ) );
> 	}
> 	
> }
> Page.java:
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.form.Form;
> import org.apache.wicket.markup.html.form.TextField;
> import org.apache.wicket.model.Model;
> public class Page extends WebPage {
> 	public Page() {
> 		super();
> 		
> 		Form<Void> form = new Form<Void>( "form" );
> 		form.add( new TextField<String>( "text", new Model<String>( "Text" ) ) );
> 		add( form );
> 	}
> 	
> }
> Page.html:
> <html>
> <body>
> <form wicket:id="form">
> <input type="text" wicket:id="text"/>
> <input type="submit" value="Submit"/>
> </form>
> </body>
> </html>
> Stack trace:
> org.apache.wicket.WicketRuntimeException: Not all parameters were encoded. Make sure all parameter names are integers in consecutive order starting with zero. Current parameter names are: [wicket:interface]
> 	at org.apache.wicket.request.target.coding.IndexedHybridUrlCodingStrategy.appendParameters(IndexedHybridUrlCodingStrategy.java:94)
> 	at org.apache.wicket.request.target.coding.HybridUrlCodingStrategy.encode(HybridUrlCodingStrategy.java:431)
> 	at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:522)
> 	at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:254)
> 	at org.apache.wicket.RequestCycle.encodeUrlFor(RequestCycle.java:811)
> 	at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:927)
> 	at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:976)
> 	at org.apache.wicket.Component.urlFor(Component.java:3425)
> 	at org.apache.wicket.markup.html.WebPage$PageMapChecker.renderHead(WebPage.java:158)
> 	at org.apache.wicket.Component.renderHead(Component.java:2768)
> 	at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:218)
> 	at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:137)
> 	at org.apache.wicket.Component.renderComponent(Component.java:2686)
> 	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> 	at org.apache.wicket.Component.render(Component.java:2517)
> 	at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
> 	at org.apache.wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:80)
> 	at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
> 	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
> 	at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
> 	at org.apache.wicket.Page.onRender(Page.java:1575)
> 	at org.apache.wicket.Component.render(Component.java:2517)
> 	at org.apache.wicket.Page.renderPage(Page.java:913)
> 	at org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:186)
> 	at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)
> 	at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
> 	at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
> 	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
> 	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
> 	at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> 	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
> 	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:317)

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