myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mick Knutson" <mickknut...@gmail.com>
Subject question about BackingBeans and POJO's
Date Tue, 31 Oct 2006 23:37:33 GMT
I am looking for a best practices for creating BackingBeans with sub
objects.

Such as, I want a UserBackingBean that has a User associated with it.


But I have done that, but use:

                        <h:inputText id="firstName"
                                     value="#{UserBackingBean.user.firstName
}">
                            <f:validateLength minimum="2"
                                              maximum="25" />
                        </h:inputText>


But this gives me this error:



15:22:49,656 ERROR [RendererUtils] Property not found - called by component
: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /views/
istration/registration.jsp][Class: javax.faces.component.html.HtmlForm,Id:
_idJsp0][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp1]}
javax.faces.el.PropertyNotFoundException: Bean: java.lang.String, property:
firstName
        at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(
PropertyResolverImpl.java:483)
        at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(
PropertyResolverImpl.java:454)
        at org.apache.myfaces.el.PropertyResolverImpl.getProperty(
PropertyResolverImpl.java:417)
        at org.apache.myfaces.el.PropertyResolverImpl.getValue(
PropertyResolverImpl.java:82)
        at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(
ELParserHelper.java:532)
        at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java
:145)
        at org.apache.myfaces.el.ValueBindingImpl.getValue(
ValueBindingImpl.java:383)
        at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
        at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(
RendererUtils.java:217)
        at
org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput
(HtmlTextRendererBase.java:69)
        at
org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd
(HtmlTextRendererBase.java:57)
        at javax.faces.component.UIComponentBase.encodeEnd(
UIComponentBase.java:536)
        at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java
:495)
        at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java
:363)
        at
org.apache.jsp.views.registration.registration_jsp._jspx_meth_h_outputText_0
(registration_jsp.java:273)
        at
org.apache.jsp.views.registration.registration_jsp._jspx_meth_h_form_0
(registration_jsp.java:211)
        at
org.apache.jsp.views.registration.registration_jsp._jspx_meth_f_view_0
(registration_jsp.java:151)
        at org.apache.jsp.views.registration.registration_jsp._jspService
(registration_jsp.java:109)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java
:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:332)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(
JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:463)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:398)
        at org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:301)
        at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(
ServletExternalContextImpl.java:416)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(
JspViewHandlerImpl.java:234)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(
LifecycleImpl.java:384)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
ExtensionsFilter.java:144)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
SecurityAssociationValve.java:175)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(
JaccContextValve.java:74)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(
MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
15:22:49,671 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.faces.el.PropertyNotFoundException: Bean: java.lang.String, property:
firstName
        at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(
PropertyResolverImpl.java:483)
        at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(
PropertyResolverImpl.java:454)




-- 

Thanks

DJ MICK
http://www.djmick.com
http://www.myspace.com/mickknutson

Mime
View raw message