4 Replies Latest reply on May 5, 2009 6:19 AM by nbelaevski

    strange behaviour for tabPanel

    lmk

      Hello,

      I have a problem using tabPanel, when the switchType is ajax, switching tabs does not work, server dont send ajax response;
      when switchType is server, switching tabs works, but, ajax request inside tab has a the same behaviour: ajax request is sent, but response never reurned.

      NB: tested on 3.3.0.GA and last CR.

      <rich:tabPanel id="admin" switchType="ajax" style="width:90%;"
      selectedTab="#{beanTabs.selectedTab}" >
      <rich:tab label="User" name="#{beanTabs.userTab}"
      rendered="#{identification.admin}" ignoreDupResponses="true">
      <h:panelGroup rendered="#{beanTabs.selectedTab==beanTabs.userTab}">
      <ui:include src="user.xhtml" />
      </h:panelGroup>
      </rich:tab>
      <rich:tabPanel>


      user.xhtml



      <ui:composition 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:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:t="http://myfaces.apache.org/tomahawk">
      
       <h:form id="userDemand">
      
       <rich:comboBox selectFirstOnUpdate="false"
       defaultLabel="Enter some value" value="#{userBean.filterCompany}"
       id="combo_user" width="200" style="margin-left:90px;"
       immediate="true">
       <t:selectItems value="#{bean.companies}" var="list"
       itemLabel="#{list.name}" itemValue="#{list.name}" />
       <a4j:support event="onselect" reRender="userList"
       action="#{userBean.filterUserByCompany}" ajaxSingle="true">
       </a4j:support>
       <a4j:support event="onchange" reRender="userList"
       action="#{userBean.filterUserByCompany}" ajaxSingle="true">
       </a4j:support>
      </rich:comboBox>
      
      <h:outputText value="#{msg.label_user} *" />
      <h:selectOneMenu value="#{userBean.updateUserId}" id="userList"
       style="margin-left:90px;width:200px;">
       <f:selectItem itemLabel="Select one" itemValue="#{bean.zero}" />
       <t:selectItems value="#{userBean.users}" var="list"
       itemLabel="#{list.lastname} #{list.firstname}"
       itemValue="#{list.userId}" />
       <a4j:support event="onchange" reRender="user,combo_user"
       action="#{userBean.onSelectUserUpdate}" ajaxSingle="true" process="user">
       </a4j:support>
      </h:selectOneMenu>
      </h:panelGrid>
      <a4j:outputPanel id="user">
      ...
      ...
      


      have I miss something?

      best regards!


        • 1. Re: strange behaviour for tabPanel
          lmk

          a4j:log shows an xml parsing error//

          error[18:10:05,558]: Error parsing XML
          
          </script></div>
          <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAVqX2lkOXB0ABUvYWRtaW5fb3JzX3RhYnMueGh0bWw=" />
          </form></td></tr><tr><td id="j_id290" style=";height:100%">
          <table border="0" cellpadding="10" cellspacing="0" class="dr-tbpnl-cntnt-pstn rich-tabpanel-content-position" width="100%"><tr>
          <td class="dr-tbpnl-cntnt rich-tabpanel-content " style="; "><?xml version="1.0" encoding="iso-8859-1"?>
          





          • 2. Re: strange behaviour for tabPanel
            nbelaevski

            Looks like ui:composition is missing in the included file.

            • 3. Re: strange behaviour for tabPanel
              lmk

              the included file starts with: f:subview, and now with ui:composition..no changes..

              <ui:composition 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:a4j="http://richfaces.org/a4j"
               xmlns:rich="http://richfaces.org/rich"
               xmlns:t="http://myfaces.apache.org/tomahawk">


              It seems, that selectOneMenu contains a value with no recognized character.

              should I add xml encoding, some files contains, but I remove it from the included tab.


              <?xml version="1.0" encoding="iso-8859-1"?>


              • 4. Re: strange behaviour for tabPanel
                nbelaevski

                Please post full response content as seen in a4j:log