1 Reply Latest reply on Aug 2, 2007 8:36 PM by Alexander Smirnov

    view id issue and portlet-echo on JB4.2.0/JBP 2.6.1

    Andrew Chukwu Newbie

      After some investigation I found the problem causing the 'could'n determine portlet view id ':

      There is a typo in the class org.ajax4jsf.portlet.applicationPortletStateHolder in the 1.1.1-SNAPSHOT source release. This has been fixed in the latest source on the ajax4jsf trunk.

      The static variable (line 40) reads as follows

      private static final String DEFAULT = "defauil-";

      Whereas it should read -

      private static final String DEFAULT = "default-";

      This will affect all applications using the "default-view" string to reach the home page of a portlet. If you don't want to go to the hassle of recompiling source, try"defauil-view" in your portlet.xml file.

      If using Apache MyFaces 1.2.0 (as I am with 1.1.1-SNAPSHOT), there are also some bugs causing null pointer exceptions in the MyFaces implements 1.2.0, Both the requestServletInfo and requestServletPath return null causing an exception to be thrown as null value checks have not been made on these values.
      By updating the source to include null checks on the requestPathInfo
      and servletPath variables the exceptions were bypassed.


      protected ServletMapping calculateServletMapping(FacesContext context)
      in org.apache.myfaces.application.DefaultViewHandlerSupport

      I have managed to get the 2 portlet-echo portlets to display in JBOSS 4.2.0 with JBP 2.6.1 with modified source. But still getting some errrors when click the submit buttons.

      Its good to turn on debug for the ajax4jsf and portlet related jars by adding the following to
      jboss-log4j.xml file in $JBOSS_HOME/server\default\conf:

      <!-- Capture ajax4jsf messages-->

      If someone (on the jboss team) can confirm if there are jar releases that are available to get the portlet-echo app running correctly on JB4.2.0 and JBP2.6.1 would save me a lot of time.