Reset Page Data on Page Load
Hi Guys,Sometimes we Require to reset the values of component on Page load.
Below are the implementation steps which we can follow-
S1- Get handle to the input Text component using the JSFUtils find component method with the input Text id passed as a parameter.
S2- set the submitted value of the input Text as null.
S3- reset the input component value.
S4- refresh the component.
Write the below code in On Page load event.
private void resetPageData(String id) {
RichInputText input = (RichInputText)JSFUtils.findComponentInRoot(id);
input.setSubmittedValue(null);
input.resetValue();
AdfFacesContext.getCurrentInstance().addPartialTarget(input);
}
Cheers Guys :)
No comments:
Post a Comment