0 Replies Latest reply on Apr 16, 2008 5:32 AM by ramzy1980

    switchType ajax renders bad request urls

      Hallo,

      i am using JBoss Richfaces in the last Release with PortletBridge in JBoss Application Server. All works fine.

      But there is a Problem with the switchType ajax !!!


      This is a small Example of my index.xhtml

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j">
      <ui:composition>
      <ui:define name="title">RichFaces - Open Source Rich JSF Components</ui:define>

      <ui:define name="body2">
      <a4j:outputPanel id="bodycontent">
      <rich:simpleTogglePanel switchType="ajax" label="Ajax Switch Type">

      This type allows to perform the partual view update instead of the

      whole page reloading. You also can point to other areas of the view

      to be re-rendered while the panel content is toggled.

      </rich:simpleTogglePanel>
      </a4j:outputPanel>

      </ui:define>
      </ui:composition>


      And this is my web.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4" 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">
      myPortlet
      <display-name>myPortlet</display-name>

      <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>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
      <param-value>rfRes</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.REFRESH_PERIOD</param-name>
      <param-value>2</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</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>com.sun.faces.validateXml</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>com.sun.faces.verifyObjects</param-name>
      <param-value>false</param-value>
      </context-param>


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

      <filter-mapping>
      <filter-name>ajax4jsf</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      FORWARD
      REQUEST
      INCLUDE
      </filter-mapping>


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

      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.xhtml</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>

      <context-param>
      <param-name>org.richfaces.LoadStyleStrategy</param-name>
      <param-value>DEFAULT</param-value>
      </context-param>
      <context-param>
      <param-name>org.richfaces.LoadScriptStrategy</param-name>
      <param-value>ALL</param-value>
      </context-param>
      <login-config>
      <auth-method>BASIC</auth-method>
      </login-config>
      </web-app>



      My faces-config.html is completely empty theres only the default config tag, that means there are no handlers, no Beans and no Navigation rules.

      Who can help me ?
      After i finish the Portlet i will put it for Download on to my Page. I would send the link to this Forum.