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

Ivan Vasilev updated WICKET-3407:
---------------------------------

    Attachment: quickstart.rar

> Switching from HttsRequired page to http page with forms in both pages
> ----------------------------------------------------------------------
>
>                 Key: WICKET-3407
>                 URL: https://issues.apache.org/jira/browse/WICKET-3407
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>         Environment: 1.5-SNAPSHOT
>            Reporter: Ivan Vasilev
>         Attachments: quickstart.rar
>
>
> There are two pages TestPage (homepage, HttsRequired) and TestPage2 (http 
> only). 
> TestPage2 contains empty form:
>       add(new Form<Void>("form"));
> TestPage contains a form with a single submit button:
> Form<String> form = new Form<String>("form", new Model<String>()) {
>         private static final long serialVersionUID = 7401870238638554392L;
>       @Override
>       protected void onSubmit() {
>               setResponsePage(TestPage2.class);
>       }
> };
> add(form);
> When the form is submitted a NullPointerException is throw during the render 
> of TestPage2:
> java.lang.NullPointerException
>      at org.apache.wicket.markup.html.form.Form.onComponentTag(Form.java:1400)
>      at 
> org.apache.wicket.Component.internalRenderComponent(Component.java:2473)
>      at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
>      at org.apache.wicket.Component.internalRender(Component.java:2366)
> ..................
> This exception is thrown in TestPage2's form in the method onComponentTag on 
> line 1400:
>      String url = getActionUrl().toString();
> because getActionUrl() returns null. Debugging getActionUrl leads to 
> RequestCycle->mapUrlFor and there requestMapper.mapHandler(handler); fails to 
> map the handler. The "handler" variable is of type 
> SwitchProtocolRequestHandler.
> This can be reproduced with the attached quickstart. It's using the default 
> ports (80 and 443) and a self-signed certificate (hope there are no problems 
> with it).

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

Reply via email to