JavaDoc
getLovCriteriaItems
public Dictionary getLovCriteriaItems()
- Used from an LOV region's controller to find out all the values of the passive criteria mappings for that LOV. The returned dictionary is keyed by the name of the LOV region's item.
從一個LOV區(qū)域的控制器找到為該LOV設(shè)置的被動的標(biāo)準(zhǔn)映射的所有值。返回的Dictionary 以LOV region的Item作為Key。
- Returns:
- Dictionary containing all the names of the LOV region's items that are specified in passive criteria mappings. The corresponding values are what were typed in by the user in the mapped base item. The item name is the key.
- Dictionary 包含LOV region的item的名字,這些Item被指定在被動的標(biāo)準(zhǔn)映射里。item的名字是key。
getLovCriteriaViewAttrNames
public Dictionary getLovCriteriaViewAttrNames()
- Used from an LOV region's controller to find out all the values of the passive criteria mappings for that LOV. The returned dictionary is keyed by the view attribute name of the LOV region's item.
從LOV region的控制器找到該LOV的被動的標(biāo)準(zhǔn)映射的所有值。返回的dictionary 是以LOV region的item的視圖屬性名為key的。
- Returns:
- Dictionary containing all the view attribute name of the LOV region's items that are specified in passive criteria mappings. The corresponding values are what were typed in by the user in the mapped base item. The view attribute name is the key.
注意,這兩個方法必須寫在LOV region的控制器里:
- Dictionary dictionary = pageContext.getLovCriteriaViewAttrNames();
- // Dictionary dictionary = pageContext.getLovCriteriaItems();
- int num = dictionary.size();
- Enumeration keys = dictionary.keys();
- Enumeration elements = dictionary.elements();
-
- System.out.println( " dictionary.size() = " + num + ",");
- int i = 0;
- while (keys.hasMoreElements()) {
- System.out.println( " key[" + i + "] = " + keys.nextElement().toString() + ",");
- i++;
- }
- System.out.println(" out key loop i = " + i + ",");
- i = 0;
- while (elements.hasMoreElements()) {
- System.out.println(" element[" + i + "] = " + elements.nextElement().toString() + ",");
- i++;
- }
- System.out.println(" out element loop i = " + i + ",");
在Base Page上獲得Lov是否觸發(fā),使用pageContext .isLovEvent(),可以通過pageContext.getLovInputSourceId()獲得觸發(fā)該事件的頁面上LovInput的名稱。
可以通過pageContext.getLovResultsFromSession(lovInputSourceId)獲得Lov的返回值,用一個HashTable來傳遞。