Monday, August 22, 2011

ADF service based lov and query

I want to have a LOV/ query backed by a webservice in adf.

Looks like I am going to have to implement some code for this ()

XCode - Bound to a returned service value for now.


<af:inputListOfValues id="XCode"
  popupTitle="Search and Select: #{bindings.XCode.hints.label}"
  value="#{bindings.XCode.inputValue}" label="#{bindings.XCode.hints.label}"
  model="#{viewScope.backingBean.listOfValuesDataModel}"
  required="#{bindings.XCode.hints.mandatory}"
  shortDesc="#{bindings.XCode.hints.tooltip}" styleClass="colspec_fshort"/>


Map your service and execute. In the listOfValuesDataModel method.
      Object ob = ADFUtils.executeOperationBinding("findCodeTypesVO", new HashMap());

Map that to a custom implementation of oracle.adf.view.rich.model.ListOfValuesModel and return it.
There is a nice example of how to do this in the ADF demo application code. oracle.adfdemo.view.lov.DemoLOVBean


http://download.oracle.com/otn/java/jdeveloper/111/extensions/adf-richclient-demo.war

Will post more once I have implemented some more.


No comments:

Post a Comment