Sometimes the value of the inputText component is not refreshed and the value that was previously entered will still persist within the component. To overcome this issue. we have to use the resetValue() method to reset the component value and display the components intial state
What it does:
- Get handle to the inputText component using the JSFUtils find component method with the inputText id passed as a parameter
- set the submitted value of the inputText as null
- reset’s the input component value
- refresh the component
private void resetInputText(String id) { RichInputText input = (RichInputText)JSFUtils.findComponentInRoot(id); input.setSubmittedValue(null); input.resetValue(); AdfFacesContext.getCurrentInstance().addPartialTarget(input); }
Usage:
This method is used to reset the inputText component value’s in a popup, af:formlayout, af:table.