Yeah problem located.

A mistake during the generation of delegate methods from my component to
my component state (getXXX() return state.getXXX()), i also made a
delegate call to equals(), resulting in the parent arrayList's
impossibility to remove() it's child. Facelets is doing a remove() /
add() to relocate component at correct position in parent tree while
re-reading template. The remove was not removing my component because
equals() was broken on it, sic. A half second distraction during
delegates creation, 3 hours lost debugging :p
David Delbecq a écrit :
> Hello,
>
> I have a problem with a component inside facelet (this component works
> perfectly inside jsp)
>
> Here is the component use in my show.xhtml file
>
> <h:form id="fillform"
>                         rendered="#{sharkEngine.currentActivity !=null}"
> enctype="multipart/form-data">
>                         <h:outputText value="testing...."/>
>                         <s:parameters
> popupDocument="/secure/jsp/selectElement.faces" rowId="row"
>                             value="#{sharkEngine.currentActivityParameters}"
>                             rowHeaders="parameterDescription" rowFooters=""
>                             id="parameters"
> mark="#{sharkEngine.currentActivity.key}">
>                       <!-- some facets here -->
> </h:form>
>
> The component has it's own renderer, and render by itself it's childrens
>
> The layout of page consist of 2 forms, one form let me select an
> 'activity', one other form (the fillform) let me edit it.
> When i first come to show.xhtml all goes well. But if i invoke a select
> activity command link, that finally end up as expected to rendering same
> page after action, my custom component gets rendered twice. Exactly the
> same way. One time before the <h:outputText>, and one time at correct
> place. Both times it's from the same instance. It is in fact somehwere
> reattached a second time to it's parent (the form). If i then clik again
> the command link, it gets rendered 3 times. Out of those 3 times, It
> gets rendered 2 times from the same java component instance. If i click
> again, it's 4 times, out of those 4 times, it's 2 times from the same
> java instance. Somehow, somewhere with facelets, my component gets
> reattached a second time at beginning of parent form.
>
> Any idea what i might be doing wrong with my custom component that make
> it get duplicated inside facelets but not inside jsp / default view handler?
>   

Reply via email to