You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@causeway.apache.org by "Andi Huber (Jira)" <ji...@apache.org> on 2023/02/11 06:32:00 UTC

[jira] [Updated] (CAUSEWAY-3014) Enum typed property value display is incorrect

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

Andi Huber updated CAUSEWAY-3014:
---------------------------------
    Fix Version/s: 2.0.0-RC1
                       (was: 2.0.0-RC2)

> Enum typed property value display is incorrect
> ----------------------------------------------
>
>                 Key: CAUSEWAY-3014
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3014
>             Project: Causeway
>          Issue Type: Question
>          Components: Wicket Viewer
>    Affects Versions: 2.0.0-M7
>            Reporter: Miklós Győrfi
>            Assignee: Andi Huber
>            Priority: Major
>              Labels: TestCaseRequired
>             Fix For: 2.0.0-RC1
>
>
>  
> 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.10#820010)