javax.faces.FacesException: Cannot get value for expression
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   fdeveloper_ldeveloper
Posted On:   Thursday, October 25, 2007 09:01 AM

hi all, I am new in jsf. I don't have much idea about jsf. I am populating values in jsp page with HTMLSelectListBox. this is my jsp page. index.jsp following is the checkonclick managed bean public class checkOnClick { UISelectItems names ; List names1 = new ArrayList(); public checkOnClick(){ names = new UISelectItems(); names1.add("a1"); names1.add("b1"); names1.add("c1"); names.setValue(names1); } public UISelectItems getNames() { return names; } public void setNames(UISelectItems names) { this.names = names; } } following is    More>>

hi all,
I am new in jsf. I don't have much idea about jsf. I am populating values in jsp page with HTMLSelectListBox. this is my jsp page.

index.jsp




following is the checkonclick managed bean

public class checkOnClick {
UISelectItems names ;
List names1 = new ArrayList();
public checkOnClick(){
names = new UISelectItems();
names1.add("a1");
names1.add("b1");
names1.add("c1");
names.setValue(names1);
}
public UISelectItems getNames() {
return names;
}
public void setNames(UISelectItems names) {
this.names = names;
}

}

following is my faces-bean.xml



checkonclick

checkOnClick

session



when i run the application it gives me the following error. Please help me in resolving this error. thanx in advance.


exception

javax.servlet.ServletException: Cannot get value for expression '#{checkonclick.allnames}'
javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)


root cause

javax.faces.FacesException: Cannot get value for expression '#{checkonclick.allnames}'
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)

   <<Less
About | Sitemap | Contact