Miklós Győrfi created ISIS-3014:
-----------------------------------
Summary: 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
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)