This discussion is archived
2 Replies Latest reply: Jan 10, 2013 9:58 PM by 982969 RSS

SelectManyShuttle

982969 Newbie
Currently Being Moderated
Hi,
I m using RichSelectManyShuttle , when i select items from it then it gives only the values of primary key as the value of selected items even though i define another attribute as the value.. ..

Chirag

Edited by: 979966 on Jan 10, 2013 9:57 PM
  • 1. Re: SelectManyShuttle
    939413 Explorer
    Currently Being Moderated
    Hi chirag,

    The value you get from the select many shutle is the key of the record you selected.

    Akash.
  • 2. Re: SelectManyShuttle
    939413 Explorer
    Currently Being Moderated
    you can use the <f:attribute> to get the value of any other column.

    see the code below
    <af:selectManyShuttle value="#{row.bindings.column_Name.inputValue}"
    id="soc3"
    label="#{row.bindings.column_Name.label}"
    valueChangeListener="#{backingBeanScope.yourBean.onChange}"
    autoSubmit="true">
    <f:selectItems value="#{row.bindings.column_Name.items}" id="si3"/>
    <f:attribute name="rowIndexVal" value="#{row.bindings.column_Name.items[row.bindings.column_Name.inputValue].label}"/>
    </af:selectManyShuttle >
    public void onchange(ValueChangeEvent valueChangeEvent) {
    valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
    Map p = ((UIComponent)valueChangeEvent.getSource()).getAttributes();
    System.out.println("Selected Value"+p.get("rowIndexVal"));
    }

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points