Getting selected values from selectManyChoice component inside valueChangeListener

Hwo do I get the selected values from the selectManyChoice component inside the valueChangeListener.
The API docs for valueChangeEvent.getNewValue() show the return type as java.lang.object. This is good for single value what does it return in case of multiple values.
My drop down has string values so I am expecting a set of string values.

JDev - 11.1.2.3
public void onRegionSelect(ValueChangeEvent event) {
event.getComponent().processUpdates(FacesContext.getCurrentInstance());
if (!PhaseId.INVOKE_APPLICATION.equals(event.getPhaseId())) {
event.setPhaseId(PhaseId.INVOKE_APPLICATION);
event.queue();
} else {
List<Object> values = Arrays.asList(event.getNewValue());
System.out.println("Value changed ==>> "+values.size());
DCBindingContainer dc =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter = dc.findIteratorBinding("RegVO1Iterator");
ViewObject vo = iter.getViewObject();
StringBuffer regions = new StringBuffer();
for(Object index : values){
String iIndex = (String)index;
Row row  = vo.getRowAtRangeIndex(Integer.parseInt(iIndex));
regions.append((String)row.getAttribute("Region")+",");
String reg = regions.toString();
if(reg.endsWith(","))
reg = reg.substring(0,reg.lastIndexOf(","));
System.out.println(reg);

Similar Messages

  • How to get selected value from SelectOneChoice

    Hi,
    I'm facing a problem to get selected value from SelectOneChoice. I have valueChangeListener event on a (SelectOneChoice)item. After user makes a choice I want to store selected value in a bean property to pass it to a method.
    For example List item shows dname from dept table after user makes a choice I want to get deptno and populate into bean which I use to pass into my method.
    If I use valueChangeEvent.getNewValue() I always get negative value instead I want deptno selected. Sample code pasted below.
    public void setDeptno(ValueChangeEvent valueChangeEvent) {
    BindingContainer b = getBindings();
    OperationBinding oB = b.getOperationBinding("setDeptno");
    //Checking instance of because same method is called from another text inputText item.
    if (valueChangeEvent.getSource() instanceof CoreSelectOneChoice){
    CoreSelectOneChoice cN = (CoreSelectOneChoice)valueChangeEvent.getSource();
    if (columnName.getId().toString().equals("deptDname")){
    JSFUtils.setManagedBeanValue("dept.deptDeptno",valueChangeEvent.getNewValue());
    }

    if your selectOneChoice has value equal to #{bindings.deptno} bound to the iterator Dept1Iterator,
    then the backing code will look more like
                    public void setDeptno(ValueChangeEvent valueChangeEvent) {
                        BindingContainer b = getBindings();
                        OperationBinding oB = b.getOperationBinding("setDeptno");
                        //Checking instance of because same method is called from another text inputText item.
                        if (valueChangeEvent.getSource() instanceof CoreSelectOneChoice){
                            CoreSelectOneChoice cN = (CoreSelectOneChoice)valueChangeEvent.getSource();
                        if (columnName.getId().toString().equals("deptDname")){
                            FacesContext ctx = FacesContext.getCurrentInstance();
                            Application app = ctx.getApplication();
                            ValueBinding bind = app.createValueBinding("#{bindings.Dept1Iterator.currentRow}");
                            Row row = (Row)bind.getValue(ctx);
                            JSFUtils.setManagedBeanValue("dept.deptDeptno", row.getAttribute("deptno"));
                    } I haven't tested it, so it could perfectly not work at all

  • How to get selected value from selectOneRadio ???

    Hi...i want to how to get selected value from selectOneRadio and use it in another page and in backing bean.
    Note i have about 10 selectOneRadio group in one page i want to know value of each one of them.
    Plzzzzzzzz i need help

    You have a datatable in which each row is a question, correct?
    Also in each row you have 5 possible answers that are in a radio, correct?
    So,
    You need to put in your datatable model, a question, and a list of answers (5 in yor case) and the selected one.
    So you will have a get to the question, an SelectItem[] list to populate the radios and another get/set to the selected question.
    ex:
    <h:selectOneRadio value="#{notas.selectedString}" id="rb">
    <f:selectItem itemValue="#{notas.valuesList}"/>
    </h:selectOneRadio>
    Search the web for examples like yours.

  • How to get selected value from OADefaultListBean.

    Hi All,
    How to get selected value from OADefaultListBean ?
    Thanks,

    Hi,
    To identify the user's selection(s) when the page is submitted, you would add the following logic to your processFormRequest() method:
    OADefaultListBean list =
    (OADefaultListBean)webBean.findChildRecursive("positionsList");
    String name = list.getName();
    String[] selectedValues = pageContext.getParameterValues(name);
    To retrieve all the values in the list box, call list.getOptionsData().
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Dvt:pivotFilterBar - how to get selected values from filter

    Hi all,
    I have a question: how to programmatically get selected values from pivot table's filter bar?
    I have tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);but for page edge dimensions it returns BAD DATA, it seems that it returns some cached values.
    Environment: JDev 11.1.1.3.0 without any patches.
    thanks,
    Miroslaw

    Hi,
    You can retrieve the selected value in the PivotFilterBar through the model of PivotFilterBar, instead of dataaccess:
    // get the model from the pivot filter bar instance
    QueryDescriptior queryDescriptor = (QueryDescriptor)pivotFilterBar.getValue();
    // retrieve a list of criterion, each one is used to populate each lov within the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion();
    List<Criterion> criterionList = conjunctionCriterion.getCriterionList();
    for (int i=0; i<_criterionList.size(); i++) {
    AttributeCriterion criterion = (AttributeCriterion)criterionList.get(i);
    // _selected is the currently selected value
    Object selected = criterion.getValues().get(0);
    System.out.println(_selected);
    Hope that helps,
    Chadwick

  • Swing: when trying to get the values from a JTable inside an event handler

    Hi,
    I am trying to write a graphical interface to compute the Gauss Elimination procedure for solving linear systems. The class for computing the output of a linear system already works fine on console mode, but I am fighting a little bit to make it work with Swing.
    I put two buttons (plus labels) and a JTextField . The buttons have the following role:
    One of them gets the value from the JTextField and it will be used to the system dimension. The other should compute the solution. I also added a JTable so that the user can type the values in the screen.
    So whenever the user hits the button Dimensiona the program should retrieve the values from the table cells and pass them to a 2D Array. However, the program throws a NullPointerException when I try to
    do it. I have put the code for copying this Matrix inside a method and I call it from the inner class event handler.
    I would thank you very much for the help.
    Daniel V. Gomes
    here goes the code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import AdvanceMath.*;
    public class MathF2 extends JFrame {
    private JTextField ArrayOfFields[];
    private JTextField DimOfSis;
    private JButton Calcular;
    private JButton Ativar;
    private JLabel label1;
    private JLabel label2;
    private Container container;
    private int value;
    private JTable DataTable;
    private double[][] A;
    private double[] B;
    private boolean dimensionado = false;
    private boolean podecalc = false;
    public MathF2 (){
    super("Math Calcs");
    Container container = getContentPane();
    container.setLayout( new FlowLayout(FlowLayout.CENTER) );
    Calcular = new JButton("Resolver");
    Calcular.setEnabled(false);
    Ativar = new JButton("Dimensionar");
    label1 = new JLabel("Clique no bot�o para resolver o sistema.");
    label2 = new JLabel("Qual a ordem do sistema?");
    DimOfSis = new JTextField(4);
    DimOfSis.setText("0");
    JTable DataTable = new JTable(10,10);
    container.add(label2);
    container.add(DimOfSis);
    container.add(Ativar);
    container.add(label1);
    container.add(Calcular);
    container.add(DataTable);
    for ( int i = 0; i < 10 ; i ++ ){
    for ( int j = 0 ; j < 10 ; j++) {
    DataTable.setValueAt("0",i,j);
    myHandler handler = new myHandler();
    Calcular.addActionListener(handler);
    Ativar.addActionListener(handler);
    setSize( 500 , 500 );
    setVisible( true );
    public static void main ( String args[] ){
    MathF2 application = new MathF2();
    application.addWindowListener(
    new WindowAdapter(){
    public void windowClosing (WindowEvent event)
    System.exit( 0 );
    private class myHandler implements ActionListener {
    public void actionPerformed ( ActionEvent event ){
    if ( event.getSource()== Calcular ) {
    if ( event.getSource()== Ativar ) {
    //dimensiona a Matriz A
    if (dimensionado == false) {
    if (DimOfSis.getText()=="0") {
    value = 2;
    } else {
    value = Integer.parseInt(DimOfSis.getText());
    dimensionado = true;
    Ativar.setEnabled(false);
    System.out.println(value);
    } else {
    Ativar.setEnabled(false);
    Calcular.setEnabled(true);
    podecalc = true;
    try {
    InitValores( DataTable, value );
    } catch (Exception e) {
    System.out.println("Erro ao criar matriz" + e );
    private class myHandler2 implements ItemListener {
    public void itemStateChanged( ItemEvent event ){
    private void InitValores( JTable table, int n ) {
    A = new double[n][n];
    B = new double[n];
    javax.swing.table.TableModel model = table.getModel();
    for ( int i = 0 ; i < n ; i++ ){
    for (int j = 0 ; j < n ; j++ ){
    Object temp1 = model.getValueAt(i,j);
    String temp2 = String.valueOf(temp1);
    A[i][j] = Double.parseDouble(temp2);

    What I did is set up a :
    // This code will setup a listener for the table to handle a selection
    players.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    ListSelectionModel rowSM = players.getSelectionModel();
    rowSM.addListSelectionListener(new Delete_Player_row_Selection(this));
    //Class will take the event and call a method inside the Delete_Player object.
    class Delete_Player_row_Selection
    implements javax.swing.event.ListSelectionListener
    Delete_Player adaptee;
    Delete_Player_row_Selection (Delete_Player temp)
    adaptee = temp;
    public void valueChanged (ListSelectionEvent listSelectionEvent)
    adaptee.row_Selection(listSelectionEvent);
    in the row_Selection function
    if(ex.getValueIsAdjusting()) //To remove double selection
    return;
    ListSelectionModel lsm = (ListSelectionModel) ex.getSource();
    if(lsm.isSelectionEmpty())
    System.out.println("EMtpy");
    else
    int selected_row = lsm.getMinSelectionIndex();
    ResultSetTableModel model = (ResultSetTableModel) players.getModel();
    String name = (String) model.getValueAt(selected_row, 1);
    Integer id = (Integer) model.getValueAt(selected_row, 3);
    This is how I got info out of a table when the user selected it

  • How to get selected value from a listbox

    Hi !
    I use following code to fill in my LISTBOX with values :
    AT SELECTION-SCREEN OUTPUT.
      val-key = 1.
      val-text = '0016'.
      APPEND val TO list_values.
      val-key = 2.
      val-text = '0028'.
      APPEND val TO list_values.
      val-key = 3.
      val-text = '0035'.
      APPEND val TO list_values.
      val-key = 4.
      val-text = '2001'.
      APPEND val TO list_values.
      val-key = 5.
      val-text = '0515'.
      APPEND val TO list_values.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING id     = 'p_list'
                  values = list_values.
    My question is - how to get a selected key/text value ? i dont need it to be done dynamically - i just need it in START OF SELECTION to perform tasks.
    Thx in advance.

    Unfortunetly it does not work
    i Define parameter as follows :
    PARAMETERS:
      p_list AS LISTBOX VISIBLE LENGTH 10.
    Then i add values to it :
    AT SELECTION-SCREEN OUTPUT.
      val-key = 1.
      val-text = '0016'.
      APPEND val TO list_values.
      val-key = 2.
      val-text = '0028'.
      APPEND val TO list_values.
      val-key = 3.
      val-text = '0035'.
      APPEND val TO list_values.
      val-key = 4.
      val-text = '2001'.
      APPEND val TO list_values.
      val-key = 5.
      val-text = '0515'.
      APPEND val TO list_values.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING id     = 'p_list'
                  values = list_values.
    Then when i add a blank section :
    AT SELECTION-SCREEN ON p_list.
    I set a breakpoint in START OF SELECTION block - but the value is empty no matter what do i select.
    Actually when i select value from the list and hit enter key on selection screen the selection in a listbox goes empty :/
    Whats the cause of this ?
    Edited by: Jacek Zebrowski on Feb 26, 2009 12:38 PM

  • Getting selected values from a data table

    My data table gets values directly from a result set.
    I went through http://balusc.blogspot.com/2006/06/using-datatables.html#top ,
    however, the data table shown in this example takes values from a simple list. I have trouble in getting selected values.
    Can anyone suggest how to select multiple values. here is a small code sample of what I have
    SessionBean
    ResultSet rs= db.retrieve_draft();
    datamodel = new ResultSetDataModel();
    datamodel.setWrappedData(rs);This is the JSF
    <h:dataTable binding="#{Engineer.dataTable1}" headerClass="list-header" id="dataTable1"
    rowClasses="list-row-even,list-row-odd" style="left: 144px; top: 192px; position: absolute"
    value="#{SessionBean1.datamodel}" var="currentRow">
    <h:column id="column1">
    <h:outputText id="outputText77" value="#{currentRow['report_number']}"/>
    <f:facet name="header">
    <h:outputText id="outputText78" value="Report Number"/>
    </f:facet>
    </h:column>Edited by: ktip on Jul 29, 2008 11:04 AM

    Here is what I was doing :
    This is my Session Bean (viz. SessionBean1)
    private CachedRowSetDataProvider draft_infoDataProvider;
        private CachedRowSetXImpl draft_RowSet;
        public CachedRowSetDataProvider getDraft_info() {
            return draft_infoDataProvider;
        public void setDraft_info(CachedRowSetDataProvider draft_info) {
            this.draft_info = draft_infoDataProvider;
        public CachedRowSetXImpl getDraft_RowSet() {
            return draft_RowSet;
        public void setDraft_row(CachedRowSetXImpl draft_row) {
            this.draft_row = draft_RowSet;
    public void get_drafts()
                Class.forName("com.mysql.jdbc.Driver");
                String url = "jdbc:mysql://localhost:3308/test";
                String dbUser = "root";
                String dbPassword = "adminadmin";
                con = DriverManager.getConnection(url, dbUser, dbPassword);
            String  sql="SELECT report_id from reports WHERE status='Draft' ";
            ResultSet rs=null;
            try
                Statement stmt1=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                rs=stmt1.executeQuery(sql);
                draft_RowSet=new CachedRowSetXImpl();
                draft_RowSet.populate(rs);
                draft_infoDataProvider=new CachedRowSetDataProvider(draft_RowSet);
                result="ok";
            catch(SQLException e)
              System.out.println(e); 
              result="fail";
    Here is my jsp page (developed in Netbeans 6.1) showing the data table
    <webuijsf:table augmentTitle="false" binding="#{Engineer.table1}" clearSortButton="true" deselectMultipleButton="true"
                                            id="table1" selectMultipleButton="true" sortPanelToggleButton="true"
                                            style="left: 48px; top: 144px; position: absolute; width: 450px" title="Table" width="0">
             <webuijsf:tableRowGroup id="tableRowGroup1" rows="10" sourceData="#{SessionBean1.draft_infoDataProvider}" sourceVar="currentRow">
                      <webuijsf:tableColumn headerText="report_number" id="tableColumn1" sort="test_report.report_number">
                                            <webuijsf:staticText id="staticText1" text="#{currentRow.value['reports.report_id]}"/>
                        </webuijsf:tableColumn>
             </webuijsf:tableRowGroup>
       </webuijsf:table>Doing all this just resulted in a javax.Naming.Exception : Data Source is null
    I tested this piece of code to give me the number of rows in the underlying rowset and it worked well. But somehow I could not get to display the data. Am I missing something?
    Edited by: ktip on Jul 31, 2008 1:21 PM

  • How to get selected value from one choice list

    Hi All,
    i want to get selected value in onechoice list.how to achive this
    Regards,
    Smaran

    check these
    http://groundside.com/blog/DuncanMills.php?title=adf_the_list_binding_value_problem&more=1&c=1&tb=1&pb=1
    http://blogs.oracle.com/jdevotnharvest/2010/12/reading_the_selected_value_of_an_adf_bound_select_list_in_java.html
    http://www.oracle.com/technetwork/developer-tools/jdev/listbindingvalue-088449.html

  • How to get selected values from selectManyCheckbox ?

    Hi,
    I am a SOA developer and using 'Auto generated adf form' of Human Task. I did some customization in the form. I need to show one dynamic list (contains multiple string values) on a form, from which user will select desired values. For this I have used <af:selectManyCheckbox> adf component.
    It has generated code as follows...
    <af:selectManyCheckbox value="#{bindings.Response.inputValue}"
                                             label="#{bindings.Response.label}"
                                             id="smc1">
                        <f:selectItems value="#{bindings.Response.items}" id="si9"/>
    </af:selectManyCheckbox>
    I am able to show list on a form and can select multiple values also.
    Now, I want the multiple selected values back in my BPEL process. I need only those values which are selected by user.
    Currently I am getting complete list as it is back in BPEL process.
    Please help me out..!
    Thanks..
    Suraj

    Unwinding ADF: How to retrieve Selected Items from selectManyCheckbox using ValueChnageListener

  • How to get selected values from Select Many Choice List

    Hello All -
    I am using Select Many Choice List and wish to get the selected values in the bean. I have created method binding for valueChangeListener for the choice list, but not sure how to get the selected values.
    I am facing problem in getting values from valueChangeEvent.getNewValue(). For Select One Choice List this returns int, but some list type object for Select Many Choice List.
    When I try to print the value it comes something like:
    ArrayList newVal = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    System.out.println(newVal);
    [Ljava.lang.Integer;@870ad8
    Could anyone please suggest how to type cast and use the return of valueChangeEvent.getNewValue() to get the selected values.
    Regards -
    Rohit

    Hi Timo -
    Thanks for the suggestion. I could get the values as below:
    public void multiOpUnitValChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding opUnitIter = (DCIteratorBinding)bindings.get("OperatingUnit2VOIterator");
    Integer[] values = (Integer[])valueChangeEvent.getNewValue();
    for (int i=0; i<values.length; i++){
    Row row = opUnitIter.getRowAtRangeIndex(i);
    System.out.println(row.getAttribute("OpUnitId"));
    Thanks -
    Rohit

  • Problems getting selected values from HtmlSelectManyCheckbox

    Hello,
    I am having problems getting values via getSelectedValues() from my HtmlSelectManyCheckbox component. The method returns an object array but the values are the same as the initial selectItems property.
    JSP:
    <h:selectManyCheckbox id="checkBox"
        binding="#{userEditBean.manyCheckbox}"
        value="#{userEditBean.groupIds}"
        layout="pageDirection">
      <f:selectItems value="#{userEditBean.allGroups}"/>
    </h:selectManyCheckbox>
    <h:commandButton action="#{userEditBean.ok}"     value="OK"/>Bean:
    public class UserEditBean extends BaseBean {
        private HtmlSelectManyCheckbox manyCheckbox = new HtmlSelectManyCheckbox();
        private String[] groupIds= {};
        private List allGroups = new ArrayList();
        public String[] getGroupIds() {
                groupIds= backing.getSomeIds();
                return groupIds;
        public void setGroupIds(String[] ids) {
            this.groupIds= ids;
        public HtmlSelectManyCheckbox getManyCheckbox() {
            return manyCheckbox;
        public void setManyCheckbox(HtmlSelectManyCheckbox newC) {
            this.manyCheckbox = newC;
        public List getAllGroups() {
            allGroups = backing.getAllGroups();
            return allGroups;
        public void setAllGroups(List newList) {
            this.allGroups = newList;
        public String ok() {
            Object o = manyCheckbox.getSelectedValues();
        }The problem is, the getSelectedValues() returns the values from the initial state of the page. The is no mark of the changes made by the user. Any help will be appreciated
    Thanks,
    Matek

    Your approach is somewhat odd. The selected values are just reflected in the groupIds, but you're overridding it with backing.getSomeIds() each time when the getter is called.
    Here is a basic working example:<h:selectManyCheckbox value="#{myBean.selectedItems}">
        <f:selectItems value="#{myBean.selectItems}"/>
    </h:selectManyCheckbox>
    <h:commandButton value="submit" action="#{myBean.action}" />MyBeanprivate List<String> selectedItems;
    private List<SelectItem> selectItems;
    // + getters + setters
    // You can use initialization block or constructor to prepopulate the selectItems.
        selectItems = new ArrayList<SelectItem>();
    //or
    public MyBean() {
        selectItems = new ArrayList<SelectItem>();
    public void action() {
        // The selected items are reflected in selectedItems.
        for (String selectedItem : selectedItems) {
            System.out.println(selectedItem);
    }

  • Get selected value from a select one choice in the bean

    I'm trying to do with the SelectOneChoice valueChangeListener and this is the code of my method, I'm using jdeveloper11g if alguin can help as I need the value you selected in the bean
    public void cambioCombo(ValueChangeEvent valueChangeEvent) {
    CoreSelectOneChoice csoc = (CoreSelectOneChoice) valueChangeEvent.getSource();
    List childList = csoc.getChildren();
    for (int i = 0; i < childList.size(); i++) {
    if (childList.get(i) instanceof CoreSelectItem){
    CoreSelectItem csi = (CoreSelectItem) childList.get(i);
    if (((String)csi.getValue()).equals((String) valueChangeEvent.getNewValue()) ){
    System.out.println("------------>"+csi.getLabel());
    I get the following error when running the application and selecting in my select one choice
    oracle.adf.view.rich.component.rich.input.RichSelectOneChoice cannot be cast to org.apache.myfaces.trinidad.component.core.input.CoreSelectOneChoice

    This is an example of some code that i wrote.
    public void changeDesc(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    System.out.println("value "+ valueChangeEvent.getNewValue().toString());
    //System.out.println("old value "+ valueChangeEvent.getOldValue().toString());
    if (valueChangeEvent.getNewValue().toString().equals("Area Uno")){
    this.descripcion.setValue("RR.HH");
    } else {
    this.descripcion.setValue("Finanzas");
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.descripcion);
    For get the Value select in the "SelectOneChice" component i use this: valueChangeEvent.getNewValue().toString()
    cheers

  • Get selected values from Listbox control

    Hi All,
    I'm still new to SL so please bear with me.
    I have a ListBox being bound with some records from a DB.  Here's the xaml:
    <ListBox x:Name="lstClassSeries" SelectionMode="Multiple" DisplayMemberPath="Description" Grid.Row="11" Grid.Column="1"></ListBox>
    What I need is to get the values of the items that were selected and I can't seem to get it to work.  I've tried looping through the SelectedItems but there's no property for value or text.  I even tried to cast the item as a ListBoxItem but I
    get the following error:
    Unable to cast object of type 'UI.Silverlight.TransactionService.DTODropDown' to type 'System.Windows.Controls.ListBoxItem'.
    How can I get the values of the items selected?
    Thanks

    You're using windows forms style techniques with xaml.
    This is a bad idea.
    You ought to learn MVVM.
    You probably don't think you want to learn it, but trust me on this one.
    Learn MVVM as soon as you can.
    There's a selecteditems collection.
    You have to cast   to listboxitem, it has a content property which you cast to whatever you put in there originally.
    Here's a snippet.
    I have a class foo, load a bunch of them in.  Do stuff. Work out what's selected in the click event of a button.
    public class foo
    public int id {get;set;}
    public string description {get;set;}
    public partial class MainPage : UserControl
    public MainPage()
    InitializeComponent();
    lb.Items.Add(new ListBoxItem{Content=new foo{ id=1, description="a"}});
    lb.Items.Add(new ListBoxItem { Content = new foo { id = 2, description = "b" } });
    lb.Items.Add(new ListBoxItem { Content = new foo { id = 3, description = "c" } });
    private void Button_Click(object sender, RoutedEventArgs e)
    List<foo> selectedfoos = lb.SelectedItems.Cast<ListBoxItem>().Select(x=>x.Content as foo).ToList();
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • How to get selected values from af:selectManyCheckbox

    Hi i am using jdeveloper 11.1.2 and i drag n drop a view object as Multiple select (<af:selectManyCheckbox) component and now i am trying to get the checked values in backing bean so that i can save in the database.
    Right now i am getting all the values but not the selected values.
    JSPX Page.
    <af:selectManyCheckbox value="#{bindings.HREmpDetailsVO1.inputValue}"
    label="EMPLOYEES"
    binding="#{backingBeanScope.backing_TestForm.smc1}"
    id="smc1">
    <f:selectItems value="#{bindings.HREmpDetailsVO1.items}"
    binding="#{backingBeanScope.backing_TestForm.si1}"
    id="si1"/>
    </af:selectManyCheckbox>
    Bean Class:
    public List getSelectedValues() {
    if (selectedValues == null || refreshSelectedList) {
    selectedValues =
    attributeListForIterator(selectedValuesIteratorName,
    selectedValuesValueAttrName);
    return selectedValues;
    public static List attributeListForIterator(DCIteratorBinding iter,
    String valueAttrName) {
    List attributeList = new ArrayList();
    for (Row r : iter.getAllRowsInRange()) {
    attributeList.add(r.getAttribute(valueAttrName));
    return attributeList;
    Can some one pls help me in getting the values with sample code.
    Thanks in advance

    Thank you so much for your help. But i am getting null values in the SOP. I could get count of selected values but not the values.

Maybe you are looking for

  • Exception on JaxRpc invoke trailing block elements must have an idattribute

    hi all , I am calling a target system from a bpel process . but while invoking i am getting the below error . ""*exception on JaxRpc invoke: trailing block elements must have an id attribute*"" my schema file is as below , can any one let us know the

  • Error window "could not write the file. There is not enough scratch memory available

    When I try to use the "save for web" I get this error window. I have deleted several files and have over 700 GB of memory available on my local C drive. I have had PS CC for over a year and have never seen this before. Any help would be appreciated.

  • Autoincrement UDT in Stored Procedure

    Hi all, I am tring to fill a UDT with a Stored Procedure. The UDT is created in SBO. I can't get find a way to fill the code and name columns. Now I am trying via this Stored Procedure: CREATE    PROCEDURE LeverFacturen                @Datum as DateT

  • On line numbers not operational

    I have 4 online numbers with experation dates ranging from May 2012 to Feb 2013 and calling these numbers produces a recurring tone and no call is delivered to my PC or Skype handsets. 3 of these numbers were funtioning normally and the fault seems t

  • Font type display problem

    I developed a report using Univers font size 12 but when the report server (OS = Linux 7.2) generate the report come out, the report is using Courier font size 12. The different in font type have give me much problem because the report layout is ruin