You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Cagatay Civici <ca...@gmail.com> on 2006/03/16 11:19:04 UTC
getChildCount returns 0 at encodeBegin
Hi,
I wonder why this happens,
public void encodeBegin(FacesContext context) throws IOException {
log.debug("ChildCount:" + getChildCount());
}
public void encodeEnd(FacesContext context) throws IOException {
log.debug("ChildCount:" + getChildCount());
}
For example in the jsp page, component's number of children is 3. At
encodeBegin log gives me 0 but at encodeEnd it gives 3.
Also when I override getRendersChildren to return true, encodeBegin log
gives 3 this time.
I'll be glad if you help me out,
Regards,
Cagatay,
Re: getChildCount returns 0 at encodeBegin
Posted by Mike Kienenberger <mk...@gmail.com>.
Don't know if this is of any help to you, but Facelets also corrects
the component tree rendering problem if you can use Facelets.
On 3/29/06, Cagatay Civici <ca...@gmail.com> wrote:
> Hi,
>
> Thanks to Ed Burns, I've learned that this is a JSF issue, at first jsf
> creates the component tree "during rendering components", in JSF 1.2 they've
> fixed this by first creating the tree and then rendering it.
>
> Cagatay Civici,
>
>
> On 3/16/06, Cagatay Civici <ca...@gmail.com> wrote:
> >
> > Hi,
> >
> > I wonder why this happens,
> >
> > public void encodeBegin(FacesContext context) throws IOException {
> > log.debug("ChildCount:" + getChildCount());
> > }
> >
> > public void encodeEnd(FacesContext context) throws IOException {
> > log.debug("ChildCount:" + getChildCount());
> > }
> >
> > For example in the jsp page, component's number of children is 3. At
> encodeBegin log gives me 0 but at encodeEnd it gives 3.
> >
> > Also when I override getRendersChildren to return true, encodeBegin log
> gives 3 this time.
> >
> > I'll be glad if you help me out,
> >
> > Regards,
> >
> >
> > Cagatay,
> >
>
>
Re: getChildCount returns 0 at encodeBegin
Posted by Cagatay Civici <ca...@gmail.com>.
Hi,
Thanks to Ed Burns, I've learned that this is a JSF issue, at first jsf
creates the component tree "during rendering components", in JSF 1.2 they've
fixed this by first creating the tree and then rendering it.
Cagatay Civici,
On 3/16/06, Cagatay Civici <ca...@gmail.com> wrote:
>
> Hi,
>
> I wonder why this happens,
>
> public void encodeBegin(FacesContext context) throws IOException {
> log.debug("ChildCount:" + getChildCount());
> }
>
> public void encodeEnd(FacesContext context) throws IOException {
> log.debug("ChildCount:" + getChildCount());
> }
>
> For example in the jsp page, component's number of children is 3. At
> encodeBegin log gives me 0 but at encodeEnd it gives 3.
>
> Also when I override getRendersChildren to return true, encodeBegin log
> gives 3 this time.
>
> I'll be glad if you help me out,
>
> Regards,
>
> Cagatay,
>