You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matej Knopp (JIRA)" <ji...@apache.org> on 2007/09/01 23:57:19 UTC
[jira] Resolved: (WICKET-707) Invoking a request listener on a page
returns an Expired Error page
[ https://issues.apache.org/jira/browse/WICKET-707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matej Knopp resolved WICKET-707.
--------------------------------
Resolution: Fixed
> 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
> Assignee: Matej Knopp
> Priority: Minor
> Fix For: 1.3.0-beta4
>
>
> 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.