Friday, June 19, 2009

Launching an LOV by clicking a link or button 11g

I needed to launch the LOV by clicking a link and found the below solution..

Basically I have a RichInputListOfValues on my page but it is set to invisible and I am using a commandlink to popup the LOV ..
See the code below..

RichInputListOfValues lovComp = getPostingTemplate();

FacesCtrlLOVBinding.ListOfValuesModelImpl lovModel = null;
lovModel =
(FacesCtrlLOVBinding.ListOfValuesModelImpl)lovComp.getModel();
lovModel.performQuery(lovModel.getQueryDescriptor());

LaunchPopupEvent e = new LaunchPopupEvent(lovComp);
e.queue();