1 Reply Latest reply on Nov 6, 2012 9:55 AM by Sudipto Desmukh

    Calculated Field In ADF Form

      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
          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.