ADF select many shuttle value tracking in the bean

Hi All,
I am working on a one requirement,
I have adf task flow(.jsff component), here i have ADF select many shuttle component,
I need to track value value which i am moving from the left side of panel to the right side panel ,i need to track these values in the Bean class.
I am not doing in the .jspx ,doing it in the .jsff bounded task flow.
can any1 pls suggest me the approach??
thanks
Santosh

Here is what I did to get the selected items in the backing bean before they are shuttled across.
Added af:clientListener (<af:clientListener method="showDetails" type="propertyChange"/>) for af:selectManyShuttle
Set ClientComponent for af:selectManyShuttle to true
Added af:serverListener (<af:serverListener type="shuttleItemSelected" method="#{backingBeanScope.mainBean.itemSelected}"/>) to parent of af:selectManyShuttle which is af:panelBox in my case.
Added af:Resource with the following code
<af:resource type="javascript">
function showDetails(event)
if(AdfRichSelectManyShuttle.SELECTION == event.getPropertyName())
var shuttleComponent = event.getSource();
var parent = shuttleComponent.getParent();
var selectedObjs = AdfShuttleUtils.getLeadSelection(shuttleComponent);
AdfCustomEvent.queue(parent, "shuttleItemSelected", {fvalue:selectedObjs}, false);
event.cancel();
</af:resource>
In the backing bean code, implemented serverListener with the following code. "DepartmentsView1" is the list binding used to populate the Shuttle.
public void itemSelected(ClientEvent clientEvent) {
ArrayList ids = (ArrayList)clientEvent.getParameters().get("fvalue");
Object idArray[] = ids.toArray();
BindingContainer bc = this.getBindings();
JUCtrlListBinding listBinding = (JUCtrlListBinding)bc.get("DepartmentsView1");
RowIterator itr = listBinding.getRowIterator();
for (int i = 0; i < idArray.length; i++) {
int idx = Integer.parseInt((String)idArray);
Object str = itr.getRowAtRangeIndex(idx);
System.out.println(str);
When I run the JSPX file, I see the selected value printed in the message window before it is shuttled. If I select multiple values, I see them in the backing bean.

Similar Messages

  • How to get the selected values from ADF select many shuttle to textfield

    Hi All
    Actually in my webpage, I am using text field and beside that placing the command button. When user clicks the command button, a popup window will open up with the "af:select many shuttle" component. While popup opens, it fetch the values backend and displays it to the user in left side of the component. When user selects few values to the right side of the component and clicks ok. Those selected values should be displayed in the besides inputtext field.
    Code in Webpage:
    <af:inputText id="disciplineVariable"
    contentStyle="width:200px;"
    styleClass="AFDefaultBoldFont;AFLabelTextForeground;AFDarkForeground;"
    value="#{ADFStandards.input}"/>
    <af:commandImageLink id="cb12" icon="/compliance/images/List.PNG" hoverIcon="/compliance/images/HoverList.PNG">
    <af:clientListener type="action" method="disciplinePopupMethod"/>
    </af:commandImageLink>
    PopUp code:
    <af:popup id="testingPopUP" contentDelivery="lazyUncached">
    <af:dialog title="TestingPOPUP" dialogListener="#{testBean.testingValues}">
    <af:selectManyShuttle id="sms1" valueChangeListener="#{testBean.testingPopUP}">
    <f:selectItems value="#{ADFStandards.mostCommonStandards}" id="si1"/>
    </af:selectManyShuttle>
    </af:dialog>
    </af:popup>
    Could anyone please help me in this.
    Regards
    Venkat.S

    Bind your value attribute for af:selectManyShuttle to the List property in ManagedBean. When the User finish the selection, in your MB set the attribute List in input string attribute (probably what you want is iterate over the list, and concatenate on the String). After that, you have to partialTriggers on the inputText component in order to refresh.
    Regards,

  • ADF FACES Select Many Shuttle Broken?

    It seems that the Select Many Shuttle Component got broken somewhere between EA-12 and EA-14.
    I have a Bean that returns a list of SelectItems with the label and value being strings. When I try to submit from the selectMany Shuttle, I get
    "Conversion failed: SelectMany could not convert submittedValue to an int - The value "[Ljava.lang.String;@879541" in "" was not understood."
    This used to work fine until I upgraded to EA-14. Any ideas on what is happening?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Yes, there is a bug, fixed in EA15. Simple workaround, though: add valuePassThru="true" to your shuttle.

  • Embedding tree in select many shuttle

    Hi,
    Is there a way to implement a Shuttle having an tree as an select item value ?
    When I use tree in a selectmanyshuttle, it gives an error "Tree is not a valid child of a Select Many Shuttle Element". Please give me some idea how to do this.
    <af:form id="f1">
    <af:selectManyShuttle label="label 1">
    <af:tree value="#{bindings.PlanVO11.treeModel}" var="node"
    selectionListener="#{bindings.PlanVO11.treeModel.makeCurrent}"
    rowSelection="single" id="t1" binding="#{TestBean.treecode}">
    <f:facet name="nodeStamp">
    <af:outputText value="#{node}" id="ot1"/>
    </f:facet>
    </af:tree>
    </af:selectManyShuttle>
    </af:form>
    Thanks,
    Rakesh

    AFAIK this isn't possible (as the error message also states) :(
    On the other side I don't understand how it should work if it would be possible. You select one node and shuttle it over and you expect that all child nodes are shuttled over too?
    Timo

  • Not able to get ADF select many checkbox working with binding lists

    Hi,
    I have 2binding lists: list A that holds the selected choices and list B for all the choices. When the user opens the page, a list of checkbox should be displayed all the choices from list B with the saved ones pre-checked from list A. When the user changes the selection, the binding list A should be updated.
    I tried to use ADF select many checkbox but could not get it working for this.
    There are 2 big issues:
    1, can get all the choices from binding list B displayed but not able to pre-check the ones from list A.
    2, when the selection changed, not able to updated list A with the new choices
    I find some sample but it is talking about saving the selected choices into the managed bean not into binding object and using valueChangeListener. How to implement this in ADF? Please help.
    Thanks,
    Helen

    Helen,
    I don't think you can do this with a select many checkbox. This component works on one list whereas you want to handle two. You may archive this if you use a managed bean and handle all the list manipulation in java.
    Your use case more looks like a select many shuffle (http://docs.oracle.com/cd/E18196_01/11.1.2.0.0/lovs.html).
    Timo

  • ADF Code Corner 64 - Select Many Shuttle. Please help

    Hello all.
    I have developed exactly the same case as the one described in Code Corner 64.
    The only difference is the VO names and the iterators.
    The value of the Shuttle come the below piece of code:
        public Integer[] getSelectedIndxs() {
            selectedIndxs = null;
            selectedIndxList = new ArrayList<Integer>();
            //get all enterprise role for the current selected user role
            DCIteratorBinding aclDciter = ADFUtils.findIterator("ACLvo1Iterator");
            RowSetIterator rsi = aclDciter.getRowSetIterator();
            //get access to the "EnterpriseRolesVOIterator"
            DCIteratorBinding enterpriseRolesIter = ADFUtils.findIterator("EnterpriseRolesVOIterator");
            while(rsi.hasNext()){
                //Get the key of enterprise role of the ACL
                Row rw = rsi.next();
                Key key = new Key(new Object[] { (String)rw.getAttribute("EnterpriseRolesId") });
                enterpriseRolesIter.setCurrentRowWithKey(key.toStringFormat(true));
                int indx = enterpriseRolesIter.getCurrentRowIndexInRange();
                selectedIndxList.add(indx);
            selectedIndxs = selectedIndxList.toArray(new Integer[selectedIndxList.size()]);
            return selectedIndxs;
        }The value of "indx" looks fine in the debugger.
    I have also printed the whole array list at the end, and looks fine.
    The problem is that I get:
    *<SimpleSelectManyRenderer> <_getSelectedItems> Could not find value:12 of type:java.lang.Integer among list of SelectItems*
    *<SimpleSelectManyRenderer> <_getSelectedItems> Could not find value:13 of type:java.lang.Integer among list of SelectItems*
    *<SimpleSelectManyRenderer> <_getSelectedItems> Could not find value:10 of type:java.lang.Integer among list of SelectItems*
    *<SimpleSelectManyRenderer> <_getSelectedItems> Could not find value:11 of type:java.lang.Integer among list of SelectItems*
    etc...
    Should anyone has ANY idea please let me know. I'm going nuts with this...
    Thanks a lot! I really appreciate
    Edited by: apostolosk on Mar 15, 2012 12:06 PM

    Finally the mistake was the returning index. I should had returned the values - not the index.
            ArrayList<String> selectedValues = new ArrayList<String>();
            //get all enterprise role for the current selected user role              //DCIteratorBinding aclDciter = (DCIteratorBinding)bindings.get("ACLvo1Iterator"); 
            DCIteratorBinding aclDciter = ADFUtils.findIterator("ACLvo1Iterator");
            aclDciter.executeQuery();
            RowSetIterator rsi = aclDciter.getRowSetIterator();
            Row[] rw1 = rsi.getAllRowsInRange();
            for (Row rowa : rw1){
            System.out.println("display row" + rowa.getAttribute("EnterpriseRolesId"));
                selectedValues.add((String)rowa.getAttribute("EnterpriseRolesId"));
            return selectedValues.toArray(new String[selectedValues.size()]);Thanks a lot.

  • How to not display radio buttons in the select many shuttle component

    Hi all,
    af:selectManyShuttle is a true nice component.
    For business / UI ergo reasons I've decided to not display the radio buttons before each item. There's no option to do that.
    Is it possible ? How ?
    Regards
    Luc-

    Let say there are three ways:
    1. You can use skinning mechanism,
    2. You can include css file in .jspx page and then use it.
    3. You can write css directly in .jspx page.
    For skinning read documentation. For two other ways here is example code that should be inside metaContainer facet of document tag.
    <f:verbatim>
      <!-- CSS directly in jspx page -->
      <style type="text/css">
        .myClass{
          background-color: #8888FF;
      </style>
      <!-- Include css file in jspx page -->
      <link href="css/incStyle.css" rel="stylesheet" type="text/css" />
    </f:verbatim>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How capture the value selected in the component ( Select Many Choice )

    Hello Everyone ,
    I am new to ADF and i have a ADF page developed with Select Many Choice as one of the component , this field can be multiple numbers , i would
    like to capture each one the value being selected under each message choice and print them using sop .
    Let me explain through example :
    Application 1
    : Role 1
    : Role 2
    Application 2
    : Role 4
    : Role 5
    Where Application 1 , 2 are name of the Select Many choice component and Role 1 , 2 .. are values inside various Message choice .
    Now if i select Role 1 in Application 1 and Role 5 in Application 2 , i would like to print each of these information on click of a button.
    can some one help to achieve this .
    Note : All the values like Application 1 , 2 and Role 1,2,3 etc are just hard coded , not using any data base .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Pratap ,
    Thanks for your response ,Its just a page with component ( Select Many Choice ) i have hard coded some of the values for
    select choice .
    Let me know if you need any further input .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to - Select Multiple Filter Values w/o Navigation ability

    Just FYI, I had a requirement to allow users to select multiple characteristic filter values.  Something like a capabilities a combo box would afford us.
    To do this just use a Generic Nav Block Web Item and in the Web Item configuration just uncheck the "Display Navigation Icons". 
    It gives them the ability to select multiple filter values without all the Drill up/down capabilities.

    You can use multiple filter options using the web item dropdwon box.
    There is a How to document available in the BW 2.0B section for this..link below.
    https://websmp206.sap-ag.de/~sapdownload/011000358700003825382001E/HOWTOMULTIPLESELECTION.DOC
    Thanks.

  • Range selection for Fix value variable in BPS

    Hi,
       When create vaiable, there is a fix value variable, under selection condition, we can choose either multiple single value or range, however if we choose the range, let say mtareial number from 1 to 100, when we run the BPS application through UPSPL, the value for material variable will be populated with value 1 to 100, when I try to change the value to a single value,it's not allowed me to change,  while the user define value type, we can change the value, Is this supposed to be?

    JW,
    BPS variables does not allow the choice of multiple single values, you can choose a single value OR a range of values. This issues has been brought up with SAP Development.
    If you need single values or a complete range of values, you can add each single value as a fixed value and the range as another fixed value that can be selected. You can select each single value individually or the whole range (or any subranges you specified) but not multiple selections of single values.
    In user definted variable if you check input allowed by users, you can add some values and the users can add more but then they could potentially go into material numbers they should not get access too.
    Hope this helps,
    Mary

  • Display Javascript array value OnChange instead of Bean value

    I intially loop through a collection of employees display the values within the employee loop I have a select statement that i loop through a collection of programs that has on OnChange. I want to display the javascript value instead of the bean value onChange. The following code displays the bean value initally and onChange it displays both because the if is never false?
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    JSP page
    <jsp:useBean id="programs" scope="request" class="java.util.Collection"/>
    <jsp:useBean id="employeeList" scope="request" class="java.util.Collection"/>
    <script language="JavaScript" type="text/javascript">
    var programs = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("programText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = programs[idx];
    emHiddenField.value = programs[idx];
    <c:forEach var="emps" items="${employeeList}">
    <td width="170px">
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    </td>
    <td width="275px">
    <div class="selectBorder">
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:set var="programIndex" value="0"/>
    <c:forEach var="sp" items="${programs}">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    programs[${programIndex}] = "${sp.department}";
    </script>
    <c:set var="programIndex" value="${programIndex + 1}"/>
    </c:forEach>
    </select>
    </div>
    </td>
    </c:forEach>
    Edited by: kmb_ms on Sep 15, 2008 2:38 PM

    Apologize for not formatting the code. I used the status.index the code as suggested. The code if more efficient but the results are the same and I still have the same problem.
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:forEach var="sp" items="${programs}" varStatus="status">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    departments[${status.index}] = "${sp.department}";
    </script>
    </c:forEach>
    </select> How can I access the value of the array to compare with the value of the bean.
    <script language="JavaScript" type="text/javascript">
    var departments = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("departmentText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = departments[idx];
    emHiddenField.value = departments[idx];
    </script>The following code displays both the value of the bean and the value of the array onChange b/c the if statement is always true???? This is where I need help.
    <td width="170px">
         <c:if test="${departments[idx] != emps.department}">${emps.department}</c:if>
         <div id="departmentText"> </div>
         <input name="department" type="hidden" id="department">
    </td>

  • Printing directly from the bean class

    i am using a 3 tier layer to implement an event calendar
    i have a calendar.jsp that sends form data to eventday.jsp, which extracts the form data and calls mtds from eventBean.java that connects to db. my print statements are in the bean class. my prob is that the required information are not printed.
    i have debugged calendar.jsp and eventday.jsp and am quite sure that both are ok. i have placed a simple print statement in the bean class n it does not get printed.
    can i know if it's true we can't print directly from the bean class?
    should i return the values to be printed in dayevent.jsp instead?

    i see, then will it be okay if i store the value retrieved from the bean in a vector n retrieve the vector content in the jsp page? but i remember my tutor sayin that it's poor programing to expose the data structure to other classes or pages? wat other mtd can i use then? thks!

  • Select Many choice list gives null pointer exception in the value listener method

    I have a Select Many Choice component in my page and  I have a method assigned as a value change listener. When ever I select a single value or multiple values I am getting a null pointer exception.
    <MessageFactory> <getMessage>
    java.lang.NullPointerException
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findIndexFromObject(FacesCtrlListBinding.java:390)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.setInputValue(FacesCtrlListBinding.java:449)
        at oracle.jbo.uicli.binding.JUCtrlValueBinding.put(JUCtrlValueBinding.java:2546)
        at oracle.jbo.uicli.binding.JUCtrlListBinding.put(JUCtrlListBinding.java:3437)
        at javax.el.MapELResolver.setValue(MapELResolver.java:229)
        at com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:255)
        at com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:281)
        at com.sun.el.parser.AstValue.setValue(Unknown Source)
        at com.sun.el.ValueExpressionImpl.setValue(Unknown Source)
        at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.updateModel(UIXEditableValue.java:361)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.processUpdates(UIXEditableValue.java:311)
        at Reportview.backing.Report_v1.onRegionSelect(Report_v1.java:328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(Unknown Source)
        at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
        at javax.faces.event.MethodExpressionValueChangeListener.processValueChange(MethodExpressionValueChangeListener.java:144)
        at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:824)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:243)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:405)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Can someone tell me why this error occurs.My method is like this -
    public void onSelect(ValueChangeEvent event) {
    event.getComponent().processUpdates(FacesContext.getCurrentInstance());
    String[] s = (String[])event.getNewValue();
    System.out.println("Value changed value change ==>> "+s.length+"===>>"+Arrays.toString(s));

    Do you get the same results if you try queuing the event to happen after the model update?
    // Requeue the event so that it happens after the model update
        if (!PhaseId.INVOKE_APPLICATION.equals(valueChangeEvent.getPhaseId())) {
    valueChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
    valueChangeEvent.queue();
        } else {     
         String[] s = (String[])event.getNewValue();
        System.out.println("Value changed value change ==>> "+s.length+"===>>"+Arrays.toString(s));

  • 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

  • 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

Maybe you are looking for