Tuesday, September 17, 2013

ADF UI: UI Elements Data Without VO

1- Managed Bean:

  • Steps:
    • Highlight the UI Element you dropped from component palette  
    • Go to property inspector -> Advanced tab
    • Edit binding to an attribute (say xAttr) in bean
    • In setXAttr add the default value by xAttr.setValue(Object);


2- POJO data control
  • Steps:
    • Make a new java class in model project
    • Make properties you want (ex: name, age) and set the default values
    • Generate properties accessors (right-click -> Generate Accessors)
    • Right-Click in code and select 'Generate Data Control'
    • You now can use binding to set and get values


3- Variable Binding

  • Steps:
    • Go to executable tab in binding screen 
    • Right-Click in variables and select from insert in variables a variable 
    • Add variable name and type
    • Select the variable and in property inspector add it's default value
    • Highlight the UI Element you dropped from component palette  
    • Select Value property from general tab in property inspector
    • add binding to the variable you created

No comments:

Post a Comment