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?

        • 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

            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"
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
             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 name="content">
             <c:when test="#{param.process == 'search' }">
             <ui:include src="/UC/employee/PermanentStaffList.xhtml" />
             <c:when test="#{param.process == 'newemployee' }">
             <rich:tabPanel switchType="ajax" >
             <f:facet name="label">
             <h:panelGroup><h:graphicImage value="img/dtpick.gif" style="position:absmiddle;" /> <h:outputText value="Sicil Bilgileri" /></h:panelGroup>
             <ui:include src="/UC/employee/Registry.xhtml" />
             <f:facet name="label">
             <h:graphicImage value="img/user.png" /> <h:outputText value="Nüfus Bilgileri" />
             <ui:include src="/UC/employee/IdentityDetail.xhtml" />
             .....More tabs

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

            <f:view xmlns="http://www.w3.org/1999/xhtml"
             <h:form id="PermanentStaffListSearch" styleClass="edit">
             <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"
             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 sortable="true"
             label="Hizmet Sınıfı">
             <f:facet name="header">Hizmet Sınıfı</f:facet>
             <h:outputText value="#{_permstaff.serviceCategoryDefinition.name}" />
             <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 sortable="true" sortBy="#{_permstaff.degree}"
             <f:facet name="header">Derecesi</f:facet>
             <h:outputText value="#{_permstaff.degree}" />

            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.