0 Replies Latest reply on Oct 24, 2007 11:45 AM by Holger Jaekel

    Ajax Support in RF 3.1.2 with JBP 2.6.2

    Holger Jaekel Newbie

      Hello,

      I started with this example from http://jira.jboss.com/jira/secure/attachment/12315465/portlet-jsfrichfacesdemo.war from suckerd (thanks!) to build my own RF portlet on JBP 2.6.2. I upgraded the RF libs from the example to 3.1.2 and changed the Search.jsp as follows:

      <%@page contentType="text/html"%>
      <%@page pageEncoding="UTF-8"%>
      
      <%-- RichFaces taglibs --%>
      <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
      
      <%-- JSF taglibs --%>
      <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      
      <%-- portlet taglibs --%>
      <%@ page import="javax.portlet.*"%>
      <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
      
      
      <portlet:defineObjects />
      <%PortletPreferences prefs = renderRequest.getPreferences();%>
      
      <a4j:portlet>
      <f:view>
       <rich:panel>
       <f:facet name="header">
       <h:outputText value="Olympus EVOLT E-500" />
       </f:facet>
       </rich:panel>
      
      
       <p>Here is an example of tab panel switched in "ajax" style. Second
       tab is disabled. <rich:tabPanel switchType="ajax">
       <rich:tab label="First">
       Here is tab #1
       </rich:tab>
       <rich:tab label="Second" disabled="true">
       Here is tab #2
       </rich:tab>
       <rich:tab label="Third">
       Here is tab #3
       </rich:tab>
       </rich:tabPanel></p>
       <p>Here is an example of tab panel switched completely on client. <rich:tabPanel
       switchType="client">
       <rich:tab label="First">
       Here is tab #1
       </rich:tab>
       <rich:tab label="Second">
       Here is tab #2
       </rich:tab>
       <rich:tab label="Third">
       Here is tab #3
       </rich:tab>
       </rich:tabPanel>
      </f:view>
      </a4j:portlet>
      In short, I added a piece of the Tab Panel example code from the RichFaces Live Demo.

      The second tab panel (switchType="client") works, but the first example (switchType="ajax") always reloads the complete portal page. No ajax style panel switching is performed (like in the live demo). What am I doing wrong?

      Can you help me please.
      Holger