Closed javaserverfaces closed 17 years ago
Reported by @rlubke
@rlubke said: Assigned.
@rlubke said: This was resolved as part of the larger managed bean changes checked in on April 22, 2007.
@manfredriem said: Closing issue out
Was assigned to rlubke
This issue was imported from java.net JIRA JAVASERVERFACES-434
Marked as fixed on Sunday, April 22nd 2007, 3:35:03 pm
Consider the following case:
public class BannerBean implements Serializable { private String authDetails = "My Details";
public String getAuthDetails()
{ return authDetails; }
public void setAuthDetails(String authDetails)
{ this.authDetails = authDetails; }
}
Anytime I try to bind the field authDetails to an h:outputText with:
<h:outputText value="#
{banner.authDetails}
"/>
I return the following in my Tomcat log:
javax.faces.el.EvaluationException: javax.faces.FacesException: java.lang.ClassCastException: com.dtn.petro2.petroadmin.common.BannerBean
My backing bean is defined as the following in my faces-config.xml:
In this case, the ManagedBean implemenation would expect the managed bean to be a Map. If the managedbean is not a Map, as above, then we just throw a ClassCastException with no diagnostics to help the developer fix the issue.
We need to go through the managed bean code and improve the error messages.
Environment
Operating System: All Platform: All
Affected Versions
[1.2]