[ https://issues.apache.org/jira/browse/WICKET-707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
paolo di tommaso updated WICKET-707: ------------------------------------ Description: The Page object being a Component should support the Wicket request listener mechanism. But invoking a request listener on page defined listener object it results in a "Page Expired" error page. To reproduce it try the following code: public interface IHelloListener extends IRequestListener { public static final RequestListenerInterface INTERFACE = new RequestListenerInterface(IHelloListener.class); void onHello(); } public class HelloWorld extends WebPage implements IHelloListener { public HelloWorld() { add(new Label("message", "Hello World!")); WebMarkupContainer link = new WebMarkupContainer("link"); link.add(new SimpleAttributeModifier("href", RequestCycle.get().urlFor(this, IHelloListener.INTERFACE))); add(link); } public void onHello() { RequestCycle.get().setRequestTarget(new IRequestTarget() { public void detach(RequestCycle requestCycle) { } public void respond(RequestCycle requestCycle) { requestCycle.getResponse().write("<html><body>HELLO!</body></html>"); } public Object getLock(RequestCycle requestCycle) { return null; } }); } } was: The Page object being a Component should support the Wicket request listener mechanism. But invoking a request listener on page defined listener object it results in a "Page Expired" error page. To reproduce it try the following code: public interface IHelloListener extends IRequestListener { public static final RequestListenerInterface INTERFACE = new RequestListenerInterface(IHelloListener.class); void onHello(); } public class HelloWorld extends WebPage implements IHelloListener { public HelloWorld() { add(new Label("message", "Hello World!")); WebMarkupContainer link = new WebMarkupContainer("link"); link.add(new SimpleAttributeModifier("href", RequestCycle.get().urlFor(this, IHelloListener.INTERFACE))); add(link); } public void onHello() { RequestCycle.get().setRequestTarget(new IRequestTarget() { public void detach(RequestCycle requestCycle) { } public void respond(RequestCycle requestCycle) { requestCycle.getResponse().write("<html><body>HELLO!</body></html>"); } public Object getLock(RequestCycle requestCycle) { return null; } }); } } > Invoking a request listener on a page returns an Expired Error page > ------------------------------------------------------------------- > > Key: WICKET-707 > URL: https://issues.apache.org/jira/browse/WICKET-707 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.2.6 > Reporter: paolo di tommaso > Priority: Minor > > The Page object being a Component should support the Wicket request listener > mechanism. > But invoking a request listener on page defined listener object it results in > a "Page Expired" error page. > To reproduce it try the following code: > public interface IHelloListener extends IRequestListener > { > public static final RequestListenerInterface INTERFACE = new > RequestListenerInterface(IHelloListener.class); > void onHello(); > } > public class HelloWorld extends WebPage implements IHelloListener > { > public HelloWorld() > { > add(new Label("message", "Hello World!")); > WebMarkupContainer link = new WebMarkupContainer("link"); > link.add(new SimpleAttributeModifier("href", > RequestCycle.get().urlFor(this, IHelloListener.INTERFACE))); > add(link); > } > public void onHello() > { > RequestCycle.get().setRequestTarget(new IRequestTarget() > { > public void detach(RequestCycle requestCycle) > { > } > public void respond(RequestCycle requestCycle) > { > > requestCycle.getResponse().write("<html><body>HELLO!</body></html>"); > } > > public Object getLock(RequestCycle requestCycle) { > return null; > } > }); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.