How to get the selected line in af:inputComboBoxListOfValues

Hello

Am on jdev 11.1.1.2.1.

Uses af:inputComboBoxListOfValues component, I've done the component based on the id of 'service' and the display value is "name of the Department.

In the value change listener I want to get the id of the selected service, but now I get only the name of the service. (using valueChangeEvent.getNewValue m:System.NET.SocketAddress.ToString (()))

So is it possible to get the whole line and get the "department id" using that?

Help, please.


Thank you
Hari

Sorry for the confusion, necessary to check it out:
This code should work:

    public void nameValueCangeListener(ValueChangeEvent valueChangeEvent) {
        FacesContext contxt = FacesContext.getCurrentInstance();
        valueChangeEvent.getComponent().processUpdates(contxt); // after this the new row is selected!
        BindingContext lBindingContext = BindingContext.getCurrent();
        BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
        JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("YOUR_LIST_BINDING_NAME");
        Row lFromList = (Row)list.getCurrentRow();
        Object lAttribute = lFromList.getAttribute("YOUR_ATTRIBUTE_YUO_WANT_TO_GET");
    }

Timo

Tags: Java

Similar Questions

  • How to get the selected line of the selecetOneChoise

    Hello

    I use jdeveloper 11.1.2.3.0

    I have a simple vision with 'id' and 'name' attributes
    I dragged the view as selecetOneChoise and has chosen to show only the name.
    When the value of the selecetOneChoise is changed, I need to use the 'id' of the new value selected as a setting for another opinion.
    I tried to get it through the iterator, like this:
     
          public void onValueChangeListener(ValueChangeEvent valueChangeEvent) {
            DCIteratorBinding it = getBindings().findIteratorBinding("firstIterator");
            Row row = it.getCurrentRow();
            
            DCIteratorBinding it2 = getBindings().findIteratorBinding("secondIterator");
            ViewObject vo = it2.getViewObject();
            vo.setNamedWhereClauseParam("p_id", row.getAttribute("id").toString());
            vo.executeQuery();
           }
    but I get the old value instead of the new value.

    no idea why this is happening?
    or y at - it another way to get the 'id' of the selected value?
    It is urgent, thank you very much!

    Use this solution in your method first, and then write the code...

    code................

    for example :-{} public void onValueChangeListener (ValueChangeEvent valueChangeEvent)
    FacesContext will involve = FacesContext.getCurrentInstance ();
    valueChangeEvent.getComponent () .processUpdates (contxt);

    DCIteratorBinding it = getBindings () .findIteratorBinding ("firstIterator");
    Line = it.getCurrentRow ();

    It2 DCIteratorBinding is getBindings () .findIteratorBinding ("secondIterator");.
    ViewObject vo = it2.getViewObject ();
    vo.setNamedWhereClauseParam ("p_id", row.getAttribute("id").toString ());
    vo.executeQuery ();
    }

    Popz

    Published by: Popz on 2 April 2013 05:34

  • How to get the selected row in a programmatic table of the ADF (table generated from a bean)

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    How to get the selected line in a programmatic (using a SortableModel custom not a display object) ADF table (generated from a bean)?


    We are trying to get the selected row in a bean of a programmatic ADF table to retrieve data based on the selected line.


    Any idea?

    Well, you can use selectionListener to set the selected line to a variable of bean (but this bean must be in extended view or some superiors)

    Something like this: http://www.awasthiashish.com/2015/07/get-selected-row-singlemultiple-from.html

    Dario

  • 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

  • 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

  • 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]








  • How to get the responsible line line is SOA Composite for Workflow OIMR2

    Hello

    I have a requirement to get the 2nd line in SOA Composite. For example a user (Jon) creates an application available to users on the target system. First approver's manager Jon user line and first line manager this gathering for payload Task.payload.beneficiaryDetails.managerLogin. Now the problem is Second line manager which Jon line manager Manager.

    How can we get this second hierarchy in Composite SOA? Can someone help me? is there an API for it?


    Thank you

    Tamim Khan

    Hello

    I have this problem as below, without using the API. I do this ruin sql in the database of the IOM.

    1. Add the variable ManagerLogin2 in the RequestDetails.xsd file in source modefing.

    2. drag the expression to the node ManagerLogin2 in the entitlement operation.

    3 Add the following query using QUERY-DATABASE in the EXPRESSION.

    oraext:query - database (concat ("Select DISTINCT LINE_MANAGER2 from USR_LINE_MANAGER_VW where the USR_LOGIN =', concat ("'", bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:Login'),)"'"")), false (), false (),'jdbc:oracle:thin:DEV_OIM / @localhost Password: 1521:idmdevdb')

    4. to make the simple SQL I use a view of database USR_LINE_MANAGER_VW in the scheme of the IOM as below:

    CREATE OR REPLACE VIEW "DEV_OIM" OF THE FORCE. "" USR_LINE_MANAGER_VW ".

    ('USR_LOGIN', 'LINE_MANAGER1', 'USR_KEY', 'LINE_MANAGER2')

    AS

    SELECT U1. USR_KEY,

    U1. USR_LOGIN,

    V2M USR_LOGIN AS LINE_MANAGER1,

    U3. USR_LOGIN AS LINE_MANAGER2

    USR U1,

    USR U2,

    USR U3

    WHERE U1. USR_MANAGER_KEY = U2.usr_KEY

    AND U2. USR_MANAGER_KEY = U3.usr_KEY;

    5. Select insertMessingToData in the operation of the legal successor.

    6. Add the line below in ApprovalProcess.bpel

    xmlns:oraext =http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc

    7. now, we can use Task.payload.beneficiaryDetails.managerLogin2 approvalTaskRules.

  • How to highlight the selected line in an interactive report in apex5?

    Hello

    I want to emphasize the selected line in the report by changing the background color of the line. Basically, I want to do this. I really want to do is, select a row in the report and according to the selected line, I want to retrieve other data to another interactive report on the same page. So, how can I do this?

    Hi geslin,.

    Garza says:

    But here shows a link to another page or something like that. But I don't need that. I just want to show when the user selects a specific row by clicking on this line, and it should show that it has been selected by changing the color of the line and after having extracted a few hidden field and according to those column data display data on another report on the same page.

    Check your Application-> Page 2 30870. I've set up a dynamic action to reach the line highlighted when selected.

    Here are the steps to achieve the highlighted line:

    • Changed the definition of class employee culminating point to CSS-> section of the line on the page:
    .highlight-employee
       {
        background-color: blue !important;
        color: white !important;
       }
    
    • Commented the code written in JavaScript-> Execute JS when the section of the page to load the page.
    • Edited the ROWID of your interactive report column and set the following properties for 'column link:

    Text link: #ROWID #.

    Link attributes: id = "" #ROWID # "class ="monlien""

    Target: URL

    URL: javascript:void (0);

    • Dynamic action created with the following properties:

    Name: highlight_selected_row

    Event: click on

    Selection type: jQuery Selector

    jQuery Selector: a.mylink

    Action: Run the JavaScript Code

    Fire on loading the Page: No.

    Code:

    var row_id = this.triggeringElement.id;
    $('#P2_NEW').val(row_id);
    $('#'+row_id).parent().closest('tr').find('td').addClass('highlight-employee');
    

    Scope of the event: Dynamics

    Kind regards

    Kiran

  • How to get the selected text in a TextInput

    Hallo. I have a textinput, and when the event doubleclick on a part of the text is sent, I need to get the selected text, and then save it in a string... How can I do?

    THX

    Max

    Hi Maximist,

    Below is the code snippet to get the selected text in TextInput on double click event:

    http://www.Adobe.com/2006/mxml '.

    Layout = "vertical".

    verticalAlign = "middle".

    backgroundColor = "white" >

    Import mx.controls.Alert;

    private void textInput_doubleClick(evt:MouseEvent):void {}

    Alert.Show (String (evt.target.text) .slice (evt.target.selectionBeginIndex, evt.target.select ionEndIndex));

    }

    ]]>

    Text = "the Bullfighter is out the path of the bull charge at the last moment, drawing the cheers of the spectators."

    doubleClickEnabled = "true".

    doubleClick = "textInput_doubleClick (event); "/ >

    Hope this will help you.

    Thanks and greetings

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

    Pooja Kuber | [email protected] | www.infocepts.com

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

  • How to get the 'selection' illuminated

    I have a vista 64. I had a few printing problem which I found out wasa because google chrom. I had one tech outside and the problem has been corrected. However, I have an impression left of problem that I hope someone can help me with. I'm trying to print part of a page. I am the part children and then go to the print page. However, I cannot print print the part because the only 'all' and 'pages' are turned on. "selection is not lit, so I can't click. Can someone tell me how to recover the 'selection '.

    Hey, Dolores,.

    Your computer is configured to display pages in full screen? When this happens press F11 on your keyboard and see if the button reduce reappears.

  • How to make the selection line more dark?

    It's my first time to use Photoshop CC, however, it is very difficult for me to see the selection line when I use "selection tool" to select an area, it is possible to adjust the darker line?

    Currently, I don't know of a way. However, I recommend that you post a suggestion on what makes the color and thickness of the pieces in the suggestion of photoshop forum.

    Community customer Photoshop family

  • How to get the selected values from the shuttle

    Hello

    Please tell me how to get the values of the option chosen by the shuttle leading the list.

    Thank you

    Check out this link and that this might help you.

    Attack-shuttle leak problem

    Thank you
    -Anil
    http://oracleanil.blogspot.com/

  • How to get the total line count COUNT (*) SELECT and put on a page?

    Hello

    I use JDeveloper 10.1.3.4. I need get the total number of rows in a table and display it on a page and the problem in doing so. At the sqlplus prompt the row count simply would be, for example:
       select count(*) from BILL;
    I wonder if having this simple number must be so complicated and if there is more simple, better ways. Here's how I do it and the problem encountered.

    1. the name of the page to display the number is summary.jspx. It has a grain of support that "summed" as the managed bean name in faces - config.xml, and the name of the bean class is "summary." The component output on the page is:
    <h:outputText value="#{summary.totalStudentsCount}"
                  binding="#{summary.outputText5}" id="outputText5"/>
    2. in summary the bean code is:
        private Number totalStudentsCount;
        public static int NUMBER = Types.NUMERIC;
    
        public void setTotalStudentsCount(Number totalStudentsCount) {
            this.totalStudentsCount = totalStudentsCount;
        }
    
        public Number getTotalStudentsCount() {
            ZBLCModuleImpl zblcam = getZBLCModuleImpl();
            LoggedInStudentImpl studentTable = (LoggedInStudentImpl)zblcam.getLoggedInStudent();
            String sql = "select count(lsap_uid) from BILL";
            studentTable.setQuery(sql);
            return (Number)CallStoredFunction(NUMBER, "get_total_students(?)", new Object[] {});
        }
    
        private ZBLCModuleImpl getZBLCModuleImpl() {
            FacesContext fc = FacesContext.getCurrentInstance();
            ValueBinding vb = fc.getApplication().createValueBinding("#{data}");
            BindingContext bc = (BindingContext)vb.getValue(fc);
            DCDataControl dc = bc.findDataControl("ZBLCModuleDataControl");
            ApplicationModule am = (ApplicationModule)dc.getDataProvider();
            return (ZBLCModuleImpl)am;        
        }
    
        protected Object CallStoredFunction(int sqlReturnType, String stmt, Object[] bindVars) {
            CallableStatement st = null;
            ZBLCModuleImpl zblcam = getZBLCModuleImpl();
            try {
                st = zblcam.getDBTransaction().createCallableStatement("begin ? := " + stmt + "; end", 0);
                st.registerOutParameter(1, sqlReturnType);
                if (bindVars != null) {
                    for (int z = 0; z < bindVars.length; z++) {
                        st.setObject(z + 2, bindVars[z]);
                    }
                }
                st.executeUpdate();
                return st.getObject(1);
            }
            catch (SQLException e) {
                throw new JboException(e);
            }
            finally {
                if (st != null) {
                    try {
                        st.close();
                    }
                    catch (SQLException e) {
                        throw new JboException(e);
                    }
                }
            }
        }
    The idea of calling a stored function usnig as a "helper" method is 25.5.3 in the Developer's guide, which is closest to you in my need. It's for the functions with the one IN argument; but in my case, the function is not any argument IN. That's why, when you call the helper method CallStoredFunction(), I gave an empty as the last argument and amazing array that caused the problem:
    return (Number)CallStoredFunction(NUMBER, "get_total_students(?)", new Object[] {});
    3. the registered function has been tested and works fine at the sqlplus prompt:
    create or replace function get_total_students
       return NUMBER
    AS
       v_student_count NUMBER;
    BEGIN
       select count(ldap_uid)
       into v_student_count
       from bill;
       return v_student_count;
    END;
    4. when the summary.jspx page is run, the browser is full of error messages, the first long line is here (I have split several online for ease of reading):
    javax.faces.el.EvaluationException: 
      javax.faces.el.EvaluationException: 
        Error getting property 'totalStudentsCount' from bean of type 
        zblc.viewcontroller.backing.staff.Summary: oracle.jbo.JboException: 
          JBO-29000: Unexpected exception caught: 
            java.sql.SQLException, msg=Missing IN or OUT parameter at index:: 2
    Thus,.
    (1) what is the problem? What is this parameter IN or OUT of {color: red} index: 2 {color} consult? It has to do with the empty array as the last argument in the call to the helper method?
    (2) this approach is an overdose, and are there more simple and better ways?

    Thank you very much for help!


    Newman

    Hello

    Is there a specific reason why you don't simply create read only object to display with some count (*) as OFCASES from MYTABLE and then just drag and drop the attribute ofcases in page?

    Kind regards

    Branislav

  • How to get the second line in an indented bulleted list...

    Hello

    I understand how to get flea and list numbering, and I added numbers to a list that will be used (although the content will be replaced) on about a hundred pages of my cookbook.  Many numbered tickets are just a single line, but some entries are two or three lines, and in these cases, the text begins on the left directly under the number on it - I prefer the second and third lines of text to start directly under the text in the above numbered line.  In which case I'm not explain correctly, here is a small screenshot (it comes through hope):

    screenshot_1030.png

    Did someone mind telling me how to solve this problem?

    Thank you very much

    Malcolm

    Can you show a screenshot with the same panels open screen I've had, and the selected numbered text?

    Also, I should have mentioned that to move just down half of the arrow on the tab of the Panel, you must hold down the SHIFT key at the same time.

  • How to get the fixed lines per page? really Urgent!

    I am facing problem with the fixed lines per page. The footer (Subtotal) block moves upward, leaving space at the bottom when the number of items is lower.

    I have a two groups: one for the KIT and the KIT COMPONENTS. When I'm generation report for KIT only ITEMS I'm attaches footer using the

    < name of xsl: variable = "no_of_lines_per_page" select = "number (30)" / >
    <? for-each@section:Q1? >
    < xsl: variable xdofo:ctx = 'incontext' name = "inner_group" select=".//Q2"/ >
    <?-foreach: $inner_group? > <? If: (position () - 1) mod $no_of_lines_per_page = 0? >
    < name of xsl: variable = "first_rec" xdofo:ctx = 'incontext' select = 'position ()' / >

    but when I try to generate the report in combination with KIT COMPONENTS together, I am not able to set the number of lines per page. The footer is allocated to the next page. Now I Q2 and Q3 where Q2 makes Parent Kit and Q3 is child components Kit.

    How can I get it fixed lines per page for Q3 in regards to the Q2?

    I would appreciate if someone can answer me quickly.

    You have sent the updated RTF.

