How to use Hetero-list as a multi-selectbox

82 views
Skip to first unread message

mnpoonia

unread,
Feb 10, 2016, 8:39:55 AM2/10/16
to Jenkins Developers
Can hetero-list be used as multi-select checkbox? 
If yes,how to use Hetero-list as a multi-select box to populate list from java and then send the selected data as List<String back to @dataBoundConstructor.

Suppose i have data as A,B,C,D,E and i want to show it as multi-check box in view and when user select some of them suppose (A,C,D are selected), then i would like to capture that data as List<String> in my java DataBoundConstructor.

Robert Sandell

unread,
Feb 12, 2016, 11:18:54 AM2/12/16
to jenkin...@googlegroups.com
heteroList is used for selecting and configuring describables (like BuildSteps) So it might be a bit of an overkill to use that in your example. But at the same time I'm not sure if there is any alternatives available for what you are looking for.

It can most likely be solved by something hacky like just iterating over the alternatives and produce an f:checkbox where all the alternatives has the same name attribute set.

/B

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5149ba7a-4750-415d-b1c4-c77ccb4bf63a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.
Reply all
Reply to author
Forward
0 new messages