How to capture selected value from drop down by index

Dear friends,
i want to capture the value of select value from drop down by index, for eg if  select air france, how to capture , could any one please let me know
Thanks
Vijaya

Hi Vijaya,
You can get the value of selected from drop down as below
Check out the event handler method attached to Onselect event of the ui element drop down by index , if no event is associated, then create an event and attach to the drop down list
Now you will be having the CONTEXT_ELEMENT in the WDEVENT parameter
               data lo_element type ref to if_wd_context_element.
               lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
Now, you can get the static attribute value of selected  drop down value & let us say your drop down list values are populated from context node 'ND_DRP_DOWN'
               data ls_data type wd_this->element_nd_drp_down.
                         lo_element->get_static_attributes(
                                   importing
                                   static_attributes = ls_data ).
Hope this helps you.
Regards,
Rama

Similar Messages

  • How to hard code values in drop down by index

    Hi everyone
    I hav a node containing 2 attributes ie value n key. I am using drop down by index.  Value attribute is bound to my drop dwn box. In key I am providing key value for the value.  I need to hard code 3 value..Can anyone help me how to do so.
    Thanks
    Jaspreet Kaur

    Hi,
    Example for Data Binding of the DropDownByIndex UI Element:
    Procedure at design time:
           1.      Create a view with the name TestView.
           2.      Insert the DropDownByIndex UI element as a container child of the TestView view. (Step 1)
           3.      Create the context structure, as described in step 2.
    Create the context node X with the cardinality 0..n. Insert the value attribute y of the type String into this node. Then perform the data binding of the DropDownByIndex UI element in the Properties window of the View Designer. The texts property must be bound to the value attribute y with the context path description TestView.X.y (step 3).
    The context path TestView.X.y describes the attribute y in the context node X of the view context of the TestView view.
    You can fill the context with test data using the following controller implementation.
    public void wdDoInit()
        //@@begin wdDoInit()
       String[] letters = new String []
       {"A", "B", "C", "D"};
    //Create context elements for the node "X"
       List nodeElements = new ArrayList();
       for (int i =  0; i <letters.length; ++i)
          IPrivateTestView.IXElement xElement = wdContext.createXElement();
          xElement.setY(letters<i>);
          nodeElements.add(xElement);
    //Bind node element list to the node
       wdContext.nodeX().bind(nodeElements);
    //Set node’s lead selection which determines the selected item
       wdContext.nodeX().setLeadSelection(1);
        //@@end
    Regards
    Ayyapparaj

  • How to add customized value to drop down by index binded to model attribute

    i have to Ui element Drop down by index to which i have binded model attribute for populating the values, now i want to add a customized value to it like "choose all".
    how can i do this ??
    Thanks and regards,
    Aditya Deshpande

    Create a value node similar to model node. In value node you can add element at the index wherever you want to:
    wdContext.node<nodename>().addElement(<index>,<element>);
    Regards,
    Murtuza

  • How to get the values of drop downs, which are gonna create at run time.

    As per my design requirement, I have to create drop downs in an ADF display table.
    The no# of rows of the table are gonna decide the no# of the drop downs. User can select the values from drop downs. My issue is, how can I capture the selected values of those drop downs as those are gonna created run time.

    Hi
    ohh ,ok ,then as u said that u r storing twenty values ,thats y i aksed earlier ,are these form values part of tbale ,or as u said 20 values are there ,for these u r creating 20 form values ???.
    My suggestion would be ,u do four calculation and put all your results in a hashmap ,and keep this hash map in to sesion ,using the following method
    pageContext.putTransactionTransientValue("HashMapName",myHashMap);
    and inside the PFR method when u want to display these values ,u can loop through your hashmap and can display these values.
    like this
    HasMap hm=pageContext.getTransactionTransientValue("HashMapName");
    thanx
    Pratap

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Extracting values from drop down buttons html forms

    Hello,
    I would like to know how to obtain the values which is selected through the drop down box. Iam using Java Script as a client side scripting lang..
    Here is my code so far..do let me know what to do further. Iam not getting the alert mesg which is sitting in the put() so let me know how the put method should work
    Thanks a lot
    avis
    <HTML>
    <HEAD>
    <script language="javascript" type="text/javascript">
    <!-- hide
    function put()
    choice = document.forms.Pri.list.optionsdocument.forms.Pri.list.selectedIndex]
    if (choice ="0")
    alert("enter state"+choice);
    function goto()
    Pri.list.options.value=" "
    //end -->
    </script>
    </HEAD>
    <BODY>
    <form name="Pri" method = "get" action="">
    State<SELECT NAME="list" onChange="put()">
              <OPTION>
    <OPTION>Alabama
    <OPTION>California
              </SELECT>
    <input type="submit" Value="Submit">
    <input type=button name="Reset" value=Reset onClick=goto()>
    </form>
    </BODY>
    </HTML>

    I'm not sure what you're talking about... if you don't select an option from the list, the onchange function isn't going to be called, so of course the the alert isn't working.
    You sound like you are complaining that when the form submits, the value for the select list is the first option (""). I fail to see why this is a problem. If the value is "", then you handle it like nothing was selected. In a single select list like that, an option is always selected. The whole point of having a blank option is to allow the user to pick it. Otherwise don't put a blank option.
    In general, you don't need to use a button to do reset, you use a reset button: input type="reset". And it'll reset on it's own.

  • How to get different values in drop down in  table rows

    Hi
    I have an application, which has a drop down in the table. Each row is to have different values in its drop down based on the "characteristic" parameter. For eg. first row has characteristic as color, and the corresponding drop down will contain the color names. Second row has charateristic as weight, and the drop down will carry corresponding weight values.
    I am getting the data from the backend as a flat table i.e. charaterisitc - value pair.
    I think i will have to use the Drop Down by Index control, but i dont know how exactly to go about it.
    Can any one please help in this regard.
    Thanks & regards,
    Anupreet

    Hi Maksim
    I am sorry, but i am not able to get you.
    This is the piece of code that i wrote for populating the drop down:
    IPrivateMaintainDocAttribView.IDropElement dropEle = null;
    for(int i = 0;i<size;i++)
                 dropEle = wdContext.nodeDrop().createDropElement();
                 dropEle.setDropval(wdContext.nodeCtxNode_DocAttribs().getCtxNode_DocAttribsElementAt(i).getCmpCtx_Value());
                 wdContext.nodeDrop().addElement(dropEle);
    Here, Dropis the sub node to which i am putting the data and thisis linked to the table.
    CtxNode_DocAttribs is the model node from where i am picking the data and setting in the subnode.
    Thanks & regards,
    Anupreet

  • 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

  • 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

  • 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

  • How to set default value for drop down box in jsf

    Hi,
    Can anyone help me to set the default value in drop down box using <af:selectManyChoice> ?
    As I know there is an unselectedLabel attribute in <af:selectOneChoice> but not valid attribute for <af:selectManyChoice>.
    Any help must be appreciated.
    Regards,
    AK

    Hi Frank
    My entity type is a List in managed bean. I have set the entityType in the constructor of the managed bean. I have attached my code here.
    TPSearchCriteriaBean.java****************************************
    /** Constructor */
    public TPSearchCriteriaBean() {
    super();
    entityType=new ArrayList<String>();
    entityType.add(UIConstants.LIST_ITEM_ALL);
    authorizationType=new ArrayList<String>();
    authorizationType.add(UIConstants.LIST_ITEM_ALL);
    companyType=new ArrayList<String>();
    companyType.add(UIConstants.LIST_ITEM_ALL);
    mrgStatus=new ArrayList<String>();
    mrgStatus.add(UIConstants.LIST_ITEM_ALL);
    legalStatus=new ArrayList<String>();
    setEntityType(entityType);
    setAuthorizationType(authorizationType);
    setCompanyType(companyType);
    setMrgStatus(mrgStatus);
    country = "0";
    //address = new AddressBean();
    UIConstants.java***********************************************************
    public static final String LIST_ITEM_DEFAULT = "select";
    public static final String LIST_ITEM_ALL = "0";
    LOVManager.java*****************************************************************
    public List<SelectItem> getLovList(String lovType, boolean requiredOption_SELECT, boolean requiredOption_ALL)
    log.debug("LOV loading for " + lovType + ": START");
    List<SelectItem> lovList = new ArrayList<SelectItem>();
    //check validity of lov loading request
    validLov:
    for (int i = 0; i < lovTypeArray.length; i++)
    if (lovTypeArray.equals(lovType))
    break validLov;
    log.debug("ERROR: LOV Type not valid.");
    return lovList;
    //First select is replaced by ALL here
    //<-- Select --> should be an option
    if (requiredOption_SELECT)
    lovList.add(new SelectItem(UIConstants.LIST_ITEM_DEFAULT, "--Select--"));
    LOVDao dao = new LOVDao();
    dao.loadLOVValues(lovType, lovList);
    log.debug("LOV Loading successful!");
    //<ALL> should be an option
    if (requiredOption_ALL)
    lovList.add(new SelectItem( UIConstants.LIST_ITEM_ALL, "ALL"));
    return lovList;
    Kindly help me.
    Regards,
    AK

  • 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

  • Populate Values for Drop Down by Index in Table in Web Dynpro Java

    Hi Experts,
    I have a table and having a column table cell editor as Drop Down by Index.
    I have created the table node (tbnode) and child node for DDBI (ddbinode) and set the singleton property for DDBI node to false.
    I have same local variable node as same as above node and the values are available.
    I have one button ADD.On click the add button i need to populate the values to table node and as well as DDBI Node.
    I created supply function for DDBI node and populate the values for DDBI Node.
    Add Method:
    IPrivateMdTest8CompView.ItbnodeElement tbnode = wdContext.nodetbnode().createtbnodeElement();
    tbnode.setDescription(wdContext.currentCn_LocalVariableElement().getDescription);
    wdContext.nodetbnode().addElement(tbnode);
    Supply Function Method:
    for(int j=0;j<wdContext.nodetbnode().size();j++)
    wdContext.nodeddbinode().setLeadSelection(j);
    IPrivateMdTest8CompView.IddbinodeElement ddbinode = wdContext.nodeddbinode().createddbinodeElement();
    ddbinode.setddvalue(wdContext.currentCn_localddvalueElement().getddvalue);
    wdContext.nodeddbinode().addElement(ddbinode);
    Problem is one i got the values in the drop down and i click the second row in table again the supply function calls and reset the first row drop down to original value.
    If you any problem like please provide the solution.
    Thanks & Regards,
    SatheshKumar R

    If you created the supply method by setting the supply property of the node, you should have variable 'node' available as argument of the supply method, which will be related to the table row of the triggered dropdown. Opening the dropdown does not change the lead selection of the parent node, so
    ddbinode = wdContext.nodeddbinode().createddbinodeElement();
    wdContext.nodeddbinode().addElement(ddbinode);
    does always relate to the first row of the table (given that leadSelection == 0). With the node variable you can
    IddbinodeElement ddbiElement = node.createddbinodeElement();
    node.addElement(ddbiElement);

  • How to populate multiple text boxes by selecting a value from drop down

    I apologize in advance if this is redundant, but I have searched this forum relentlessly to no avail. I have a form  connected to an MS Access database. The database is linked to another datadase on an Advantage server. This is dynamic data that has an ODBC driver allowing to link access tables to the Advantage data. Macros on access updates the table being used on this form. The livecycle form connects to the access data via a DSN on a machine that uses acrobat (not reader). This is a physician office, this form should expedite ordering radiology tests on patients. The plan is to use a drop down to select a chart number that will trigger several text boxes to populate dynamically with the corresponding demographic values like name, age, insurance etc.
    Using a data drop down I am able to select the chart number. When I used the example from the office supplies database, so that a button will trigger the event with the following code:
    if (Len(Ltrim(Rtrim(SelectField.rawValue))) > 0) then
    $sourceSet.DataConnection.#command.query.commandType = "text"
    $sourceSet.DataConnection.#command.query.select.nodes. 
    item(0).value = Concat("Select * from OfficeSupplies Where ID = ", Ltrim(Rtrim(SelectField.rawValue)) ,"") 
    I recieve a syntax error, despite adjusting quotation since I am using text rather than numeric fields.
    My question is the following:
    Is there a simple javascript that I can use to populate these text boxes (which may be read only but would be better if it allows user input)? Or does anyone recommend an alternative method? I would be happy with a link that solves this problem if someone can provide. I am somewhat familiar with js but open to any suggesstion.
    Thanks
    PS this form could also be linked to a Sequel database if that offers an advantage.

    The View object API has a setQurery() method that you can use to set the query as needed before executing it via executeQuery(). You can do this in a custom Application Module method exposed to its client interface and bound to the binding layer. You can call this method from your backing bean on a value change listener.

Maybe you are looking for

  • How can I install Adobe Reader 11 to a drive other than C:\?

    I downloaded Reader 11, but at no point during the installation process am I prompted for an installation location.  How can I install this to a drive other than the C:\?  I keep my C:\ and data storage drive separate so in the event the OS crashes I

  • I do not get 12 hours of battery

    Hello. I just purchased my 13 inch "Early 2014" Macbook Air about 4-5 days ago. I never maxed out at 12 hours as advertised, during the time that I've had this computer. It seems to be 9 hours at best. This is still new so I do not have a bunch of we

  • Physical Layer Joins

    I am creating a data model from a database that is in 3rd Normal Form. My understanding in the physical layer I should make the joins based on the relation between tables. I have a CUSTOMER & ADDRESS table and I understand that my join will be 1:M he

  • My MacBookPro is not finding external hard drive

    My 2TB WD Ultra My Passport external hard drive for Mac stopped showing in the Finder of my MacBookPro (10.9.1), although it does show as "Unmounted" in the Disk Utility. When I hit the "Mount" button, nothing happens. What do I do?

  • Who's using my hotspot?

    Is there a way to see who's actively using the hotspot on my iPhone 4S (iOS 6.1). I know it tells me how many people are connected in the blue bar however, I want to know if it's possible to see who they are (and what way they are connected). Thanks,