So here is the error message�
org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException: Can't set managed bean property: 'Source'.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
I am trying to use a database to check to see if a user should be able to �see� part of a page so on the
jsp I do something like this�.
Rendered=�#{UserBean.Source}��.blah,blah,blah
config file is here�.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config >
<managed-bean>
<managed-bean-name>UserBean</managed-bean-name>
<managed-bean-class>com.Test.bean.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<description>Field for the Source</description>
<property-name>Source</property-name>
<property-class>boolean</property-class>
<value></value>
</managed-property>
There is no real setting done of Source and the get method just calls the getRole method and passes in the role you are checking. getRole checks the database for a value and assigns a Boolean to pass back�
Here is the code�.
public final class UserBean extends Object {
public UserBean(){
public boolean getSource() {
return this.getRole("SOURCE");
}
public void setSource(boolean source) {
Source = source;
}
...
So why is there a problem with the set? I�ve done something that I swear would be identical on the same page in another area (another role all together) and it works fine.