且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用部门名称而不是部门 ID 在员工表上搜索 (UI)

更新时间:2023-02-05 12:31:33

"如果只能在查看条件中添加departmentID,如何查找部门名称?"

"How do I search department name if I can only add departmentID in the view criteria?"

我假设您只能添加部门 ID,因为它是您的视图对象的唯一属性.在这里,您似乎混淆了 oracle adf 中的视图对象和实体对象.

I assume you can only add departmentID because it's the only attribute of your View Object. Here it look like you are confusing view object and entity object in oracle adf.

在 oracle ADF 中,您的实体对象将映射您的数据库对象.因此,在您的情况下,您将有 2 个实体对象,一个用于员工表,另一个用于部门表.

In oracle ADF your Entity object will map your database object. So in your case you'll have 2 Entity Object, one for the employee table and another for the department table.

您在此处的视图对象可以加入两个实体对象值.因此,在您的情况下,您将创建一个视图对象,该对象基于您的 Employee 和 Department 实体对象,并正确连接您的 DepartmentID 属性.

Your View Object here can join both Entity Object Value. So in your case you'll create a view object that is base on your Employee and Department Entity Object with a correct join on your departmentID attribute.

此视图对象现在具有实体对象(和表)的所有属性,因此您可以使用您感兴趣的属性创建一个视图标准.

This View Object now have all the attributes from both Entity Object (and Table) so you can create a View Criteria with the attribute you are interessted in.