Description
Reproducing steps:
1. Put below simple page into a Wicket application and get it mounted:
TestPage.java:
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebPage;
@SuppressWarnings("serial")
public class TestPage extends WebPage {
public TestPage() {
add(new AjaxLink<Void>("test") {
@Override
public void onClick(AjaxRequestTarget target) {
}
});
}
}
TestPage.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Page</title>
</head>
<body>
<a wicket:id="test">test</a>
</body>
</html>
2. Access the page in browser via mounted url, the page will display a link.
3. Wait until current session is expired (do not refresh the page or click the link while waiting).
4. Hit the link and below exception will be thrown:
Message: Cannot find behavior with id: 0 on component: [ [Component id = test]]. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful.
5. In wicket 1.5.0, this results in a PageExpiredException which is more comprehensive.
Attachments
Issue Links
- is related to
-
WICKET-4014 Wicket 1.5 Form Post Action and Link Get discard Page Class Information
- Resolved