You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Andi Huber (Jira)" <ji...@apache.org> on 2022/04/22 13:37:00 UTC
[jira] [Commented] (ISIS-3014) Enum typed property value display is incorrect
[ https://issues.apache.org/jira/browse/ISIS-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17526433#comment-17526433 ]
Andi Huber commented on ISIS-3014:
----------------------------------
ValueChoicesSelect2PanelFactory has been reworked since 2.0.0-M7. Have you tested against current 'master'?
> Enum typed property value display is incorrect
> ----------------------------------------------
>
> Key: ISIS-3014
> URL: https://issues.apache.org/jira/browse/ISIS-3014
> Project: Isis
> Issue Type: Bug
> Components: Wicket Viewer
> Affects Versions: 2.0.0-M7
> Reporter: Miklós Győrfi
> Priority: Major
>
>
> In Isis enum values can have title (@Title) property to display user friendly.
> For example:
>
>
> {code:java}
> public enum PublicationMode {
> jupyter_notebook("Jupyter notebook"),
> jupyter_notebook_pdf_email("Jupyter notebook PDF fájl levélhez"),
> site_json_data("Hely JSON adata");
> private final String title;
> PublicationMode(String title) {
> this.title = title;
> }
> @Title
> public String getTitle() {
> return title;
> }
> } {code}
> It works very well everywhere in Isis, except:
>
> Wicket viewer uses StringPanel to display it (according to ValueChoicesSelect2PanelFactory).
> * It would be better to display it as ValueFallbackPanel instead of StringPanel. in view mode, ValueChoicesSelect2Panel works well in edit mode.
> * ValueFallbackPanel should display ManagedObjects.titleOf(objectAdapter), overriding newTextFieldValueModel and return an overridden kind of TextFieldValueModel<String> for example (which is not possible now, because it is a final method). Other solution to create a good converter and facet.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)