tabPanel loads content of all tabs in server/ajax switchType mode
-----------------------------------------------------------------

                 Key: RF-3512
                 URL: http://jira.jboss.com/jira/browse/RF-3512
             Project: RichFaces
          Issue Type: Bug
    Affects Versions: 3.2.0
         Environment: Sun RI 1.2, tomcat 6
            Reporter: Zied Hamdi


Content of all tabPanel tabs is encoded when displaying a tab: this bug becomes 
major if our home page loads all data relative to the app. The following code 
demonstrates this feature:

This is what we get in the log file: all tabs are loaded, then the one to 
display is loaded again

INFO  [gisiinteractive.common.test.jsf.richfaces.TestController] displaying tab 
1
INFO  [gisiinteractive.common.test.jsf.richfaces.TestController] displaying tab 
2
INFO  [gisiinteractive.common.test.jsf.richfaces.TestController] displaying tab 
3
INFO  [gisiinteractive.common.test.jsf.richfaces.TestController] displaying tab 
1

For this code, I have no direct way to avoid this (I will try to enable/disable 
the rendered attribute on each tab on display...) :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
        xmlns:f="http://java.sun.com/jsf/core";
        xmlns:h="http://java.sun.com/jsf/html";
        xmlns:rich="http://richfaces.org/rich";
        xmlns:ui="http://java.sun.com/jsf/facelets";
        xmlns:a4j="http://richfaces.org/a4j";
        xmlns:jsp="http://java.sun.com/JSP/Page";>


<f:view>
        <a4j:loadStyle src="/styles/gisi.css"></a4j:loadStyle>
        <ui:insert name="modalPanels" />
        <body style="margin: 0; padding: 0;">
        <h:form id="mainForm">
                <ui:debug hotkey="e" rendered="true" />
                <rich:tabPanel switchType="ajax">
                        <rich:tab label="tab1">
                                <h:outputText 
value="#{testController.tab1Text}"/>
                        </rich:tab>
                        <rich:tab label="tab2">
                                <h:outputText 
value="#{testController.tab2Text}"/>
                        </rich:tab>
                        <rich:tab label="tab3">
                                <h:outputText 
value="#{testController.tab3Text}"/>
                        </rich:tab>
                </rich:tabPanel>
        </h:form>
        </body>
</f:view>
</html>


package net.gisiinteractive.common.test.jsf.richfaces;

public class TestController {
        private static org.apache.commons.logging.Log LOG = 
org.apache.commons.logging.LogFactory
                        .getLog(TestController.class);

        public TestController() {
        }

        public String getTab1Text() {
                String value = "displaying tab 1";
                LOG.info(value);
                return value;
        }

        public String getTab2Text() {
                String value = "displaying tab 2";
                LOG.info(value);
                return value;
        }

        public String getTab3Text() {
                String value = "displaying tab 3";
                LOG.info(value);
                return value;
        }
}




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to