Menu

#10 tree rendered tabbedpane using jsp:include

v_1.0_beta_3
open
5
2007-02-14
2007-02-02
No

When running the two sample JSPs below what I see is that when I use <jsp:include> to include a page with a tabbedpane, it causes the text in the second tab pane to render twice when asyncRenderMode="tree". It seems that the original text in the tab is not removed during the initial rendering process so when you click on the seconds tab the results is added to the HTML already in the tab. We use <jsp:include> throughout our application so this breaks the greatest feature of the tabbedpane. Is this a bug, or is there a workaround? <%@include%> does not work the same way, so it does not work.

Test Code:
TEST.JSP:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://rcfaces.org/core" prefix="r"%>
<%@ taglib uri="http://rcfaces.org/html" prefix="rh"%>
<f:view>
<html>
<head>
<rh:init/>
</head>
<h:form>
<jsp:include page="test2.jsp" flush="false"/>
</h:form>
</html>
</f:view>

-----------------------------------------------------------------

TEST2.JSP:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://rcfaces.org/core" prefix="r"%>
<%@ taglib uri="http://rcfaces.org/html" prefix="rh"%>
<f:subview id="adssad1">
<r:tabbedPane width="100%" asyncRenderMode="tree">
<r:tab text="Scheduled" accessKey="S">
<h:outputText value="test"/>
</r:tab>
<r:tab text="Occured" accessKey="O">
<h:outputText value="test"/>
</r:tab>
</r:tabbedPane>
</f:subview>

