get the values of the selected items to RichSelectManyChoice

Hi all

I have a RichSelectManyChoice

When the user clicks on the "submit" button I want to get the values of the selected items...


----------------------------------------------------------page.jspx-----------------------------------------------------------------------------

<? XML version = "1.0" encoding = "UTF - 8"? >

" < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:f =" " http://Java.Sun.com/JSF/core "

' xmlns:af = ' http://xmlns.Oracle.com/ADF/faces/rich "> "

< jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

< f: view >

< af:document title = "untitled1.jspx" id = "d1" > "

< af:messages id = "m1" / >

< af:form id = "f1" >

< af:panelGridLayout id = "pgl1" >

< af:gridRow height = "100%" id = "gr1" >

< af:gridCell width = '100% ' halign = "stretch" valign = "stretch" id = "gc1" >

<! - content - >

< af:selectManyChoice value = "#{bindings." CountriesView1.inputValue}.

label = "#{bindings." CountriesView1.label}"id ="smc1.

valuePassThru Binding = "#{suspect." Country}"="true">

< f: selectItems value = "#{bindings." CountriesView1.items}"id ="si1"/ >

< f: validator binding = "#{bindings." CountriesView1.validator} "/ >"

< / af:selectManyChoice >

< / af:gridCell >

< / af:gridRow >

< / af:panelGridLayout >

< text af:button = "Button 1" id = "b1" action = "#{suspect.valide}" / >

< / af:form >

< / af:document >

< / f: view >

< / jsp:root >

---------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------suspect.java-------------------------------------------------------------------

package test.view;

import com.sun.org.apache.xpath.internal.operations.String;

Import oracle.adf.view.rich.component.rich.input.RichSelectManyChoice;

public class suspect {}

RichSelectManyChoice campaign private;

String string = null;

public suspect() {}

????????????????????????????????????????

}

public void valide() {}

}

{} public void setCountry (RichSelectManyChoice country)

This.Country = country;

}

public RichSelectManyChoice {} getCountry()

back country;

}

}

---------------------------------------------------------------------------------------------------------------------------------------------------------


Anyone has an idea please?

Hello

You can use

JUCtrlListBinding listBindings = (JUCtrlListBinding) getBindings () .get ("CountriesView1");

Object [] str = listBindings.getSelectedValues ();

for (int i = 0; i)< str.length;="" i++)="">

System.out.println (STR [i]);

}

in this loop, you will get all the values of selectManyChoice, for details see Ashish Awasthi (Jdev/ADF) Blog: using the selection Multiple (component selectManyListbox & selectManyCheckbox) in ADF

hope it helps

Tags: Java

