You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (Jira)" <ji...@apache.org> on 2019/09/17 11:58:00 UTC

[jira] [Resolved] (WICKET-6700) AjaxEditableLabel fails for any other type than String

     [ https://issues.apache.org/jira/browse/WICKET-6700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Meier resolved WICKET-6700.
--------------------------------
      Assignee: Sven Meier
    Resolution: Not A Problem

LambdaModel does not provide type information (IObjectClassAwareModel), so you have to specify the type explicitely:
{code:java}
label.setType(Integer.class);{code}

> AjaxEditableLabel fails for any other type than String
> ------------------------------------------------------
>
>                 Key: WICKET-6700
>                 URL: https://issues.apache.org/jira/browse/WICKET-6700
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 8.6.1
>         Environment: Windows 10, Java 8u192
>            Reporter: Christoph Groß
>            Assignee: Sven Meier
>            Priority: Major
>         Attachments: AjaxEditLabel-LambdaModel.zip
>
>
> Hello,
>  
> i like to use the AjaxEditableLabel to handle an Integer. OnSubmit it fails, because String is not castable to Integer when setObject is called.
> When using a simple IModel<Integer> model = new Model<>(123); it works well. But with LambdaModel (see provided sample app) or new IModel<Integer>() \{ ... } it doesn't work.
>  
> The provided integer converter is being ignored.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)