Joined: Mar 09, 2008
Since seveal days I'm stumbling over strange Lifecycle-Problem which I don't understand, so perhaps anyone can explain it to me.
The strange behavior At runtime I get an "duplicated component exception" that indicates that Faces tries to add my hidden button twice. The reason for this exception is that the encodeBegin()-method of my custom component is executed twice, and so the same button will be added a second time to my component tree. I'm not able to understand why encodeBegin() is executed twice, any suggestions?
2) Another approach is to modify the encodeBegin()-method of custom component. My first idea was to create a boolean variable which ensure that the code inside of my encodeBegin()-method is executed only once. The first time I access an page where the tag is used this works perfect, but when I try to see the page a second (or third) time (reload) then I see only a blank page..., because the component-code of my encodeBegin() isn't executed.
3) Ok, if option 2 doesn't work, then my next thought was to ensure that only the creation of the button-component inside my custom-component will be created once, so that no duplicated component id exception occurs. At runtime I see my wait-Text, but the the (action)-method of my backing bean is never executed. In debug-mode I see that the encodeBegin()-method is executed over and over, all time, nice endless-loop...