You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Miller, John" <jm...@litle.com> on 2006/01/18 18:47:18 UTC

There appears to be a bug in the t:buffer tag

I have been able to reproduce this both in my application and in a
Sample Application  that uses the buffer.jsp example. If you double
click the Datascroller that is buffered, you can get the buffer to
render multiple dataScrollers. What is the correct path to report this
and/or identify some type of work around.

 

NOTE: this behavior is specific to t:buffer I believe, because I haven't
been able to reproduce with an unbuffered dataScroller

 

My Workaround: My workaround for now will have to be to use css
positioning to render the dataScroller above the dataTable unless
someone can offer a better temporary workaround

 

 

How to repeat:

 

Deploy the following code to tomcat 4.1.30 and continue to double click
the dataScroller until it behaves badly

 

public class Tmp {

    

    private String id;

    private String type;

    /**

     * @return Returns the car.

     */

    public String getType() {

        return type;

    }

    /**

     * @param car The car to set.

     */

    public void setType(String car) {

        this.type = car;

    }

    /**

     * @return Returns the id.

     */

    public String getId() {

        return id;

    }

    /**

     * @param id The id to set.

     */

    public void setId(String id) {

        this.id = id;

    }

 

}

 

public class Test {

 

    private String label;

    private boolean show;

    private List list;

 

    public Test() {

        super();

        label = "warning";

    }

 

    public String getLabel() {

        return label;

    }

 

    public void setLabel(String test) {

        this.label = test;

    }

 

    public boolean isShow() {

        return show;

    }

 

    public void setShow(boolean show) {

        this.show = show;

    }

 

    /**

     * @return Returns the list.

     */

    public List getList() {

        if(list == null){

            list = new ArrayList();

            for(char a = 'a';a< 'z';a++){

                Tmp l = new Tmp();

                l.setId("id "+a);

                l.setType("type "+a);

                

                list.add(l);

            }

        }

        return list;

    }

 

    /**

     * @param list The list to set.

     */

    public void setList(List list) {

        this.list = list;

    }

 

}

 

<%@ page session="false" contentType="text/html;charset=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://myfaces.apache.org/tomahawk" prefix="t"%>

<html>

 

<body>

 

<f:view>

<h:form>

 

    <h2>dataTable Example</h2>

 

    <t:buffer into="#{table}">

        <t:dataTable id="data"

                styleClass="scrollerTable"

                headerClass="standardTable_Header"

                footerClass="standardTable_Header"

                rowClasses="standardTable_Row1,standardTable_Row2"

 
columnClasses="standardTable_Column,standardTable_ColumnCentered,standar
dTable_Column"

                var="car"

                value="#{test.list}"

                preserveDataModel="false"

                rows="5"

           >

           <h:column>

               <f:facet name="header">

               </f:facet>

               <h:outputText value="#{car.id}" />

           </h:column>

 

           <h:column>

               <f:facet name="header">

                  <h:outputText value="blah" />

               </f:facet>

               <h:outputText value="#{car.type}" />

           </h:column>

 

        </t:dataTable>

    </t:buffer>

 

    <t:buffer into="#{tableScroller}">

        <h:panelGrid columns="1" styleClass="scrollerTable2"
columnClasses="standardTable_ColumnCentered" >

            <t:dataScroller id="scroll_1"

                    for="data"

                    fastStep="5"

                    pageCountVar="pageCount"

                    pageIndexVar="pageIndex"

                    styleClass="scroller"

                    paginator="true"

                    paginatorMaxPages="9"

                    paginatorTableClass="paginator"

                    paginatorActiveColumnStyle="font-weight:bold;"

                    >

                                   <f:facet name="first">

                              <t:graphicImage
url="/images/list_start_f2.gif" border="0" />

                              

                        </f:facet>

                        <f:facet name="previous">

                              <t:graphicImage url="/images/prev_f2.gif"
border="0" />

                        </f:facet>

                        <f:facet name="next">

                              <t:graphicImage url="/images/next_f2.gif"
border="0" />

                        </f:facet>

                </t:dataScroller>

                

        </h:panelGrid>

    </t:buffer>

 

    <h:outputText value="#{tableScroller}" escape="false"/>

    <h:outputText value="#{table}" escape="false"/>

    <h:outputText value="#{tableScroller}" escape="false"/>

 

</h:form>

</f:view>

 

 

</body>

 

</html>

 

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer
Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

 

<faces-config >

 

      <component>

            <component-type>org.jrm.tags.ImageSelector</component-type>

 
<component-class>org.jrm.tags.ImageSelector</component-class>

      </component>

      <managed-bean>

            <managed-bean-name>test</managed-bean-name>

            <managed-bean-class>test.Test</managed-bean-class>

            <managed-bean-scope>request</managed-bean-scope>

      </managed-bean>

      

      <navigation-rule>

            <from-view-id>*</from-view-id>

            <navigation-case>

            <from-outcome>dataScroll</from-outcome>

            <to-view-id>/dataScroller.jsp</to-view-id>

            </navigation-case>

</navigation-rule>

<navigation-rule>

            <from-view-id>*</from-view-id>

            <navigation-case>

            <from-outcome>buffer</from-outcome>

            <to-view-id>/buffer.jsp</to-view-id>

            </navigation-case>

</navigation-rule>

</faces-config> 
 
 
 
NOTICE:  This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle & Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message.  If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail.  Thank you.