Entity business logic unit

Source: Internet
Author: User

Overview

The business logic unit is provided in Oracle ADF, which is very practical in practical applications, the verification logic of the record varies depending on the field value of different records in the table. This article describes how to apply business logic unit.

Requirement

According to the job_id of different records in the Employees table, add different verification logic for its salary. In this example, set the Label display and verification logic for the salary attribute of the employee whose job_id is ad_vp.

Implementation

1. Create an ADF Application

2. Create entity object and view object according to the Employees table in HR schema, create application module, and add the instance of this view object to the data model in application module

 

3. Open employees entity object and add the business logic groups named "jobidgroup" to its General Panel. Here, select "group discriminator attribute" as jobid

3. Add business logic unit for the employees entity object, right-click the entity object, and select:

4. Create a business logic unit and fill in the relevant information:

5. Select attributes panel in the created business logic unit. Because you need to set the authentication logic for the salary attribute of the employee whose job_id is ad_vp, override this attribute is required.

6. Set the control hints of this attribute and set the label text of salary to ad_vp salary.

7. Add verification and set salary's upper limit to 100000. If the upper limit is exceeded, an error message is displayed.

8. Run the application and view the result.

 

This article is transferred from Oracle Seeker: http://oracleseeker.com/2009/11/12/adf_entity_business_logic_unit/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.