eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
161 stars 110 forks source link

Improve managed property error messages #438

Closed ren-zhijun-oracle closed 17 years ago

ren-zhijun-oracle commented 18 years ago

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:

Banner banner com.dtn.petro2.petroadmin.common.BannerBean session authDetails My Details

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]

ren-zhijun-oracle commented 6 years ago
ren-zhijun-oracle commented 18 years ago

@javaserverfaces Commented Reported by @rlubke

ren-zhijun-oracle commented 17 years ago

@javaserverfaces Commented @rlubke said: Assigned.

ren-zhijun-oracle commented 17 years ago

@javaserverfaces Commented @rlubke said: This was resolved as part of the larger managed bean changes checked in on April 22, 2007.

ren-zhijun-oracle commented 12 years ago

@javaserverfaces Commented @manfredriem said: Closing issue out

ren-zhijun-oracle commented 18 years ago

@javaserverfaces Commented Was assigned to rlubke

ren-zhijun-oracle commented 7 years ago

@javaserverfaces Commented This issue was imported from java.net JIRA JAVASERVERFACES-434

ren-zhijun-oracle commented 17 years ago

@javaserverfaces Commented Marked as fixed on Sunday, April 22nd 2007, 3:35:03 pm