Similar Questions

  • ListField - how to get the selected items

    Hi @all,

    I am running OS5 on a BB bold 9700 and development via eclipse.

    I tried to do a listfield and put it in a display of network manager, which works very well.

    As peter_strange did in a reply to a thread listfield, I tried to catch the click button on navigation through "makemenu.

    It works fine, but after processing the code according to the listfield (getindex), it shows a standard menu, which I don't want. I want just to get the index or the name of the current or selected fields and continue with the transformation by showing a new screen for example.

    In some other threads that I found excerpts concerning 'navigationclick', but I don't understand, what I have to do here and why. Th KB, I searched but I did find something to go further.

    Someone there who can help me with a small example?

    Thank you much in advance.

    CUA

    Michael

    You can create your own class or override her anonymously.

    new ListField (...) {replace the code of the method here}

    (blackberry is perhaps not the best way to start learning java...)

  • Get the selected value of a select list item in a tabular presentation.

    Hi, I have a tabular form and I'm trying to get the selected value of a select list item and store the selected value in a page element hidden elsewhere on the form of tables, so I can use this value.

    I already have something similar to the input on the tabular presentation elements.

    Get the initial values
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems var = $(' input [nom = "f12"]', ligne) [0];

    numberOfItems = 123456.123

    What I want to do is soemthing similar as above but capture the value of a select element in tabular form. I thought I could do something like:

    Get the selected value
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems var = $('selected [name = "f08"] .val ()', line) [0];

    But this method leaves the as undefined var numberOfItems.

    Please help me to find a way to identify the item 'select' in the tabular form called "f08" and get this value.

    I am a newbie to jQuery selectors etc...

    Thank you.

    Strange that you do not get an error when you run your 2nd selector.
    In any case for this kind of thing, see the HTML code of your tabular form and tell us what triggers, the element can be useful. Or better create an example at apex.oracle.com.
    In any case, I see two errors:
    (1) is there any html element "not selected" instead, the LOV in the APEX element has the select tag
    (2) you can not write a. val() inside a selector that you must place it after your selection.

    So I'd like to rewrite your code to:
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems = $("select_[nom_="f08"]",_row).val () var [0];

  • Exception while trying to get the selected value for the choice of SelectOne in ADF Mobile

    I added the following code after arriving through this post https://forums.oracle.com/thread/2536419

    DCBindingContainer dcBindings = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding iterBind = (DCIteratorBinding) dcBindings.get ("facilitySelectItems");

    Attribute String = (String) iterBind.getCurrentRow () .getAttribute (0);

    But Jdeveloper complained class BindingContext wasn't available and I get the jar file adfm.jar has not been added to the project. I added it manually the path C:\JDeveloper11r24\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar. Once I've deployed code on an android emulator, I get the below error. Can someone please?

    07-25 13:18:03.812: D/CordovaLog (869): [SEVERE - oracle.adfmf.framework - adf.mf.internal - logError] request: {classname: oracle.adfmf.framework.api.Model; method: evaluateMethodExpression; params: [0: #{pageFlowScope.IBCMSearchBean.getSearchParams}] [1:] [2: {}] [3:] ;} exception: {message: oracle/adf/model/binding/DCBindingContainer (unsupported major.minor version 50.0); the severity: ERROR; .Guy: oracle.adfmf.framework.exception.AdfException; .exception: true ;}}}

    The version of the compiler maximum the JDev shows that 1.4. And I'm using version 11.1.2.4.0 for JDeveloper. The JDK version is 1.6.0_24.

    Sorry I missed the question!

    First of all, to get the value of selectedItem in selectOneChoice do not have another function in the domain controller. Here is an excellent article by Frank that explains this. Or you can use the below function to get the selected value immediately. Here the market is the value of selectOneChoice attribute. I wasn't aware of this method until you have read this article.

    {} public void getAndSetMarketValue (market of the object)

    ValueExpression ve = (ValueExpression) AdfmfJavaUtilities.getValueExpression ("#{bindings.marketSelectItems}", Object.class);

    AmxAttributeBinding attrBinding = (AmxAttributeBinding) ve.getValue (AdfmfJavaUtilities.getAdfELContext ());

    access the iterator that populates the list of values in

    the selectManyChoice component

    AmxIteratorBinding amxListIterator = attrBinding.getIteratorBinding ();

    the AmxIteratorBinding is a wrapper for the BasicIterator

    iterator which sets out the information we need

    ListIterator BasicIterator = amxListIterator.getIterator ();

    for each index value, query the name of the service (you can

    access and attribute from the line) to display

    SelectedValue = string

    (String) listIterator.getAttributeValueAtIndex (((New Integer ((String) market))) .intValue (), "Value");

    }

    Second, you can use #{row} in commandLink's action since it is something that is evaluated when the user clicks on the link and we do not have access to #{line} after that the entire component is rendered. To remedy this give an action for the commandlink which is a function in the bean and the function of bean back to the action of the link selected.

    ListOfReports.amx

    .......

    .......

    LoginBean.java

    ......

    public String returnClickValue() {}

    Option of string = AdfmfJavaUtilities.evaluateELExpression("#{viewScope.selectedItem}").toString ();

    return option;

    }

    ......

  • Get an AIArtHandle for all the selected items in the doc

    I'm doing what someone does in this other thread about the export in PNG.

    reference: http://forums.Adobe.com/thread/320685

    We have several layers (some off and locked).

    I would like to pass all the selected items to the Action of Image Optimization as a group rather than optimize each.  I use AIMatchingArt Suite to retrieve items selected, but it points to an array of AIArtHandles... any ideas?

    That's how I ended up doing and it works.  (In addition to the other code which has been referenced in the original post).

    I don't know if it would work better with an ArtSet, but it works.  Perhaps, if the images I'm flattening were somewhat more complicated, I would run in the duplication you mentioned.

    result = sAIActionManager-> PlayActionEvent (kAISelectAllAction, kDialogOff, NULL);

    result = sAIMatchingArt-> GetSelectedArt (store, & County);

    If {(result)

    Store = NULL;

    Count = 0;

    } else {}

    result = sAILayer-> InsertLayer (NULL, kPlaceAboveAll, & newLayer);

    If (newLayer &! result)

    {

    sAILayer-> SetLayerVisible (newLayer, true); See the layer

    sAILayer-> SetLayerIsTemplate (newLayer, false); Mark as NOT a model layer get exported

    sAILayer-> SetLayerEditable (newLayer, true);

    result = sAIArt-> NewArt (kGroupArt, kPlaceAboveAll, Nile, &group);)

    for (index = 0; (result == kNoErr) & (index< count="" );="" index++="" )="">

    Art AIArtHandle = (* store) [index];

    Copy of AIArtHandle;

    Add the art group

    result = sAIArt-> DuplicateArt (kPlaceInsideOnBottom, group, ©);)

    }

    }

    }

  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • DropDownList - how to get the selected value

    I have the next dropdownlist control:

    Select.dd = Select.gMain.add('dropdownlist',undefined,FinalElements);
        Select.dd.onChange = notifyMe();
    

    and the notifyMe() function

    function notifyMe()
    {
        alert(this.selection);
    }
    

    I need to use the value of the selected item in the menu dropdown. So for now I'm just an alert. However, nothing happens, when I change the selection in the drop-down list. How can I fix?

    Hey!

    Change this:

    Select.dd.onChange = notifyMe();
    

    to do this:

    Select.dd.onChange = notifyMe;
    

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • How to read the value of the selected item in the DropDownList control?

    Hello

    The DropDownList component has a selectedItem property is supposed to return a ListBase.

    But what I want is just the 'chain' which is supposed to be the selected item in the DropDownList control.

    How to read this value?

    Thank you

    -Malena

    You are misreading the documentation. ListBase.selectedItem returns an object. This item comes directly from your data provider, so you just have to go up or go for any property you need.

  • Get the "selected lines" value after sql custom query in the database adapter

    We execute a custom query in a database adapter. With other technologies (JDBC, etc.) the result of a query produces not only a game but the number of lines selected results. For example, the output of the script of Oracle SQL Developer will display something like:

    9999 selected lines

    at the end of the output of the script.

    I would like to obtain this value for a BPEL process. Of course, I could run a 2nd interview whose where clause is identical to the first, but select count (*) instead. However, it is not only ineffective but (in rare circumstances in an active database) could be the problem.

    It is not obvious to the novice BPEL how to get the selected value and the result set row in an Invoke. Is this possible?

    Maybe it's not the only solution - but this is how I did in the past.

    After step to invoke the adapter, use a step of the having-right/copy to fill a variable of integer type BPEL using the xpath count function...






    That should affect the number of records returned by the query.

    I hope this helps.

    Rod.

    Published by: Tunnels of Rod on December 15, 2009 13:16

  • Get the selected value in the list drop-down/messagechoice

    Hi friends,
    App R12.
    I create a drop-down list programmatically in the process request:

    OAMessageChoiceBean OAMC = oapagecontext.getWebBeanFactory () .createWebBean (OAWebBeanConstants.MESSAGE_CHOICE_BEAN, null, oapagecontext, null) (OAMessageChoiceBean);

    oamc.setPickListViewUsageName ("MyVO1");
    oamc.setListValueAttribute ("MyId");
    oamc.setListDisplayAttribute ("MyDescription");
    oamc.setID ("xxMypicklist");
    oamc.setRendered (Boolean.TRUE);
    oawebbean.addIndexedChild (oamc);

    This shows the list of choices and there MyVO1 query search results.

    Now, I want retrieve value MyId in the processFromRequest (after pushing a button on the screen). I do the following:

    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    ...
    MyVOImpl myvoimpl = (MyVOImpl) am.findViewObject("MyVO1");
    MyVORowImpl PicklistRow = myvoimpl.getCurrentRow ((MyVORowImpl));
    NUMBER auxId = (NUMBER) PicklistRow.getAttribute ("MyId"); THIS SENTENCE GIVES A NULL POINTER EXCEPTION

    Then..., is not enough to find the original Version? and get the rank "perceive"... and then get the desired attribute?

    Do I need to load data from MyVO1 into myvoimpl? How? How to get the folder selected on the screen?

    Many thanks for any help. It is very urgent for me to solve this problem. Dev guide does not help with this kind of usual problems.
    Jose L.

    Hello

    u can not get the value of this way, becz you try to get the value of the original Version which is used for bean of choice message, to get the value selected in this field of choicebean message, you must get the VO initialized for this page, both would be different VO, you can opt for the following approach

    (1.) an another VO wiil be there in your page get implemented to capture the data on this page, the attribute of this VO would be added to your field of beans of choice, need to understand that VO and and capture your selected value.

    or the other way is

    2.), you can change your code in the same way in the pR method

    OAMessageChoiceBean OAMC = oapagecontext.getWebBeanFactory () .createWebBean (oapagecontext, OAWebBeanConstants.MESSAGE_CHOICE_BEAN, null, "XXMypicklistBean) (OAMessageChoiceBean);

    and get the selected value in pFR method in this way

    OAMessageChoiceBean getCHBean = (OAMessageChoiceBean) (webBean.findIndexedChildRecursive ("XXMypicklistBean"));

    String val = (String) getCHBean.getValue (pageContext));

    thanx

    Pratap

  • How to get the selected DataGrid item?

    Hello

    I have a datagrid

    < mx:DataGrid = "10" XY = dataProvider "36" = "{acEmaillist}" width = "319" >
    < mx:columns >
    < mx:DataGridColumn headerText = "Full name" dataField = "cn" width = "150" / >
    < mx:DataGridColumn headerText = "Email" dataField = "mail" width = "150" / >
    < / mx:columns >
    < / mx:DataGrid >

    I want to select a name, click it, get the selected name and save it in a string variable. Please let me know how to get the selected name when I click it. Thank you very much.

    M

    This code can help.


    http://www.Adobe.com/2006/mxml"width ="100% ">

    Import mx.controls.DataGrid;
    Import mx.events.ListEvent;

    [Bindable]
    private var nameStr:String;

    public void getName(event:ListEvent):void {}
    var dg:DataGrid = DataGrid (event.target);
    nameStr = dg.selectedItem.cn;
    }
    ]]>



    Bob Smith
    [email protected]


    Ted Alan
    [email protected]


    Fred Tobs
    [email protected]








  • To access the selected items in a ListBox control

    In LabVIEW 2010, I have a ListBox control. How can I get a list of the objects that the user selected in the ListBox?

    I don't see any method, property or event that would provide this information.

    Thank you.

    The value of the ListBox are the indexes of the selected items.

    If you allow the user to select "0 or more' items, the data type will change in a table."

    To get the names of the selected items (I guess that is what you want), you should India property 'element names.

    Tone

  • ComboBox - trying to set the selected item

    I call a remote object that calls the following function to the suite. The returned object is used to fill a form of TextInputs and a ComboBox control - this is a form of change. How can I set the selected item in the ComboBox? I could not get the selectedItem to work, and I do not know the value of the index that corresponds to selectedCompany.CompanyType in order to use selectedIndex.

    private void receiveSelectedCompany(event:ResultEvent):void {}
    selectedCompany = event.result as business;

    copy the record in the areas of publishing
    txtCompanyId.text = selectedCompany.CompanyID.toString ();
    cboCompanyTypeEdit.selectedItem.CompanyType = selectedCompany.CompanyType;
    txtCompanyName.text = selectedCompany.CompanyName;
    txtCompanyShortName.text = selectedCompany.CompanyShortName;
    txtTaxId.text = selectedCompany.TaxID;
    }

    Thanks in advance,
    France

    FranceC, here is a function allows you to do.

    simply call the selectComboValue function and pass it the name of the combobox and the search string as follows:

    selectComboValue (Mazonedelistederoulante, dataObj.fieldName.toUpperCase ());

    Here's the function:

    public void selectComboValue(select:_mx.controls.ComboBox,_optionToSelect:String):void {}
    for (var i: int = 0; i< select.dataprovider.length="" ;="" i++)="">
    If (select.dataProvider.getItemAt ( ) .label == optionToSelect) {}
    select.selectedIndex = i;
    break;
    }
    }
    }

    PS: If you are looking for the data rather than on the label simply change this line:
    If (select.dataProvider.getItemAt (
    ) .label ==)
    to do this:
    If (select.dataProvider.getItemAt ( ) .data == )

  • Get the first item in the data model

    I'm trying to get the first item in a data model. I expect the following to work, but it returns-1

    var firstItem = myDataModel.indexOf(0)
    

    Row is a table, and data() must return a specified row element:

    if (myDataModel.size() > 0) {
      var firstItem = myDataModel.data([0])
    }
    

    indexOf search a value and returns it is row.

    UPD:

    In ArrayDataModel, there is also. value() function which takes a simple index.

    Data() is more generic function inherited from DataModel.

    So, it can be simplified to:

    var firstItem = myDataModel.value(0)
    
  • How to detect when the selected item ObjectListField changed?

    I expanded the ObjectListField to implement a scroller of marquee style iPod for long lines of text that will disappear from the screen. So far, I have everything works well, and it works as I expect... when it fires.

    I'm having a problem to find a way to make reliable activate. It doesn't seem to be any method I can substitute or any earpiece I can use that fires when the current list item is changed. I first tried setSelectedIndex substitution. That worked sometimes, because apparently the OS is not call setSelectedIndex when he wants to change the item selected, it does something else.

    Then I tried the substitution of navigationMovement and manually call the code to start the timer, but that no longer works (I was the substitution of method navigationMovement of the ListField, maybe I should have done the Manager instead?). But anyway this approach does work for the version of the storm of my application because the storm never calls navigationMovement.

    Then I tried to use a fieldChangeListener, but apparently who don't get fired for the selection.

    Finally in despiration I tried substitution of drawListRow, only qualifying when index equals the selectedRow. But my code of scroll calls invalidate, so of course it just causes a loop infinite drawListRow, slow down the device and not even starting the scroll, because whenever the timer is started, it cancels the old one.

    Anyone have any ideas on what I can do here? Thank you.

    Good end I could not fieldChangeNotify to the fire, no matter which I overrided, even with the first setting the listener. It only seems fair to shoot during the selection change event. One thing to note, I use an objectlistfield, not an ObjectChoiceField... maybe you are thinking as well to another area?

    Thanks for the help anyway, in the end I was able to get the desired effect by modifying the code slightly to reuse the same animation timer rather than create a new one when the selected item changes. The timer is started in the constructor of the ListField. Works very well.

Maybe you are looking for

  • Can I leave partitioning HARD drive during my recovery CD system?

    Hello. I need to change the HARD drive in my new Tecra A2 to the one I used to use on my old computer. I will certainly need to reinstall the system so I would gladly use the recovery CDWhen I tried on the original disk, the utility did not have an o

  • Location System Board FRU T400

    Hello I SIP kind coffee a bit on my laptop and now it beeps: 1-3-3-1, which means: the DIMM module or system board is complete. I doubt it's the DIMM, so it must be the system board. I began to undo the basket, but it seems a difficult task to find t

  • unwanted .jpg

    How can I remove an 'image' which appears at startup BEFORE the Welcome screen in XP? Display properties: I have Screen Saver = NONE and office = NONE. Any suggestions? AthenaAthena

  • How to find password e-Recovery?

    So I have an old Aspire 5920 G, which I'm trying to sell or recycle, but when I go into e-Recovery Management he asks me a password. Musy I changed it many years ago because 000000 doesn't work and the indicator says "nickname" which is not very help

  • device works on some usb ports

    My iPad has stopped working on the USB port in the front on my PC. It keeps connecting and disconnecting. It works fine when connected to a USB port on the back of the PC. In windows, each USB port has its own driver.  This is why you see the message