Creating a custom datascroller - duplicate id in the faces tree

Hello,

i try to create a datascroller with :

- a CustomHtmlDataScroller

- a CustomerHtmlDataScrollerTag

- a CustomHtmlDataScrollerRenderer

- a new tld file

- and the definition of component and renderer in faces-config.xml :

...

<component>

<component-type>proj.custom.HtmlDataScroller</component-type>

<component-class>xxx.custom.datascroller.CustomHtmlDataScroller</component-class>

</component>

<render-kit>

<renderer>

<component-family>proj.custom.panel</component-family>

<renderer-type>proj.custom.DataScroller</renderer-type>

<renderer-class>xxx.custom.datascroller.CustomHtmlDataScrollerRenderer</renderer-class>

</renderer>

</render-kit>

...

In java code i change only occurences of "HtmlDataScroller.class" by "CustomHtmlDataScroller.class"

I also change the methods getRenderType and getComponentType in the Tag class to return values described in faces-config.xml file.

So, this component shoulds work like the tomahawk datascroller

Indeed, i have an error :

java.lang.IllegalStateException: Client-id : _id140 is duplicated in the faces tree.

The new scroller has a specific id ... not _id140

Do you already have a similar behaviour ?

Thanks.

[1427 byte] By [spirouuua] at [2007-10-3 5:23:56]
# 1

I add ids to images of dataScroller like this :

<a:dataScroller

id="scroll_line"

for="lineData"

styleClass="scroller"

paginator="false"

renderFacetsIfSinglePage="false"

>

<f:facet name="first">

<t:graphicImage url="images/arrow-first.gif" border="0" alt="#{msg['scrollerFirst']}" id="imgfirst" />

</f:facet>

<f:facet name="previous">

<t:graphicImage url="images/arrow-previous.gif" border="0" alt="#{msg['scrollerPrevious']}" id="imgprevious" />

</f:facet>

<f:facet name="last">

<t:graphicImage url="images/arrow-last.gif" border="0" alt="#{msg['scrollerLast']}" id="imglast"/>

</f:facet>

<f:facet name="next">

<t:graphicImage url="images/arrow-next.gif" border="0" alt="#{msg['scrollerNext']}" id="imgnext"/>

</f:facet>

</a:dataScroller>

Now the error is :

javax.servlet.ServletException: Client-id : imgfirst is duplicated in the faces tree.

I try to remove all images of datascroller, and it works fine, but without images and facets, the datascroller is useless :-D

I don't understand why images make the problem !

May be i use the wrong java sources !

(i found it on http://svn.apache.org/viewvc?view=rev&revision=168000)

spirouuua at 2007-7-14 23:31:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...