You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2017/04/13 15:28:41 UTC

[jira] [Commented] (WICKET-6357) Lambda in Link stop working

    [ https://issues.apache.org/jira/browse/WICKET-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967739#comment-15967739 ] 

Martin Grigorov commented on WICKET-6357:
-----------------------------------------

I liked the lambda factories and I miss them, but in your particular example you better use BookmarkablePageLink instead. It will save you one HTTP redirect.

> Lambda in Link stop working
> ---------------------------
>
>                 Key: WICKET-6357
>                 URL: https://issues.apache.org/jira/browse/WICKET-6357
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 8.0.0-M5
>            Reporter: Vít Kotačka
>
> Following code is working in Wicket *8.0.0-M4*, but can't be compiled in version *8.0.0-M5*:
> {code:java}
> add(Link.onClick("homePageLink", link -> setResponsePage(getApplication().getHomePage())));
> {code}
> Compilation (via _Gradle_) gives following input:
> {code}
> /home/guido/projects/Norway-ePass/RegiS/src/main/java/com/gemalto/ics/norway/regis/wicket/hello/WesPocPage.java:13: error: method onClick in class Link<T> cannot be applied to given types;
>                 add(Link.onClick("homePageLink", link -> setResponsePage(getApplication().getHomePage())));
>                         ^
>   required: no arguments
>   found: String,(link)->se[...]ge())
>   reason: actual and formal argument lists differ in length
>   where T is a type-variable:
>     T extends Object declared in class Link
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)