Closed orangejuice2508 closed 2 years ago
Do you know why "onclick" does not work ? How is it related to Wicket-Spring-Boot ?
With Wicket 9.0.0 and Wicket-Spring-Boot-Starter 3.0.4 the following implementation works flawlessly, i.e. the page parameters are manipulated correctly:
public class TestLink extends Link<Void> {
private PageParameters para;
public TestLink(String id, PageParameters para) {
super(id);
this.para= para;
}
@Override
public void onClick() {
para.add("test", "true");
setResponsePage(getPage().getClass(), para);
}
<button wicket:id="test" class="btn">Test</button>
However, when upgrading to Wicket 9.1.0 or later, the "onclick" method fails without an exception, i.e. the page parameters are not manipulated. According to the changelog (https://github.com/apache/wicket/blob/master/CHANGELOG-9.x) nothing was changed with respect to the implementation. So, the issue is likely due to Wicket-Spring-Boot-Starter, which was not updated after the release of Wicket 9.0.0.
Can reproduce this in a mini application ? Also please check the browser dev tools > Network tab. Is there a request when you click the link ?
Hello,
our Wicket web application is based on Spring Boot 2.4.4, which works flawlessy with Wicket-Spring-Boot-Starter 3.0.4 and Wicket 9.0.0. However, due to the bug WICKET-6845 (https://issues.apache.org/jira/browse/WICKET-6845?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=17218188#comment-17218188) we have to upgrade to Wicket 9.2.0 (minimum), which is incompatible with the current version of this library. For example, "onclick" on links does not work properly anymore.
Is an update to Wicket 9.2.0 (or later) planned?