3 Replies Latest reply on Oct 4, 2005 4:41 AM by jlaskowski

    Apache MyFaces 1.1.0 and 2.2.0-ALPHA don't work any more

    jlaskowski

      Hi,

      Until recently, I could develop portlets with MyFaces impl. Now, JSF forms are no longer able to pass form parameters to backing beans and MyFaces reports

      14:06:20,659 WARN [HtmlRendererUtils] There should always be a submitted value for an input if it is rendered, its form is submitted, and it is not disabled or read-only.
      


      If I test out the web application as as a regular web app (not a portlet) it works fine. It seems that the latest changes to the Friendly URLs or Themes broke JSF apps.

      Besides, when I use the friendly urls with window name at the end, Portal prints out:

      14:05:25,650 ERROR [[PortalServletWithPathMapping]] Servlet.service() for servlet PortalServletWithPathMapping threw exception
      java.lang.ClassCastException: org.jboss.portal.core.impl.model.portal.WindowImpl
       at org.jboss.portal.core.impl.model.portal.PageImpl.getPage(PageImpl.java:46)
       at org.jboss.portal.core.model.portal.PortalObjectCommandMapper$1.getChild(PortalObjectCommandMapper.java:74)
       at org.jboss.portal.server.servlet.PathParser.map(PathParser.java:51)
       at org.jboss.portal.core.model.portal.PortalObjectCommandMapper.doMapping(PortalObjectCommandMapper.java:131)
       at org.jboss.portal.core.command.mapper.PrefixDelegatingCommandMapperService.doMapping(PrefixDelegatingCommandMapperService.java:150)



      When I strip the window name it displays fine. It worked 2 days ago.

      Jacek

        • 1. Re: Apache MyFaces 1.1.0 and 2.2.0-ALPHA don't work any more
          jlaskowski

          Hi,

          I think I have found a partial solution to the issue I reported earlier (which resulted in the ClassCastException below). Take a look at org.jboss.portal.core.model.portal.PortalObjectCommandMapper:74. Shouldn't it look as follows?

          return page.getWindow(name);

          instead of

          return page.getPage(name);

          I'm not reporting an issue in JIRA because it keeps failing and my portlet doesn't show up if it's included in a url. Anyway, worth to take a look at that part of the code.

          Jacek

          • 2. Re: Apache MyFaces 1.1.0 and 2.2.0-ALPHA don't work any more

            makes sense actually, thanks

            • 3. Re: Apache MyFaces 1.1.0 and 2.2.0-ALPHA don't work any more
              jlaskowski

              Hi,

              I've just found the answer to the issue with a portlet name being appended to the friendly url.

              It turned out that the last URL part referencing a portlet should have been the name of a portlet instance rather than a portlet name itself. When I think about the change it seems very reasonable since there can be several instances of a portlet on a page and using the portlet name would not point to the portlet instance to render.

              I'm still having troubles with MyFaces and the latest 2.2.0-ALPHA, and no form input parameters are passed on.

              10:35:09,756 WARN [HtmlRendererUtils] There should always be a submitted value for an input if it is rendered, its form is submitted, and it is not disabled or read-only.

              Jacek