Loading...
https://oraclebpmonlinetraining.blogspot.com/2015/08/getting-value-from-selectonechoice-.html
One
of the Issue I found when I use af:selectOneChoice component that when I want
to get the selected value from one of the selectOneChoice attribute from
backingbean I found the return value is the index of selected value not the
value. (Using HR Schema)
assume
we have an EmployeesView which has a DepartmentId (as a lookup to
DepartmentView) and want to get the the value of selected Department. To solve
this problem do this :
JUCtrlListBinding
listBinding =(JUCtrlListBinding)bindings.get("DepartmentId");
Row
selectedValue = (Row) listBinding.getSelectedValue();
System.out.println(selectedValue.getAttribute("DepartmentId"));
Where:
-
DepartmentId the selectOneChoice Attribute
which
you want to get its value.
-
selectedValue is the row of the lookup attribute (In this case will be the row
of the selected department).
VirtualNuggets
7438971605825542590
Post a Comment
Home
item
