protected void createChildrenWidgets(SourcePrinter out,WidgetCreatorContext context){
  JSONArray children=ensureChildren(context.getWidgetElement(),true,context.getWidgetId());
  if (children != null) {
    for (int i=0; i < children.length(); i++) {
      JSONObject child=children.optJSONObject(i);
      if (isWidget(child)) {
        String childWidget=createChildWidget(out,child,context);
        boolean childPartialSupport=hasChildPartialSupport(child);
        if (childPartialSupport) {
          out.println("if (" + getChildWidgetClassName(child) + ".isSupported()){");
        }
        out.println(context.getWidget() + ".addAndReplaceElement(" + childWidget+ ", "+ EscapeUtils.quote(ViewFactoryUtils.getEnclosingPanelPrefix())+ "+"+ getViewVariable()+ ".getPrefix()+"+ EscapeUtils.quote(child.optString("id"))+ ");");
        if (childPartialSupport) {
          out.println("}");
        }
      }
    }
  }
}

protected void createChildrenWidgets ( SourcePrinter out , WidgetCreatorContext context ) { JSONArray children = ensureChildren ( context . getWidgetElement ( ) , true , context . getWidgetId ( ) ) ; if ( children != null ) { for ( int i = 0 ; i < children . length ( ) ; i ++ ) { JSONObject child = children . optJSONObject ( i ) ; if ( isWidget ( child ) ) { String childWidget = createChildWidget ( out , child , context ) ; boolean childPartialSupport = hasChildPartialSupport ( child ) ; if ( childPartialSupport ) { out . println ( "if (" + getChildWidgetClassName ( child ) + ".isSupported()){" ) ; } out . println ( context . getWidget ( ) + ".addAndReplaceElement(" + childWidget + ", " + EscapeUtils . quote ( ViewFactoryUtils . getEnclosingPanelPrefix ( ) ) + "+" + getViewVariable ( ) + ".getPrefix()+" + EscapeUtils . quote ( child . optString ( "id" ) ) + ");" ) ; if ( childPartialSupport ) { out . println ( "}" ) ; } } } } }
generate the children creation code for htmlpanel .
