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区域的控制器找到为该LOV设置的被动的标准映射的所有值。返回的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被指定在被动的标准映射里。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的被动的标准映射的所有值。返回的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是否触发,使用pageContext .isLovEvent(),可以通过pageContext.getLovInputSourceId()获得触发该事件的页面上LovInput的名称。
可以通过pageContext.getLovResultsFromSession(lovInputSourceId)获得Lov的返回值,用一个HashTable来传递。