0 Replies Latest reply on Jun 30, 2008 8:00 AM by Ashish Warhokar

    Nevigation problem in portal portletbridge using richfaces a

    Ashish Warhokar Newbie

      Hi i am new bee to portlet , portletbridge and richfaces ,i am facing navigation problem when submitting form, request is not forwordong to portal page instead its forwording to normal page
      and getting all sets bean values null.
      below is my configurations for portlet bridge
      web.xml
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">
      RichFacesPortlet
      <context-param>
      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
      <param-value>
      org.jboss.portletbridge.application.FaceletPortletViewHandler
      </param-value>
      </context-param>
      <context-param>
      <param-name>javax.portlet.faces.renderPolicy</param-name>
      <param-value>ALWAYS_DELEGATE</param-value>
      </context-param>
      <!--<context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>-->
      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
      <param-value>rfRes</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.SKIP_COMMENTS</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
      <param-value>false</param-value>
      </context-param>

      <context-param>
      <param-name>facelets.VIEW_MAPPINGS</param-name>
      <param-value>*.xhtml</param-value>
      </context-param>

      <context-param>
      <param-name>org.richfaces.LoadStyleStrategy</param-name>
      <param-value>ALL</param-value>
      </context-param>

      <context-param>
      <param-name>org.richfaces.LoadScriptStrategy</param-name>
      <param-value>ALL</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
      </context-param>
      <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>ruby</param-value>
      </context-param>

      <display-name>RichFaces Filter</display-name>
      <filter-name>richfaces</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>

      <filter-mapping>
      <filter-name>richfaces</filter-name>
      <servlet-name>FacesServlet</servlet-name>
      FORWARD
      REQUEST
      INCLUDE
      </filter-mapping>

      <!-- Faces Servlet -->


      <servlet-name>FacesServlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>FacesServlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>

      <!-- Faces Servlet End-->
      <session-config>
      <session-timeout>10</session-timeout>
      </session-config>
      <mime-mapping>
      svg
      <mime-type>image/svg+xml</mime-type>
      </mime-mapping>
      <login-config>
      <auth-method>BASIC</auth-method>
      </login-config>

      <!--PortletBridge Servlet-->
      <!--
      <servlet-name>pbhs</servlet-name>
      <servlet-class>org.portletbridge.portlet.PortletBridgeServlet</servlet-class>
      <init-param>
      <param-name>mementoSessionKey</param-name>
      <param-value>mementoSessionKey</param-value>
      </init-param>
      <init-param>
      <param-name>cssRegex</param-name>
      <param-value>(?:url\((?:'|")?(.*?)(?:'|")?\))|(?:@import\s+[^url](?:'|")?(.*?)(?:'|")|;|\s+|$)</param-value>
      </init-param>
      <init-param>
      <param-name>jsRegex</param-name>
      <param-value>open\('([^']*)'|open\("([^\"]*)"</param-value>
      </init-param>
      <init-param>
      <param-name>ignoreRequestHeaders</param-name>
      <param-value>accept-encoding,connection,keep-alive</param-value>
      </init-param>
      <init-param>
      <param-name>ignorePostToGetRequestHeaders</param-name>
      <param-value>content-type,content-length</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>


      <servlet-mapping>
      <servlet-name>pbhs</servlet-name>
      <url-pattern>/pbhs/*</url-pattern>
      </servlet-mapping>

      <taglib-uri>http://java.sun.com/portlet</taglib-uri>
      <taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>


      <security-role>
      <role-name>portletbridge</role-name>
      </security-role>-->

      <!--PortletBridge Servlet End-->


      </web-app>
      ==============================================
      faces-config.xml


      <?xml version="1.0"?>
      <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
      <faces-config>

      <view-handler>
      org.jboss.portletbridge.application.PortletViewHandler
      </view-handler>
      <!--<message-bundle>properties.requestddbundle</message-bundle>
      <locale-config>
      <default-locale>en_US</default-locale>
      <supported-locale>es_MX</supported-locale>
      </locale-config>-->
      <!-- <state-manager>
      org.jboss.portletbridge.application.PortalStateManager
      </state-manager>-->
      <locale-config>
      <default-locale>en</default-locale>
      <supported-locale>fr</supported-locale>
      <supported-locale>es</supported-locale>
      </locale-config>



      <faces-context-factory>
      org.jboss.portletbridge.context.FacesContextFactoryImpl
      </faces-context-factory>


      <managed-bean id="requestDDBean">
      <managed-bean-name>requestDDBean</managed-bean-name>
      <managed-bean-class>beans.RequestDDBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      <!--===========================
      NAVIGATION RULE INFORMATION
      ===========================-->
      <navigation-rule>
      <navigation-case>
      <display-name>Confirm Request</display-name>
      <!-- <from-action>#{requestDDBean.submitRequestDD}</from-action>-->
      <from-outcome>REQUESTDD_SUBMIT</from-outcome>
      <to-view-id>/jsf/confirm_requestdd.xhtml</to-view-id>

      </navigation-case>
      <navigation-case>
      <display-name>Reference No</display-name>
      <!-- <from-action>#{requestDDBean.processRequestDD}</from-action>-->
      <from-outcome>REQUESTDD_CONFIRM</from-outcome>
      <to-view-id>/jsf/request_info.xhtml</to-view-id>

      </navigation-case>
      <navigation-case>
      <display-name>Request Info</display-name>
      <from-outcome>REQUESTDD_CANCEL</from-outcome>
      <!-- from-action>#{requestDDBean.cancalRequestDD}</from-action>-->
      <to-view-id>/jsf/requestdd.xhtml</to-view-id>

      </navigation-case>
      </navigation-rule>

      <render-kit>

      override the viewroot
      <component-family>javax.faces.ViewRoot</component-family>
      <renderer-type>javax.faces.ViewRoot</renderer-type>
      <renderer-class>
      org.jboss.portletbridge.renderkit.portlet.PortletAjaxViewRootRenderer
      </renderer-class>

      </render-kit>

      </faces-config>
      ===============================================

      richfaces-object.xml
      <?xml version="1.0" encoding="UTF-8"?>


      <if-exists>overwrite</if-exists>
      <parent-ref>DDPortal.default</parent-ref>

      <instance-name>DDPortletInstance</instance-name>
      <component-ref>DDPortletApp.DDPortlet</component-ref>



      <parent-ref>default</parent-ref>
      <if-exists>overwrite</if-exists>

      <page-name>DDPortlet</page-name>

      <window-name>DDUIPortletWindow</window-name>
      <instance-ref>DDPortletInstance</instance-ref>
      center
      0
      <initial-window-state>maximized</initial-window-state>


      theme.renderSetId
      emptyRenderer






      ==========================================
      jboss-portlet.xml

      <?xml version="1.0"?>

      <!DOCTYPE portlet-app PUBLIC
      "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
      "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
      <portlet-app>


      <portlet-name>DDPortlet</portlet-name>
      <header-content>



      </header-content>


      </portlet-app>
      =====================================
      portlet-instances.xml
      <?xml version="1.0" standalone="yes"?>



      <instance-id>DDPortletInstance</instance-id>
      <portlet-ref>DDPortlet</portlet-ref>





      please suggest if any more configuration require,
      help me to solve this issue i am struggling for this from last 3 days
      Thanks in advance