Google Analytics

Thursday, September 24, 2015

ADF LOV reset the values.

ADF Lov valu can be reset as below (Lov default value set to null) . Presentation

UI component
 

<af:selectOneChoice value="#{bindings.BILLING_CITY.inputValue}"
                              label="#{bindings.BILLING_CITY.label}"
                              shortDesc="#{bindings.BILLING_CITY.hints.tooltip}"
                              id="BILLING_CITY1Id" autoSubmit="true"
                              binding="#{pageFlowScope.xxxBean.billingPostalCode}"
                              showRequired="true">
            <f:selectItems value="#{bindings.BILLING_CITY.items}"
                           id="selectItems1"/>
</af:selectOneChoice>

Bean

setEL("#{bindings.BILLING_CITY.inputValue}",null);


public static void setEL(String el, Object val) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ELContext elContext = facesContext.getELContext();
        ExpressionFactory expressionFactory =
            facesContext.getApplication().getExpressionFactory();
        ValueExpression exp =
            expressionFactory.createValueExpression(elContext, el,
                                                    Object.class);

        exp.setValue(elContext, val);
    }

No comments:

Post a Comment