incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hane <chrish...@gmail.com>
Subject How to ignore Null bean properties
Date Thu, 05 Apr 2007 04:30:00 GMT
I'm converting an app to use Trinidad.  We use nested properties like:

<h:inputText value="#{bo.sale.org.name}" id="nme" readonly="true"/>

When I convert to Trinidad I am using the following:

<tr:inputText label="Name" value="#{bo.sale.org.name}" id="nme"/>

If the org property on the sale is NULL, Trinidad throws the following
exception.  The stock component with myfaces does not throw the
exception - it treats the value as a blank.  Is there any way to have
Trinidad do the same thing without resorting to a bunch of null checks
on the page?

I'm also using facelets in both cases...

Thanks in advance,
Chris....

javax.faces.el.PropertyNotFoundException: /order/sale.xhtml @40,58 value="#{bo.sale.org.name}":
Target Unreachable, 'org' returned null
	at com.sun.facelets.el.LegacyValueBinding.isReadOnly(LegacyValueBinding.java:84)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:236)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.renderAsElement(FormElementRenderer.java:177)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:63)
	at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:297)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:115)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
	at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:701)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:263)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer.encodeChild(PanelGroupLayoutRenderer.java:172)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer._encodeChildren(PanelGroupLayoutRenderer.java:143)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:95)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
	at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:701)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:263)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:280)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelLabelAndMessageRenderer.renderFieldCellContents(PanelLabelAndMessageRenderer.java:105)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer._renderFieldCell(LabelAndMessageRenderer.java:370)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:266)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
	at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:701)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:263)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:745)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer._encodeFormColumns(PanelFormLayoutRenderer.java:671)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:313)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:199)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
	at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:701)
	at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:70)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:258)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:280)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:73)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:137)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:153)
	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:79)
	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
	at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:701)
	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
	at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
	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.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:210)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:167)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:140)
	at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:93)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.itsolut.servlet.LoggingFilter.doFilter(LoggingFilter.java:28)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
	at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
	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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)



Mime
View raw message