incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: label error
Date Mon, 19 Mar 2007 21:10:44 GMT
JSF 1.1 required a label for SelectItem (unless you created it using a trick).
JSF 1.2 does not require a label.

It was a deficiency in the JSF 1.1 spec, but it's not inconsistent.
Both work as advertised.

On 3/19/07, Brian Smith <unobriani@gmail.com> wrote:
> Thanks Mike, that seemed to fix it.  I was not using a label with
> s:selectItems under a f:selectOneMenu using JSF 1.2 RI with no error.  I
> guess MyFaces may be part of the inconsistency.
>
> Thanks again!
>
>
>
> On 3/19/07, Mike Kienenberger <mkienenb@gmail.com> wrote:
> >
> > I don't know about the Seam selectItems tag, but the tomahawk one
> > looks similar, except that you have to specify a label and a value.
> >
> >         <t:selectItems value="#{selectItemsBean.carList}" var="Car"
> > itemLabel="#{Car.type}" itemValue="#{Car.color}" />
> >
> > I haven't looked at the source, but I'd guess that an NPE on the
> > following line is due to a null label value.    Maybe you need to
> > somehow specify the individual labels in your Seam selectItems tag.
> >
> > javax.faces.model.SelectItem.<init>(SelectItem.java:70)
> >
> >
> > On 3/19/07, Brian Smith <unobriani@gmail.com> wrote:
> > > I am working to integrate Trinidad and JBoss Seam (Trinidad-Incubating,
> > > Facelets 1.1.12, JBoss Seam 1.2, MyFaces)
> > >
> > > I keep getting a weird error that I am not sure if its a Trinidad or
> > Seam
> > > problem
> > >
> > > Here is the relevant page
> > >
> > >         <tr:panelFormLayout maxColumns="2">
> > >              ...
> > >             <tr:selectOneChoice id="streetDirection_id"
> > >                 label="#{msgs['AddressLookup.streetDirection']}"
> > >                 value="#{addressListing.streetDirection}">
> > >                 <s:selectItems value="#{streetDirections}" var="dir"
> > > noSelectionLabel="(None)"/>
> > >                 <!--<f:selectItem itemLabel="Test Label"
> > > itemValue="Test"/>-->
> > >             </tr:selectOneChoice>
> > >             ...
> > >         </tr:panelFormLayout>
> > >
> > > If I comment out the s:selectItems (Seam's selectItems component) and
> > put in
> > > a static f:selectItem, all is well.
> > >
> > > I'm not really sure where to start on this one.
> > >
> > > Thanks,
> > > -Brian
> > >
> > > ps, Here's the stack trace.
> > >
> > > 2007-03-19 15:05:58,333 ERROR [STDERR] Mar 19, 2007 3:05:58 PM
> > > com.sun.facelets.FaceletViewHandler handleRenderException
> > > SEVERE: Error Rendering View[/AddressLookup.xhtml]
> > > java.lang.NullPointerException: label
> > >     at javax.faces.model.SelectItem.<init>(SelectItem.java:70)
> > >     at org.jboss.seam.ui.UISelectItems.asSelectItems(UISelectItems.java
> > :239)
> > >     at org.jboss.seam.ui.UISelectItems.getValue(UISelectItems.java:190)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.renderkit.uix.SelectItemSupport.addSelectItems
> > > (SelectItemSupport.java:273)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.renderkit.uix.SelectItemSupport.getSelectItems
> > > (SelectItemSupport.java:93)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement
> > > (SimpleSelectOneRenderer.java:258)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll
> > > (FormElementRenderer.java:69)
> > >     at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(
> > > CoreRenderer.java:297)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents
> > > (InputLabelAndMessageRenderer.java:142)
> > >     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.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll
> > > (InputLabelAndMessageRenderer.java:120)
> > >     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
> > > CoreRenderer.java:184)
> > >     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> > > UIXComponentBase.java:704)
> > >     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:704)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent
> > > (UIComponentUINode.java:336)
> > >     at
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(
> > > UIComponentUINode.java:278)
> > >     at
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(
> > > UIComponentUINode.java:255)
> > >     at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(
> > > BaseRenderer.java:424)
> > >     at
> > > org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(
> > > BaseRenderer.java:342)
> > >     at
> > > org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(
> > > BaseRenderer.java:234)
> > >     at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent
> > (
> > > BaseRenderer.java:141)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PanelTabbedRenderer.renderContent
> > > (PanelTabbedRenderer.java:111)
> > >     at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(
> > > BaseRenderer.java:92)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render
> > > (XhtmlLafRenderer.java:83)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.renderInternal
> > > (UIXComponentUINode.java:191)
> > >     at
> > > org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase.encodeEnd(
> > > UINodeRendererBase.java:69)
> > >     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> > > UIXComponentBase.java:704)
> > >     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.delegateRenderer(
> > > CoreRenderer.java:297)
> > >     at
> > >
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll
> > > (DocumentRenderer.java:81)
> > >     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
> > > CoreRenderer.java:184)
> > >     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> > > UIXComponentBase.java:704)
> > >     at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(
> > > ComponentSupport.java:252)
> > >     at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(
> > > ComponentSupport.java:249)
> > >     at com.sun.facelets.FaceletViewHandler.renderView(
> > > FaceletViewHandler.java:573)
> > >     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:107)
> > >     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 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.coyote.http11.Http11Processor.process(
> > Http11Processor.java
> > > :869)
> > >     a
> > > 2007-03-19 15:05:58,343 ERROR [STDERR] t
> > >
> > 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)
> > >
> >
>

Mime
View raw message