We have an entity MyType
:
MyType { String s; getS();}
And we have a JSF converter MyTypeConverter
for this type:
@FacesConverter(forClass=MyType.class)
MyTypeConverter {
public String getAsString() { return ((MyType)o).getS().toUpperCase();}
}
And we have a backing bean MyBean
:
MyBean {
getMyType() { return new MyType("hallo");}
}
And we have a view my.xhtml
:
<h:outputText value="#{myBean.myType}"/>
The above view works fine:
HALLO
When I edit it as follows:
<h:outputText value="(#{myBean.myType})"/>
I expected to see:
(HALLO)
However, the result is:
(org.playground.model.MyType@cb4a479)
How is this caused and how can I solve it?