Thursday, April 10, 2014

How to reset data on a ADF Form?

Below blog explains about resetting a specific portion of data on a ADF form,
For example, User is editing employee form, which has various components such as form, table etc. If you want to reset data in a specific component, follow below



 public void resetFormFieldsListener(ActionEvent actionEvent)
{
    // check if hte action has a component attatched
    UIComponent uiComp = actionEvent.getComponent();
   
    if (uiComp == null)
    {
        // if not we use the button which we bound to this bean
        uiComp=getButtonResetByBean();
        _logger.info("reset fields: buttonID = " + uiComp.getId());
    }
    else
    {
        _logger.info("reset fields: CompID = " + uiComp.getId());
    }
    // pass component inside the UIForm, UIXForm, UIXSubform, UIXRegion, UIXPopup, RichCarousel
    // or RichPanelCollection which holds the components to reset
    ResetUtils.reset(uiComp);
}

No comments:

Post a Comment