2 Replies Latest reply: Feb 20, 2013 10:37 AM by Kaja Rajesh RSS

    How to Get ADF LOV Binding in Custom Managed Bean

    Kaja Rajesh
      Hi,

      We have a Requirement to add a Dynamic Where Clause to the LOV in Fusion Compensation App. For this I have created a Custom Managed Bean with Backing bean Scope.

      In Managed bean, I am unable to get the LOV Binding by using below Code. I want to get LOV binding and then Get the handle on View Object so that i can add Custom Where Clause.

      LOV Component Definition

      *<af:column sortProperty="ProposedJob" filterable="false" sortable="true"*
      rendered="false" id="ProposedJob" width="150"
      *headerText="#{bindings.WorksheetOption5VO.hints.ProposedJob.label}">*
      *<af:inputComboboxListOfValues id="iProposedJob"*
      *popupTitle="#{ResourcesGenBundle['Header.SearchandSelect.Searchandselectanobjectusingad']}: #{bindings.WorksheetOption5VO.hints.ProposedJob.label}"*
      *value="#{row.bindings.NameForNewJob.inputValue}"*
      *simple="true"*
      *model="#{row.bindings.NameForNewJob.listOfValuesModel}"*
      *required="#{bindings.WorksheetOption5VO.hints.NameForNewJob.hints.mandatory}"*
      *columns="#{bindings.WorksheetOption5VO.hints.NameForNewJob.hints.displayWidth}"*
      *shortDesc="#{bindings.WorksheetOption5VO.hints.NameForNewJob.hints.tooltip}"*
      *autoSubmit="true"*
      *valueChangeListener="#{backingBeanScope.WorksheetActionsBean.setAttribute}"*
      *readOnly="#{backingBeanScope.RewardsBean.readOnly || row.ProcessingStatus=='PROCESSED'}"*
      *rendered="#{row.EligibilityStatus==row.Eligible}">*
      *<f:validator binding="#{row.bindings.NameForNewJob.validator}"/>*
      *</af:inputComboboxListOfValues>*
      *</af:column>*

      And My Managed Bean Code


      *BindingContext bctx = BindingContext.getCurrent();*

      *BindingContainer bindings = bctx.getCurrentBindingsEntry();*
      *JUCtrlListBinding lov1 =*
      *(JUCtrlListBinding)bindings.get("NameForNewJob");*

      I am getting Null Lov Binding. Am i Doing anything wrong?