Friday, March 8, 2013

ADF 11G : How to reset all child component Programatically?

ADF 11G : How to reset all child component Programatically?

private void resetValueInputItems(AdfFacesContext adfFacesContext,


UIComponent component){

List items = component.getChildren();

for ( UIComponent item : items ) {



resetValueInputItems(adfFacesContext,item);



if ( item instanceof RichInputText ) {

RichInputText input = (RichInputText)item;

if ( !input.isDisabled() ) {

input.resetValue() ;

adfFacesContext.addPartialTarget(input);

};

} else if ( item instanceof RichInputDate ) {

RichInputDate input = (RichInputDate)item;

if ( !input.isDisabled() ) {

input.resetValue() ;

adfFacesContext.addPartialTarget(input);

};

}

}

}