You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by arti <ar...@tambas.at> on 2006/04/21 12:25:19 UTC

getChildren().iterator() problem

Hi,
 
I am facing a problem with getChildren().iterator(). (using
getChildren().listIterator() works perfect)  Why?
 
My custom table component has just one child column element in it. 
 
But still the iterator obtained as mentioned above, enters the following
loop twice and second time throws NullPointerException
 
    Iterator kids = myComponent.getChildren().iterator();
    if (kids.hasnext()) {
        do {
            UICompoment child = kids.next();            // this line
throws NullPointerException when executed second time in loop
            /* some code here */
        } while (kids.hasnext());
    }
 
Thanks
Arti