Discussion

  • Olivier Oeuillot

    • assigned_to: nobody --> oeuillot
     
  • Olivier Oeuillot

    Logged In: YES
    user_id=306652
    Originator: NO

    Hello John,

    I try your sample with I2167, and it seems working ...

    Could you test it ?

    Thanks,

    Olivier.

     
  • John Van Etten

    John Van Etten - 2007-02-23

    Logged In: YES
    user_id=947687
    Originator: YES

    I still get the same response. I'm using MyFaces, so maybe that the problem. Here is my tomcat output and my web.xml is at the bottom:

    Feb 23, 2007 11:26:58 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Feb 23, 2007 11:26:58 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2063 ms
    Feb 23, 2007 11:26:59 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Feb 23, 2007 11:26:59 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
    Feb 23, 2007 11:26:59 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    - Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
    - Reading config jar:file:/C:/engage/build/starteam/htdocs/WEB-INF/lib/ajaxanywhere-1.1.0.3.jar!/META-INF/faces-config.xml
    - Reading config jar:file:/C:/engage/build/starteam/htdocs/WEB-INF/lib/myfaces-all.jar!/META-INF/faces-config.xml
    - Reading config jar:file:/C:/engage/build/starteam/htdocs/WEB-INF/lib/rcfaces-core.jar!/META-INF/faces-config.xml
    - Reading config jar:file:/C:/engage/build/starteam/htdocs/WEB-INF/lib/rcfaces-html.jar!/META-INF/faces-config.xml
    - Reading config jar:file:/C:/engage/build/starteam/htdocs/WEB-INF/lib/sandbox.jar!/META-INF/faces-config.xml
    - Reading config jar:file:/C:/engage/build/starteam/htdocs/WEB-INF/lib/tomahawk.jar!/META-INF/faces-config.xml
    - Reading config /WEB-INF/faces-config.xml
    - Reading config /WEB-INF/faces-config.xml
    - RCFaces Core version: 1.0.0.2167
    - READ_ONLY_COLLECTION_LOCK_ENABLED=true
    - LOCKED_CLIENT_ATTRIBUTES_DEFAULT_VALUE=false
    - TEMPLATE_ENGINE_SUPPORT=true
    - RESOURCE_CONTENT_VERSION_SUPPORT=true
    - STATED_COMPONENT_CHILDREN_LIST=true
    - CACHED_COMPONENT_ITERATOR=true
    - CACHED_LOCALE_FORMATS=true
    - COMPACTED_PROPERTY_NAME=true
    - ETAG_SUPPORT=true (algorithm: SHA-1)
    - HASH_SUPPORT=true (algorithm: MD5)
    - GZIP_SUPPORT_DEFAULT_VALUE=true
    - DEFAULT_EXPIRATION_DELAY=604800000 (1 week)
    - DEFAULT_VERSIONED_EXPIRATION_DELAY=31536000000 (1 year)
    - CLIENT_LOCALE_SUPPORT_DEFAULT_VALUE=true
    - VERSIONED_URI_HASHCODE_MAX_SIZE=16
    - REPOSITORY_DEFAULT_LOCALE=en
    - FACELETS_SUPPORT=true
    - DEFAULT_ASYNC_MODE=none
    - ENABLE_ASYNC_MODE_VALUE=buffer
    - Default components factory: Camelia basic components factory
    - Locale name null or empty, ignoring
    - ServletContext 'c:\engage\build\starteam\htdocs\' initialized.
    env url for /com/peerdigital/properties/env.xml is: C:/engage_support/jakarta-tomcat-5/common/classes/com/peerdigital/properties/env.xml
    ENV.XML using script hostname 'wesdevdt010' instead of system hostname 'WESDEVDT010'
    env url for /com/peerdigital/properties/dev_env.xml is: C:/engage_support/jakarta-tomcat-5/common/classes/com/peerdigital/properties/dev_env.xml
    Loading properties from: C:\engage_support\jakarta-tomcat-5\common\classes\com\peerdigital\properties\johndev.properties
    - USE_INCLUDE_IMAGE_LOADER_FACTORY=true (Load image by servlet inclusion.)
    - Use default gzip support configuration (value=true) for sevlet 'Rcfaces Application Contents'
    - Use default ETag support configuration (value=true) for sevlet 'Rcfaces Application Contents'
    - Use default Hash support configuration (value=true) for sevlet 'Rcfaces Application Contents'
    - Expire delay setted to 1 week for sevlet 'Rcfaces Application Contents'.
    - Versioned resources expire delay setted to 1 year for sevlet 'Rcfaces Application Contents'
    - Use default value (true) for LOCALE_SUPPORT for servlet 'Rcfaces Application Contents'.
    - Base of content storage is '/rc-content'.
    - ClientResourceBundle uri is '/rc-cb'.
    - Use default gzip support configuration (value=true) for sevlet 'Rcfaces Client bundle'
    - Use default ETag support configuration (value=true) for sevlet 'Rcfaces Client bundle'
    - Use default Hash support configuration (value=true) for sevlet 'Rcfaces Client bundle'
    - Expire delay setted to 1 week for sevlet 'Rcfaces Client bundle'.
    - Versioned resources expire delay setted to 1 year for sevlet 'Rcfaces Client bundle'
    - Use default value (true) for LOCALE_SUPPORT for servlet 'Rcfaces Client bundle'.
    - VERIFY_BUNDLE_KEY=true
    - Use default gzip support configuration (value=true) for sevlet 'Rcfaces Application version'
    - Use default ETag support configuration (value=true) for sevlet 'Rcfaces Application version'
    - Use default Hash support configuration (value=true) for sevlet 'Rcfaces Application version'
    - Expire delay setted to 1 week for sevlet 'Rcfaces Application version'.
    - Versioned resources expire delay setted to 1 year for sevlet 'Rcfaces Application version'
    - Use default value (true) for LOCALE_SUPPORT for servlet 'Rcfaces Application version'.
    - Base of application version url is '/rc-av'.
    - RCFaces HTML version: 1.0.0.2167
    - INTERACTIVE_RENDER_DEFAULT_VALUE=true
    - INTERACTIVE_RENDER_GZIP_DEFAULT_VALUE=true
    - VERSIONED_FRAMEWORK_URL_SUPPORT=true
    - VERSIONED_CLIENT_BUNDLE_SUPPORT=true
    - CLIENT_NAMING_SEPARATOR_SUPPORT=true
    - GROUP_NAME_NAMESPACE_SUPPORT=true
    - NORMALIZE_STYLE_MARGINS=true
    - Use default gzip support configuration (value=true) for sevlet 'Rcfaces Framework Contents: Javascript resources'
    - Use default ETag support configuration (value=true) for sevlet 'Rcfaces Framework Contents: Javascript resources'
    - Use default Hash support configuration (value=true) for sevlet 'Rcfaces Framework Contents: Javascript resources'
    - Expire delay setted to 1 week for sevlet 'Rcfaces Framework Contents: Javascript resources'.
    - Versioned resources expire delay setted to 1 year for sevlet 'Rcfaces Framework Contents: Javascript resources'
    - Use default value (true) for LOCALE_SUPPORT for servlet 'Rcfaces Framework Contents: Javascript resources'.
    - Repository version buildId='2167' compiledVersion=false setted for servlet 'Rcfaces Framework Contents: Javascript resources'.
    - Use default gzip support configuration (value=true) for sevlet 'Rcfaces Framework Contents: Stylesheet resources'
    - Use default ETag support configuration (value=true) for sevlet 'Rcfaces Framework Contents: Stylesheet resources'
    - Use default Hash support configuration (value=true) for sevlet 'Rcfaces Framework Contents: Stylesheet resources'
    - Expire delay setted to 1 week for sevlet 'Rcfaces Framework Contents: Stylesheet resources'.
    - Versioned resources expire delay setted to 1 year for sevlet 'Rcfaces Framework Contents: Stylesheet resources'
    - Use default value (true) for LOCALE_SUPPORT for servlet 'Rcfaces Framework Contents: Stylesheet resources'.
    - Charset setted to DEFAULT value: "UTF-8" for sevlet 'Rcfaces Framework Contents: Stylesheet resources'
    - Set repository version to buildId='2167' for servlet 'Rcfaces Framework Contents: Stylesheet resources'.
    - StyleSheets: buffers loaded into 44764 bytes (GZiped: 6618 [14%])
    Feb 23, 2007 11:27:17 AM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    Feb 23, 2007 11:27:17 AM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Feb 23, 2007 11:27:18 AM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    Feb 23, 2007 11:27:18 AM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/62 config=C:\engage_support\jakarta-tomcat-5\conf\jk2.properties
    Feb 23, 2007 11:27:18 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 19382 ms
    - Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
    - Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
    - Loading rcfaces config ...
    - Disable application version rewriting engine.
    - Rcfaces config loaded.
    - Use default interactive render value (true).
    - Use default interactive render GZIP value (true).
    - DisableIEImageBar is enabled for context.
    - MetaContentType is enabled for context.
    - UseMetaContentScriptType is enabled for context.
    - UseMetaContentStyleType is enabled for context.
    - Save state field marker is '<!--@@JSF_FORM_STATE_MARKER@@-->'.

    HERE IS MY WEB.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>

    <!-- JSF Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

    <!-- AjaxAnywhere (Must be before MyFaces) -->
    <filter>
    <filter-name>AjaxAnywhere</filter-name>
    <filter-class>org.ajaxanywhere.AAFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>AjaxAnywhere</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>AjaxAnywhere</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>

    <!-- MyFaces -->
    <filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
    <init-param>
    <param-name>maxFileSize</param-name>
    <param-value>20m</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
    <param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value>
    </context-param>

    <!-- Rich Client Faces -->
    <servlet>
    <servlet-name>Rcfaces Framework Contents</servlet-name>
    <servlet-class>org.rcfaces.renderkit.html.internal.resource.ResourcesServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>
    Rcfaces Application Contents
    </servlet-name>
    <servlet-class>
    org.rcfaces.core.internal.contentStorage.ContentStorageServlet
    </servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>
    Rcfaces Application version
    </servlet-name>
    <servlet-class>
    org.rcfaces.core.internal.version.ApplicationVersionServlet
    </servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>
    Rcfaces Client bundle
    </servlet-name>
    <servlet-class>
    org.rcfaces.renderkit.html.internal.clientBundle.ClientResourceBundleServlet
    </servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>
    Rcfaces Framework Contents
    </servlet-name>
    <url-pattern>/rc-fwk/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>
    Rcfaces Application Contents
    </servlet-name>
    <url-pattern>/rc-content/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>
    Rcfaces Application version
    </servlet-name>
    <url-pattern>/rc-av/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>
    Rcfaces Client bundle
    </servlet-name>
    <url-pattern>/rc-cb/*</url-pattern>
    </servlet-mapping>
    </web-app>

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.