This discussion is archived
1 Reply Latest reply: Nov 6, 2012 1:55 AM by Sudipto Desmukh RSS

Calculated Field In ADF Form

user10383617 Newbie
Currently Being Moderated
I want to create calculated field.
I have 2 date fields, my user case is to calculate difference between those 2 date field and display difference on the fly to user.
  • 1. Re: Calculated Field In ADF Form
    Sudipto Desmukh Expert
    Currently Being Moderated
    You will need to write custom logic in a method of a managed Bean in your View Controller project.
    follow these steps -

    1)In the ViewController project ,create a java Class called <whatever_name_you want>.java
    2) register the managedBean in TaskFlow->Overview-> Managed Bean say in pageFlowScope.
    3)create a public method which returns a Number (of days or whatever you need) in your bean which calculates difference between the dates using Calender API (You can google for this)
    4)Bind this method to the value property of the field which shows the difference between these fields.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points