Created
September 19, 2011 12:58
-
-
Save ramannanda9/1226450 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void resetAttributes(UIComponent rootComponent,AdfFacesContext adfFacesContext){ | |
List<UIComponent> items = rootComponent.getChildren(); | |
for ( UIComponent item : items ) { | |
resetAttributes(item,adfFacesContext); | |
if ( item instanceof RichInputText ) { | |
RichInputText input = (RichInputText)item; | |
if ( !input.isDisabled() &&!input.isReadOnly() ) { | |
input.setValue(null); | |
adfFacesContext.addPartialTarget(input); | |
} | |
} else if ( item instanceof RichInputDate ) { | |
RichInputDate input = (RichInputDate)item; | |
if ( !input.isDisabled() &&!input.isReadOnly() ) { | |
input.setValue(null); | |
adfFacesContext.addPartialTarget(input); | |
} | |
} | |
else if( item instanceof RichSelectOneChoice){ | |
RichSelectOneChoice input=(RichSelectOneChoice)item; | |
if(!input.isDisabled()&&!input.isReadOnly()){ | |
input.setValue(null); | |
adfFacesContext.addPartialTarget(input); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment