On 9/21/06, Rønnevik, Eivind
<[EMAIL PROTECTED]> wrote:
Hi!
If I remember correctly I had a similar problem with the dataScroller.
What I did was to add id's to the images, and this corrected the problem.. :)
So, something like this:
<f:facet name="first">
<t:graphicImage id="datascrollerFirst"
value="/images/arrow-first.gif" border="1" />
</f:facet>
<f:facet name="last">
<t:graphicImage id="datascrollerLast"
value="/images/arrow-last.gif" border="1" />
</f:facet>
<f:facet name="previous">
<t:graphicImage id="datascrollerPrevious" value="/images/arrow-previous.gif" border="1" />
</f:facet>
<f:facet name="next">
<t:graphicImage id="datascrollerNext" value="/images/arrow- next.gif" border="1" />
</f:facet>
<f:facet name="fastforward">
<t:graphicImage id="datascrollerFastForward" value="/graphics/arrow-ff.gif" value="/images/arrow- ff.gif" border="1" />
</f:facet>
<f:facet name="fastrewind">
<t:graphicImage id="datascrollerFastRewind" value="/images/arrow-fr.gif" border="1" />
</f:facet>
Regards,
Eivind
-----Original Message-----
From: Stefan Puchmann [mailto:[EMAIL PROTECTED] ]
Sent: 21. september 2006 16:36
To: MyFaces Discussion
Subject: Re: AW: Problem with duplicated Ids on t:dataScroller component
Thanks for your reply Stephan,
I have checked your advice, but the result is the same; i also got the same exception.
regards,
Stefan
Strittmatter, Stephan schrieb:
> Hi Stefan,
>
> I often got this, if I modified the jsf-file on the server while it is still running. Remove the generated java/class files, then it should work. Otherwise it is somewhere really a bug...
>
> Regards,
>
> Stephan with 'ph' :-)
>
> -----Ursprüngliche Nachricht-----
> Von: Stefan Puchmann [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 21. September 2006 16:15
> An: MyFaces Discussion
> Betreff: Problem with duplicated Ids on t:dataScroller component
>
> Hi @ all,
>
> I'm currently working on the JBoss Portal where i have one portlet in
> which i want to use the dataScroller from tomahawk.
> I have real looks great sometimes, but the most time I'm getting one
> exception (duplicated ids in the faces tree - original part of the
> exception is at the end of the mail). I have already tried to declare
> fix ids, but it doesn't matter.
>
> my environment:
> JBoss AS 4.0.4.GA
> JBoss Portal 2.4
> JDK 1.5.0_08
> MyFaces 1.1.5-SNAPSHOT
> Tomahawk 1.1.5-SNAPSHOT
>
> Any advice would be helpful ...
>
> Thanks,
> Stefan
>
> //ManagedBean
> public class DummyBean {
>
> public Collection<String> getDummyEntries(){
> return generateDummyEntries("dummy", 50);
> }
>
> public Collection<String> getOtherDummyEntries(){
> return generateDummyEntries("other", 100);
> }
>
> private Collection<String> generateDummyEntries(String prefix, int
> amount){
> Collection<String> col = new Vector<String>();
>
> for(int i=0; i<amount; i++){
> col.add(prefix+"_"+i);
> }
>
> return col;
> }
> }
>
> //JSF Page
> <%@ page contentType="text/html" isELIgnored="false"%> <%@ 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"%>
>
> <f:view>
> <h:form>
> <h:panelGrid columns="2">
> <t:dataTable id="dummy" rows="10"
> value="#{dummyBean.dummyEntries}" var="dummyEntry"
> preserveDataModel="true">
> <t:column>
> <f:facet name="header">
> <t:commandSortHeader columnName="name">
> <h:outputText value="Dummy" />
> </t:commandSortHeader>
> </f:facet>
> <h:outputText value="#{dummyEntry}"/>
> </t:column>
> </t:dataTable>
> <t:dataTable id="otherDummy" rows="10"
> value="#{dummyBean.otherDummyEntries }" var="oDummyEntry"
> preserveDataModel="true">
> <t:column>
> <f:facet name="header">
> <h:outputText
> value="Other Dummies" />
> </f:facet>
> <h:outputText value="#{oDummyEntry}"/>
> </t:column>
> </t:dataTable>
> <t:dataScroller for="" fastStep="10"
> pageCountVar="pageCount" pageIndexVar="pageIndex"
> styleClass="scroller" paginator="true" paginatorMaxPages="9"
> paginatorTableClass="paginator"
> paginatorActiveColumnStyle="font-weight:bold;"
> immediate="true">
> <f:facet name="first">
> <t:graphicImage url="" border="1"
> alt="first" />
> </f:facet>
> <f:facet name="last">
> <t:graphicImage url="">> border="1" alt="last" />
> </f:facet>
> <f:facet name="previous">
> <t:graphicImage url="">> border="1"
> alt="prev" />
> </f:facet>
> <f:facet name="next">
> <t:graphicImage url="" next.gif"
> border="1" alt="next" />
> </f:facet>
> <f:facet name="fastforward">
> <t:graphicImage url="" ff.gif" border="1"
> alt="fastforward" />
> </f:facet>
> <f:facet name="fastrewind">
> <t:graphicImage url="" fr.gif" border="1"
> alt="fastrewind" />
> </f:facet>
> </t:dataScroller>
> <t:dataScroller for="" fastStep="10"
> pageCountVar="pageCount" pageIndexVar="pageIndex"
> styleClass="scroller" paginator="true" paginatorMaxPages="9"
> paginatorTableClass="paginator"
> paginatorActiveColumnStyle="font-weight:bold;"
> immediate="true">
> <f:facet name="first">
> <t:graphicImage url="" first.gif" border="1"
> alt="first" />
> </f:facet>
> <f:facet name="last">
> <t:graphicImage url="" last.gif"
> border="1" alt="last" />
> </f:facet>
> <f:facet name="previous">
> <t:graphicImage url="" previous.gif"
> border="1"
> alt="prev" />
> </f:facet>
> <f:facet name="next">
> <t:graphicImage url="" next.gif"
> border="1" alt="next" />
> </f:facet>
> <f:facet name="fastforward">
> <t:graphicImage url="" ff.gif" border="1"
> alt="fastforward" />
> </f:facet>
> <f:facet name="fastrewind">
> <t:graphicImage url="" fr.gif" border="1"
> alt="fastrewind" />
> </f:facet>
> </t:dataScroller>
> </h:panelGrid>
> </h:form>
> </f:view>
>
>
> //Exception
> org.apache.jasper.JasperException: Client-id : _idJsp9jbp4fc96645first
> is duplicated in the faces tree. Component :
> _idJsp0jbp4fc96645:_idJsp9jbp4fc96645first, path: {Component-Path :
> [Class: javax.faces.component.UIViewRoot,ViewId:
> /WEB-INF/jsp/dataScrollerTest.jsp][Class:
> javax.faces.component.html.HtmlForm,Id: _idJsp0jbp4fc96645][Class:
> javax.faces.component.html.HtmlPanelGrid ,Id: _idJsp1jbp4fc96645][Class:
> org.apache.myfaces.custom.datascroller.HtmlDataScroller,Id:
> _idJsp9jbp4fc96645][Class:
> javax.faces.component.html.HtmlCommandLink,Id: _idJsp9jbp4fc96645first]}
> at
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java :810)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)
> at
> org.jboss.portal.portlet.impl.jsr168.PortletRequestDispatcherImpl.execute(PortletRequestDispatcherImpl.java:87)
> at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.jboss.portal.server.servlet.CommandFilter.doFilter (CommandFilter.java:65)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> at
> org.apache.catalina.core.ApplicationDispatcher.doInclude (ApplicationDispatcher.java:574)
> at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDisp
> atcher.java:499)
>
>
--
Grant Smith

