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

Andi Huber updated CAUSEWAY-3014:
---------------------------------
    Summary: Enum @Title not honored  (was: Enum typed property value display 
is incorrect)

> Enum @Title not honored
> -----------------------
>
>                 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
>             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)

Reply via email to