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/05/11 14:46:04 UTC
[jira] [Commented] (WICKET-6370) Add default converter for Optional
[ https://issues.apache.org/jira/browse/WICKET-6370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006553#comment-16006553 ]
Martin Grigorov commented on WICKET-6370:
-----------------------------------------
Do you have an idea how to implement it ?
Because as I said in WICKET-6200 due to the type erasure it is hard (impossible ?!) to get the type of the value inside of Optional.
The problem is:
1) the browser sends String
2) Wicket sees that the type is java.util.Optional
3) how to find what is the type of the object inside Optional? Is it a String, or an Integer, or Date, or anything else ?!
> Add default converter for Optional
> ----------------------------------
>
> Key: WICKET-6370
> URL: https://issues.apache.org/jira/browse/WICKET-6370
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 8.0.0-M5
> Reporter: Jaroslaw
>
> It would be great to have default converter for Optional. Using Optional in PropertyModel and CompoundPropertyModel would be much cleaner than null checks later in application.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)