动态设置OAMessageChoiceBean值
在应用中,经常会用到OAMessageChoiceBean的列表值是根据条件从数据库中查出询出来的,下面就是实现方法:
1.定义PickListView VO 如:oracle.apps.ak.wf.poplist.server.WFRoleVO
2.将PickListView VO加入至AM中,如WFRoleVO1
3.动态设置OAMessageChoiceBean
OAMessageChoiceBean choicebean= (OAMessageChoiceBean)webBean.findChildRecursive("ChoiceRole");
choicebean.setPickListCacheEnabled(false);//清空Cache,很重要
if (!choicebean.equals(null))
{
//此处用一定不能用setPickListViewObjectDefinitionName 而用我们AM中的那WFRoleVO1
//这也是我调试了半天的结果,
choicebean.setPickListViewUsageName("WFRoleVO1");
choicebean.setListDisplayAttribute("WrName");
choicebean.setListValueAttribute("WrCode");
}
至此,大功告成!
1.定义PickListView VO 如:oracle.apps.ak.wf.poplist.server.WFRoleVO
2.将PickListView VO加入至AM中,如WFRoleVO1
3.动态设置OAMessageChoiceBean
OAMessageChoiceBean choicebean= (OAMessageChoiceBean)webBean.findChildRecursive("ChoiceRole");
choicebean.setPickListCacheEnabled(false);//清空Cache,很重要
if (!choicebean.equals(null))
{
//此处用一定不能用setPickListViewObjectDefinitionName 而用我们AM中的那WFRoleVO1
//这也是我调试了半天的结果,
choicebean.setPickListViewUsageName("WFRoleVO1");
choicebean.setListDisplayAttribute("WrName");
choicebean.setListValueAttribute("WrCode");
}
至此,大功告成!