I have a requirement to display list of items in a Dropdown in CAF and the dropdown items appear to be bit complex which is as follows :
****Header1
----SubHeader1
A
B
C
D
----SubHeader2
E
F
G
H
****Header2
----SubHeader1
G
H
I
J
----SubHeader2
K
L
M
N
----SubHeader2
O
P
Q
R
<--------------n number of times----------->
Could someone give some tips on how i could go about this requirement ?
Thank you for posting your replies . In my case the Header , Subheader all are dynamic which i get from a different end system . So having Header and Subheader as options i suppose would be little tricky . Between i should have mentioned this in my first post that everything would be dynamic , I am sorry about that.
It can be done using this default constructor "DefaultSelectItemProvider(String label, Object value, String description, boolean disabled, String style, String icon)
Initializes this provider with everything it needs "
All you need to do is like, have your list which needs to be there in the dropdown which includes headers and sub headers in the list as well. Create your custom GroupProvider and add the options into that using DefaultSelectItemProvider with above said constructor making required items disabled true.