Skip to main content

Getting the components tree and setting values at runtime


In some scenario we need to get the chields and set some value or refresh the chield components.
Following code is one example for that.

1.There is one RichPanelGroupLayout with following childerns
      a)RichPanelFormLayout and it has two RichInputText


 RichPanelGroupLayout pGrpLayout = this.cbPopPalGrpLayout;
            List pGrpLayoutList = pGrpLayout.getChildren();
           
            for(int i = 0 ; i < pGrpLayoutList.size() ; i++){
                if(i > 0){
                    RichPanelFormLayout pfl = (RichPanelFormLayout)pGrpLayoutList.get(i);
                    List pflList = pfl.getChildren();
                    for(int j = 0 ; j < pflList.size();j++){
                        if(j > 0){
                            RichInputText rit = (RichInputText)pflList.get(j);
                            rit.setValue(null);
                            rit.setSubmittedValue(null);
                        }
                        
                    }
                
                }
               
            }


cbPopPalGrpLayout is the binding of panelGroupLayout.
 

Comments