Some times we need to apply some logic on our business , today we will talk about how we can display editable row based on entity object as a read only just when our conditions appear.
For example if we need to display editable row as read only when employee salary greater than 15000$.
To do that we need to override isAttributeUpdateable( ) inside the EntityObjectImpl class.
Then we need to add business logic inside this method, in our example business logic will be :
As you will see if the method return true then the row is editable, else if the method return false then the row is read only, Now run your application module or page to do the test :
Also in the page you can see the first three rows is read only based on employee salary :
You can download the sample from here - Display Editable Row ( rar ) - JDev 11.1.2.4
For example if we need to display editable row as read only when employee salary greater than 15000$.
To do that we need to override isAttributeUpdateable( ) inside the EntityObjectImpl class.
Then we need to add business logic inside this method, in our example business logic will be :
As you will see if the method return true then the row is editable, else if the method return false then the row is read only, Now run your application module or page to do the test :
Employee Salary = 17000, Condition result = true. |
Employee Salary = 9000, Condition result = false. |
Employee Salary in the first three rows is (24000, 17000, 17000) |
You can download the sample from here - Display Editable Row ( rar ) - JDev 11.1.2.4
Comments