2 Replies Latest reply: Aug 30, 2013 11:23 AM by RLChristenson RSS

    Cannot get children of DFF bean, always empty

    RLChristenson

      Hello,

       

      I cannot seem to find any children under my DFF bean, even though they render on the page.   Here is my code in the processRequest.  NOTE:  The super.processRequest(pageContext, webBean);  is being called as the first line of the extended controller in which I have the following code.   No matter what I try, i get a nullPointerException at the hasMoreElements() line.  I've tried using getIndexedChildren.  I've even tried looking at the source of the web page and referencing the field directly (it is called DescFlexfields10) but still my java cannot "see" it.  What am I doing wrong?

       

       

                       OADescriptiveFlexBean oaDFF = (OADescriptiveFlexBean)webBean.findChildRecursive("DescFlexfields");
                       String fooit = "<";
                       if (oaDFF == null) {
                           /* throw error */
                           String sException = "ERROR: Cannot find DFF bean";
                           throw new OAException("ICX", sException);  
                       }
                       else {
                           oaDFF.processFlex(pageContext);
                           Enumeration flexChilds = oaDFF.getChildNames(pageContext.getRenderingContext());
                           while(flexChilds.hasMoreElements())
                           {
                           String paramName = flexChilds.nextElement().toString();
                           fooit = fooit + paramName;

       

                           }

       

                       } //DFF bean was found

       

                        throw new OAException("ICX", fooit);
                     

      Thanks!