LOV 之Text Field LOV

Text Field LOV

文本域LOV

As illustrated in Figures 1 and 3 above, a Text Field LOV is an updateable text field with an associated 

flashlight icon. Its behavior at runtime depends on your configuration decisions. 

如上面所看到的圖1和圖3,一個文本域的LOV是一個帶有一個照燈圖標可更新的文本域,它的運行時行爲依賴於你們配置

Declarative Implementation

顯示實現方式

 

Driving View Object Based on Entity Objects

使用基於EOVO

If the view object that you are updating with the LOV selection results is based on entity objects, and your LOV 

will be returning values mapped to entity-object based attributes on one or more reference entity objects: 

如果你的使用LOV選擇器編輯的VO是基於EO的,如果LOV返回的值是映射到EO的一個或多個屬性:

1.  You must define associations between the driving entity and each reference entity. 

2.  In the view object definition wizard, you must configure each reference entity object's Association End 

as Reference and Read Only. 

1、你必須定義關於EO和其所關聯之前的association

2、在VO的嚮導,你必須使用EO的關聯,並設爲只讀

For example, assume you define a page to create a purchase order including an LOV to select a supplier: 

y The LOV returns a SUPPLIER_ID foreign key value for update on the purchase order 

(PurchaseOrderEO), and a SUPPLIER_NAME value to display in the UI. 

例如,假設你定義了一個頁面來創建一個定單,裏面包括了一個LOV去選擇供應商:

1、LOV返回一個供應商ID(外鍵)去更新定單表(PurchaseOrderEO),也同時返回供應商名稱來顯示在UI

2、供應商名稱映射到EO的一個屬性(SupplierEO.SUPPLIER_NAME)

3、有一個關聯PoToSupplierAO是關於PurchaseOrderEO.SUPPLIER_ID和SupplierEO.SUPLIER_ID

y The SUPPLIER_NAME value is mapped to a reference entity object attribute 

(SupplierEO.SUPPLIER_NAME). 

y There is a reference association (PoToSupplierAO) that joins the PurchaseOrderEO.SUPPLIER_ID 

and the SupplierEO.SUPLIER_ID. 

當你配置VO通過PoToSupplierAO來關聯SupplierEO 的時候,你必須檢查Read onlyReference 的屬性

When you configure the purchase order view object to reference the SupplierEO via the PoToSupplierAO, you 

must check both the Read Only and Reference properties. 

If you follow these instructions, the OA Framework does not attempt to write any values on reference entities 

(thereby avoiding a BC4J runtime error regarding updates to a Read Only entity), and BC4J's standard faulting 

mechanism is used to automatically query the reference values as needed. 

如果你就是像上面所描述,OAF框架不會在關聯的實體寫入任務值,從而避免在BC4J運行器上給一個只讀的實體更新數據的錯誤,如果有需要,BC4J的標準機制是使用於自動查詢相關聯的值

 

377

LOV View Object and Application Module

Step 1: As described in Implementing the Model, define a view object for your list of values query (note that the 

OA Framework File Standards recommend creating this application module in the 

oracle/apps/<app_short_name>/<module>/lov/server directory). 

第一步:如實現MODEL所描述那樣,爲你的值列表定義一個VO(注意OAF文件標準推薦這個AM建立在oracle/apps/<app_short_name>/<module>/lov/)

y This view object should include all the columns you want to display in the LOV results table, and any 

hidden values that you want to return when the user makes a choice. For example, a view object for 

selecting a buyer might include BUYER_NAME (displayed value), BUYER_ID (hidden primary key), 

and JOB_TITLE (displayed value). 

1、這個VO必須包括LOV裏的所有字段,還包括返回的字段;例如,一個選擇購買都的VO應該包括一個買方姓名(顯示值),一個買方ID(隱藏主鍵),一個職位名稱(顯示值)

2、你不需要包括在基礎頁面where條件裏的字段,OAF框架會自動生成基於LOV條件的where語句和綁定值

y You do not need to include a WHERE clause for the base page search criteria items; the OA 

Framework automatically appends an appropriate WHERE clauses and bind variables based on the 

LOV criteria. That said, however, your LOV can include a WHERE clause that always restricts the 

result set (for example, an END_DATE check for a "Currently Employed Buyers" LOV). 

y The view object for the LOV region can be based on an entity object, but given its limited data 

selection, it's typically created using plain SQL. 

3、LOVVO可以基於一個EO,但如果只提供有限的選擇,一般都基於SQL語句

 

Step 2: If you have not already done so, create a dedicated application module (AM) to contain all view objects 

that are shared by a package or module (note that the OA Framework File Standards recommend creating this 

application module in the oracle/apps/<app_short_name>/<module>/lov/server directory). Add the view object 

that you created in Step 1 to this application module. 

第二步:如果你沒有一個包括全部VOAM,那麼你應該像第一步那樣創建VO,並且包含在AM裏(OAF文檔標準建議你在oracle/apps/<app_short_name>/<module>/lov/server創建AM

 

 

Note:Do not designate this application module as being passivation-enabled (it isn't a real root application 

module). 

 

(注意:別設置這個AM爲啓用鈍化,因爲這不是真正的根AM

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章