Set values in af:selectManyChoice programmatically – Oracle ADF

Sharing is Caring

This post is about a very common question
How to set selected values in af:selectManyChoice component?
Sometimes we need to set some values in selectManyChoice component on some action

In this post, I am using Departments table of HR Schema to create selectManyChoice (Multiple Selection)
Just drag and drop Departments viewObject as ADF Select Many Choice
see- Using Multiple Selection (selectManyListbox & selectManyCheckbox component) in ADF

(Jdev Version- 12.1.3)
dropped a button on the page and on this button action, setting values in the component
See this simple managed bean code –

import java.util.ArrayList;

import javax.faces.event.ActionEvent;


public class SetValueSmcBean {
    private RichSelectManyChoice selectMcBind;

    public SetValueSmcBean() {

/**Methos to set selected values in SelectManyChoice
 * @param actionEvent
    public void setSelectedValuesAction(ActionEvent actionEvent) {
ArrayList listVal = new ArrayList(20);
        //Add DepartmentId to list that you want to set as selected
        // Set this List as value using component binding
        //Refresh Component on page (partial target)

    public void setSelectMcBind(RichSelectManyChoice selectMcBind) {
        this.selectMcBind = selectMcBind;

    public RichSelectManyChoice getSelectMcBind() {
        return selectMcBind;

run application and check-



Sample ADF Application- Download
Cheers 🙂  Happy Learning

Related Posts

0 thoughts on “Set values in af:selectManyChoice programmatically – Oracle ADF”

  1. 500 Internal Server Error

    while running the application getting this issue please help me on this issue


  2. Thanks for the Blog ,It helped me in my project.

    But after getting the selected element in the selectManyChoice Box while commiting on the same page this component shows error and does not let me to proceed unless i select something in selectManyChoice box manually.


    Please Help!!!!!!!!!!!


  3. Gracias por el Blog. Me ayudó en mi proyecto.

    Pero después de obtener el elemento seleccionado en el cuadro selectManyChoice al comprometerse en la misma página, este componente muestra un error y no me permite continuar a menos que seleccione manualmente algo en el cuadro selectManyChoice.


Leave a Reply

Your email address will not be published. Required fields are marked *