Maybe you are looking for

  • Pavilion AMD A8-6500: graphic upgrade

    Hi all My son has a HP Pavilion AMD A8-6500 with Radeon HD 3.50 ghz graphics card. It now wants to update as graphic says not good enough. What our options are, what is implementing implement as buying a better graphics card or is it more complicated

  • Satellite C660-11W - Num pad does not work

    Hello! I have a Toshiba Satellite C660-11W, which I bought 10 months ago. Since October, the num of my laptop keypad does not work, but when I press the "Num Lock" button, it makes a noise as I had turned on the StickyKeys. How can I solve this probl

  • How to elucidate table cells

    Hello I would like to clarify the values of the cells in table updated with the following values. Is there a way to clean up the previous values (or reset the values of cells) to the table? A set all values default cell? My question is this. The "str

  • where can I find the drivers to add the HP Pavilion photosmart printer

    When I try to add my photosmart c6100 for my new HP Pavilion pc, it is not on the list.  I have the disk but it is not for a 64-bit pc.  where can I find the drivers to add the photosmart printer?

  • Unable to perform a custom installation of Windows 7. I have an error message "device driver is missing."

    Cannot install windows 7 on my Acer Aspire 7730 G, which I am trying to install windows 7 on im, but the instillation page goes on to say that there is no driver found. Is there anyway that I can fix this? Record: http://www.cnet.com/products/acer-as