4 Replies Latest reply on Mar 19, 2009 8:17 AM by Ilya Shaikovsky

    Tabpanel andlem extendeddatatable prob

    Oguzhan YALCIN Newbie

      Hi, I'm using seam with richfaces. I have richfaces tabpanel component in my seam application. It runs smoothly when using switchType="client" but when i change switchtype to ajax or server, I can't load the selected tab, because my component only renders if the page is requested like page.seam?process=new and when the panel sends a request , the request directs to the page.seam .How can i send the page parameters when switching the tab? Also having same problem when trying to rerender extended datatable. When I try to sort the xdatatable , loading icon appears but no response returns, cause it requests page.seam and requested page doesn't contain a xdatatable. it must send the request to page.seam?process=new. How can I do this?
      Thx

        • 1. Re: Tabpanel andlem extendeddatatable prob
          Ilya Shaikovsky Master

          I've lost in your descriptions. provide the code. and info about environment libs versions.

          • 2. Re: Tabpanel andlem extendeddatatable prob
            Oguzhan YALCIN Newbie

            Hi,
            Thx for your quick reply.I'm using jboss_as_5, richfaces and seam

            this is the view content for employee.xhtml

            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
             xmlns:s="http://jboss.com/products/seam/taglib"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:rich="http://richfaces.org/rich"
             xmlns:c="http://java.sun.com/jstl/core" template="layout/common/main.xhtml">
            
             <ui:define name="sidebar">
             <ui:include src="/UC/common/SessionInfo.xhtml" />
             <ui:include src="/layout/employee/leftmenu.xhtml" />
             </ui:define>
             <ui:define name="content">
             <c:choose>
             <c:when test="#{param.process == 'search' }">
             <ui:include src="/UC/employee/PermanentStaffList.xhtml" />
             </c:when>
             <c:when test="#{param.process == 'newemployee' }">
             <rich:tabPanel switchType="ajax" >
             <rich:tab>
             <f:facet name="label">
             <h:panelGroup><h:graphicImage value="img/dtpick.gif" style="position:absmiddle;" /> <h:outputText value="Sicil Bilgileri" /></h:panelGroup>
             </f:facet>
             <ui:include src="/UC/employee/Registry.xhtml" />
             </rich:tab>
             <rich:tab>
             <f:facet name="label">
             <h:graphicImage value="img/user.png" /> <h:outputText value="Nüfus Bilgileri" />
             </f:facet>
             <ui:include src="/UC/employee/IdentityDetail.xhtml" />
             </rich:tab>
             .....More tabs
            
             </rich:tabPanel>
             </c:otherwise>
             </c:choose>
             </ui:define>
            
            </ui:composition>



            this is the code for the "/UC/employee/PermanentStaffList.xhtml"


            <f:view xmlns="http://www.w3.org/1999/xhtml"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:richfaces="http://richfaces.ajax4jsf.org/rich"
             xmlns:ajax="https://ajax4jsf.dev.java.net/ajax"
             xmlns:a4j="http://richfaces.org/a4j"
             xmlns:rich="http://richfaces.org/rich"
             xmlns:s="http://jboss.com/products/seam/taglib"
             xmlns:c="http://java.sun.com/jstl/core"
             xmlns:fn="http://java.sun.com/jsp/jstl/functions">
            
             <h:form id="PermanentStaffListSearch" styleClass="edit">
            
            
            
             <rich:panel>
             <f:facet name="header">Kadro Arama Sonuçları</f:facet>
             <div class="results" id="PermanentStaffListResults"><h:outputText
             value="Sistemde kayıtlı personel bulunamadı.Kayıtlı"
             rendered="#{empty permanentStaffDefinitionList.resultList}" /> <rich:extendedDataTable
             id="PermanentStaffListList" var="_permstaff"
             value="#{permanentStaffDefinitionList.resultList}"
             rendered="#{not empty permanentStaffDefinitionList.resultList}"
             width="100%" columnsWidth="30%,25%,35%,10%">
             <rich:column sortable="true"
             sortBy="#{_permstaff.unitDefinition.name}" label="Birim Adı">
             <f:facet name="header">Birim Adı</f:facet>
             <h:outputText value="#{_permstaff.unitDefinition.name}" />
             </rich:column>
             <rich:column sortable="true"
             sortBy="#{_permstaff.serviceCategoryDefinition.name}"
             label="Hizmet Sınıfı">
             <f:facet name="header">Hizmet Sınıfı</f:facet>
             <h:outputText value="#{_permstaff.serviceCategoryDefinition.name}" />
             </rich:column>
             <rich:column sortable="true"
             sortBy="#{_permstaff.titleDefinition.name}" label="Ãœnvan">
             <f:facet name="header">Ünvanı</f:facet>
             <h:outputText value="#{_permstaff.titleDefinition.name}" />
             </rich:column>
             <rich:column sortable="true" sortBy="#{_permstaff.degree}"
             label="Derece">
             <f:facet name="header">Derecesi</f:facet>
             <h:outputText value="#{_permstaff.degree}" />
             </rich:column>
             </rich:extendedDataTable></div>
             </rich:panel>
             </h:form>
            </f:view>



            info: param.process is a get parameter.


            Next Phase the problems:
            1-when i try to switch between tags three situations occurs when clicked to a tabpanel
            if tabpanel property switchtype is set to client :everything works smoothly
            if tabpanel property switchtype is set to server: page redirects to employee.seam . The request parameter "process" is not there . So the page doesn't render the same component.
            iftabpanel property switchtype is set to ajax: panel sends an ajx request to the employee.seam(also with the missing request parameter "process") so you can't change the tabpage



            2- if param.process=='search' returns true (page is requested like employee.seam?process=search) i render an staff search form . The problem is with the extendeddatatable. when you select a column header and select sort ascending. the loading icon flashes. but loading never ends because it sends the request to employee.seam not to employee.seam?process=search .


            In conclusion, my main problem (from my point of view) is rich components not sending the pageparameters.

            Could please provide help for this situation?

            • 4. Re: Tabpanel andlem extendeddatatable prob
              Ilya Shaikovsky Master

              You could see that our richfaces-demo works with page parameters fine. (It consist of tabPanel in server mode and parameters used for skin and tab bookmarking). B.t.w. using tabs in server mode - works the same as submitting for with h:commandButton.

              1) try to replace jstl tags with rendered conditions..
              2) also paste web.xml source.