0 Replies Latest reply on Jul 22, 2008 1:03 AM by Neil C

    A RESTful Page Accessible From Two Different Conversations

    Neil C Novice

      I had implemented the typical widget search to widget search results to widget details use case just fine using Seam, but alas, customers had to go and throw a wrench into things.  Basically, there is another unrelated place where widgets are also listed, and users want to be able to navigate to the details page from there as well.  Originally, I had a searchAction component that knew which widget to display by storing it in conversation scope.  Now, I need to do something else.


      The idea I came up with is to let the details page be RESTful.  Since it can be reached through two completely different avenues, it seemed like the way to go was to generate a link passing the widget ID and the conversation ID to the widget details page.  Then of course, there is the need to get back to the page before regardless of which page that was.


      Unfortunately, I am getting this exception:



      javax.servlet.ServletException: Cannot convert E of type class java.lang.Character to class java.lang.Boolean
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
           at org.ajax4jsf.Filter.doFilter(Filter.java:175)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
           at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3243)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
      21 Jul 2008 17:37:46,714: ERROR org.jboss.seam.web.ExceptionFilter - exception root cause
      java.lang.IllegalArgumentException: Cannot convert E of type class java.lang.Character to class java.lang.Boolean
           at org.jboss.el.lang.ELSupport.coerceToBoolean(ELSupport.java:177)
           at org.jboss.el.lang.ELSupport.coerceToType(ELSupport.java:337)
           at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)
           at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
           at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
           at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:284)
           at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:285)
           at org.richfaces.renderkit.AbstractTableRenderer.encodeOneRow(AbstractTableRenderer.java:287)
           at org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:86)
           at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:101)
           at org.richfaces.model.ModifiableModel.walk(ModifiableModel.java:118)
           at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:1112)
           at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:106)
           at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:91)
           at org.richfaces.renderkit.AbstractRowsRenderer.encodeChildren(AbstractRowsRenderer.java:138)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
           at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
           at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
           at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
           at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:286)
           at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:281)
           at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
      
      



      Here is the entry in pages.xml:


      <s:link view="/details.jspx" value="#{widget.number}">
                  <f:param name="widgetNumber" value="#{widget.number}"/> 
                  <s:conversationId/>
      </s:link>
      



      Here is my entry in pages.xml:



      <page view-id="/details.jspx">
            <param name="widgetNumber" value="#{detailsAction.widgetNumber}" />
            <param name="cid" value="#{detailsAction.conversationId}" />
         </page>
      



      Note that this detailsAction component is brand new and has PAGE scope.


      Finally, I notice the URL in my browser when I mouse over one of the generated links looks like this:


      details.html?widgetNumber=GM754&dataModelSelection=widget%3AsearchResultsDataModel%5B0%5D&cid=2


      I have absolutely idea what that crap in the middle is.  The searchAction component happens to contain a component outjected to the conversation scope called searchResultsDataModel.  I have no idea why that is showing up in the URL or if that even has any bearing on the exception.


      I would appreciate any insight into the cause of this issue or, perhaps better yet, if you have a better idea for accomplishing what I am trying to accomplish.  Please let me know if I can be clearer in my explanation.


      Thanks.