Skip to main content

Posts

Showing posts with the label selectonechoice

ADF: SelectOneChoice ForEach, Filter - Drop down list keeping the first size selected

Ok so I had a bunch of filters all rendered from a backing bean using the forEach tag to render the select items. On updating the table the filters would always have the size of the initially selected item - not good. So if you fist selection had one item in the filter the filter would always be one item big. SOLUTION: Changed from a forEach to a f:SelectItems creating the Select items in my backing bean - everything worked. Nice and simple.     public List<SelectItem> listUniqueSelectItemList(List<String> items) {         List<SelectItem> itemList = new ArrayList<SelectItem>();         if (items != null) {             for (String item : items) {                 itemList.add(createSelectItem(item));             }         }         return itemL...

ADF Defaulting a backing bean driven select: Thing I learned being stupid 1

Jdeveloper 11.1.1.5 Ok, I had a selectonechoice that was driven by a pojo data control and I just couldn't get its value defaulted. The following is what I learned along the way and my unique solution: Drag and drop the item onto the page as a single choice selectonechoice: Add a variable to your page binding (open your page and click on the bindings tab - right click on variables under Executables - insert inside variables - select variable - Name:selectedItemValue Type: java.lang.Object Then click on Page definition file and update the variable you just added and add these attributes DefaultValue=" #{pageFlowScope.TestBean.id} " IsUpdateable="2". NOTE: the bold bit  pageFlowScope.TestBean.id must be the value you want to default to. Or you can just paste the xml like such: <variable Type="java.lang.Integer" Name="selectedItemValue" DefaultValue="#{pageFlowScope.TestBean.id}" IsUpdateable="2" /> ...