identification of the line-click button in af:table

I have an af:table with 1 column contains buttons. By clicking on each button I want to take a few steps. How can I determine which button has been clicked (which line)?

his project faces an adf.

thnks

Kamal,

If you use the binding of the ADF layer (that is, if you are using a data control), then Yes, you can use the referenced code earlier in this thread.

If you do not, then what you could do is to use the tag [url http://www.javabeat.net/tips/42-fattribute-tag-in-java-server-faces-jsf.html] of f: attribute on your command button to add an attribute to your button containing the value you need.

John

Tags: Java

Similar Questions

  • Using the mouse, the right click button is continually pressed inadvertently

    While using the mouse, the right click button is continually pressed inadvertently.  IS THERE A WAY TO PREVENT ACCIDENTAL CLICK RIGHT TO ACTIVATION?

    If the manufacturer of your laptop includes options for your touchpad, I would check those to see if the right click function can be turned off or customized how make you these options I can't tell you, because Microsoft is not build to tap keys or options software for them.  Only your PC manual or manufacturer can tell you exactly how to set these options (if they exist).

  • How can I change the "right click" menu for a table control?

    Hello

    How can I change the "right-click menu" of a table control. I would like to be able to remove the ability to add or remove columns and maybe more selections. I want to keep the possibility of

    Add or remove lines

    Right-click on your table.  Then go to advanced-> DURATION Shortcut Menu-> Edit.

  • How to hide and show based button if the line is selected in a table

    Hello

    IM pretty new to apex. I use version 4.1. I have a tabular form and I want to do is only have the button Show delete if I select a row in the column [line selector]. Is this possible using a dynamic action? I tried this way without success. Please help or let me know if you need more information.

    Thank you

    Do you mean if the box is checked in the line?

    Assign a static ID for the button Delete, for example MY_DEL_BTN. Search for 'Static ID' in the attributes of the button section.

    If so, do an advanced Click-based dynamic Action and a jQuery selector. Generally, this element is the name "f01" but, sure. Assuming that it is "f01" then your jquery selector would be:

    input[name="f01"]
    

    define the scope of the event live.

    Your dynamic action will trigger JavaScript. (BE SURE TO DESELECT FIRE ON PAGE LOAD). To make sure that you have the jQuery selector right, initially just to put a pop-up message in the JavaScript.

    alert('You Clicked the Row Selector!');
    

    Run the page. Click on the line selector. If you get the noise until you have specified the jQuery selector correctly. Yay!

    Then, assuming the above is correct. You can now determine if all have been selected.

    Now, set it to SELECT FIRE on PAGE LOAD (you want deleting DialogResult.Cancel when you open the page).

    Change your JavaScript like this:

    var checkedCnt = $("input:checked").length;
    
    if( checkedCnt > 0 )
    {
       $('#MY_DEL_BTN').show();
    }
    else
    {
       $('#MY_DEL_BTN').hide();
    };
    

    -Joe

  • hoiw put create filter from message function on the function of the right click button

    I had the option to filter on the right click only once, but after update, it went. I used it to get rid of the site e-mails unwanted until I opened the mail. Sure was nice like that.

    You can refer to the add-on 'quickFilters '.

    Thunderbird menu: tools: Modules of Type 'quickFilters' in the top search box.

  • How to access all the lines one by one, a table ADF via managed bean

    Hi Experts,

    Hi I'm new in the ADF.

    Could someone help me to fix the case below?

    Scenario - I have a table called Test_T1 that have 4 columns C1, C2, C3, C4. Creation of EO, VO and AM for test_t1.
    When created in pages ADF, I selected the option "automatically exposed components UI in new managed bean" (mynewmanagedbean.java).
    Control data drag and drop Test_T1 table in the page as a table of the ADF.
    Set the properties is read-only C1, C2, C3 and C4 is an input text.
    Add after the table and attathed button action on the mynewmanagedbean.java bean managed.
    At the time of the Test_T1 page filled with a few No.. lines (such as 9).
    How can I access all the lines above through the key without selection of these.
    In fact, I want to print all the rows of the table in the log at the time to press the button.

    Thanks in advance.

    Sorry for the delay, the code was copied from another test case. You can work directly with the line...
    I created a new test case based on the departments of the HR schema table:

    import oracle.adf.model.BindingContext;
    import oracle.adf.model.bean.DCDataRow;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.logging.ADFLogger;
    
    import oracle.jbo.Row;
    
    public class DumpRows
    {
        private static ADFLogger _logger = ADFLogger.createADFLogger(DumpRows.class);
        public DumpRows()
        {
        }
    
        public String cb3_action()
        {
            DCBindingContainer bindings =
            (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding dcIteratorBindings =
            bindings.findIteratorBinding("DepartmentsView1Iterator");
    
            // Get all the rows of a iterator
            Row[] rows = dcIteratorBindings.getAllRowsInRange();
            for (Row row : rows) {
                String depname = (String)row.getAttribute("DepartmentName");
                _logger.info(depname);
            }
            return null;
        }
    }
    

    As you do not have the class of line interface build you must get the attributes in their names. Be careful here, because any misspelling is cought only when you run the application.

    Timo

  • JavaScript - how to refer to the line/field directly above a table

    I have a tabular presentation this tab of people through data entry fields

    some of the data is inserted before when the page is loaded

    However when they tab for a certain area I would like only to copy the data from the same field in the line above

    at the point where they (OnBlur) tab out of the field, I copy the contents of a Page element, and then I tried to copy it in when the field gets focus
    but he doesn't seem to like an OnFocus and OnBlur an in the same field? is this correct?

    So if I could reference the field above I could copy it directly, I've used the reference nextsibling for the fields in the same line, I was wondering if there was something different

    Thank you very much

    Chris

    Hi Chris,

    The onfocus and onblur should work ok on the same ground. You will be perhaps easier to use the attribute 'name' instead. This allows you to refer to the collection of fields of the same name, working would out which one is the current field and then look at that before that. I've done here, in the SAL column: [http://apex.oracle.com/pls/otn/f?p=55989:3]

    In region Header region, I have:

    <script type="text/javascript">
    function copyPrevious(o)
    {
     var x;
     var v;
     v = "";
     var f;
     f = 0;
     if (o.value == "")
     {
      var oName = o.name;
      var oID = o.id;
      var items = document.getElementsByName(oName);
      if (items)
      {
       for (x = 0; x < items.length; x++)
       {
        if (items[x].id == oID)
        {
         if (x > 0)
         {
          f = x - 1;
          break;
         }
        }
       }
      }
      if (f > 0)
      {
       o.value = items[f].value;
      }
     }
    }
    </script>
    

    and as attributes of the element of the SAL column, I have:

    onfocus="javascript:copyPrevious(this);"
    

    Andy

  • Highlight the line on slot form of table

    I would like to be able to highlight a row of data on a form in a table based on a column of some data. I found many here messages that reference standard reports, but is there a way to highlight an entire line of data based on some criteria of tabular form?

    Thank you!

    A proposal, you have removed the standard formatting for other lines by crushing. On the top of my head, you should leave the standard formatting in first position and add a second condition for your highlighted line.

    Gus...
    Please mark this and any other position as useful or correct
    ;-)

  • reverse in the lines in a 2D-string table

    Hello

    I have a simple question.but kind, I tried many things and could not help. I need to reverse a 2D channels in rows.just table to make it clear, I do an example:

    a, b and c

    d e f

    g h i

    and I want to do

    g h i

    d e f

    a, b and c

    How can I do this?

    Here's what I'd do.

  • Re: The right click of the mouse does not work on the Satellite L450 - 18 d

    My laptop is about 2-3 months and today just as the right click button stopped working completely.
    I did a system restore with still no luck.

    Any ideas?

    > the right click button completely stopped working. I did a system restore with still no luck. Any ideas?

    It can be hardware junk... Perform a recovery with a recovery disk procedure to make sure that is not os/driver associated. Otherwise, contact the service centre in your country, it will fix it for free under warranty

  • Coloring outside the lines

    Excuse my naiveity...  I'm a newbie to Illustrator (better in photoshop).

    I have vector art - art line - which was provided by a freelance artist, I work with that.  He made the drawing line and then I usually look in photoshop and good color seems to us.

    That has always worked perfectly (for printing), but now we use a manufacturing process which is digital and requires the vector art.  I'm trying to understand the best way to 'paint' the art in illustrator.

    I found the live paint and it's great, but I need the colour to be a bit more "sloppy" - as the art of the child.  It takes approximately fill the spaces rather than fill them perfectly.

    Is there a simple way to do this?  Is there a way to make their own layer of color areas and then manipulate them?   I have about 25 designs that I need turnover as soon as possible to the company that did the job for us.

    I searched on the web constantly and can't find anything that addresses this...

    Thank you very much in advance for your help.

    itsnotthatbad,

    The line drawing seems to be filled with white.  How can I erase the white in the lines (similar to a Magic Eraser in photoshop)?

    Select all the art of the line, click on the fill area at the bottom of the Toolbox and set it to None.

  • Can not access the rows of an item of table no-netsed in execution of the embedded R

    Hi all

    I am running a script R (R running embedded) oracle database

    I use under request

    Select *.
    table (rqEval (cursor (select 'divider' 50, 500 "numDots" of the double),))
    "select 1 id, 1 double val,"
    'myRandomRedDots2'));


    I want to save the result in a variable. So under anonymous block has written


    declare

    ID number (10);

    Val number (10);

    Start

    SELECT id, val in id, val

    table (rqEval (cursor (select 'divider' 50, 500 "numDots" of the double),))

    "select 1 id, 1 double val,"

    'myRandomRedDots2'));

    end;

    /

    But I get the error "can not access an element of no nested table lines.

    The one you suggest please how to fix this.

    Thank you

    Billa


    Billa,.

    You see the error "can not access the lines of a no nested table element" of PL/SQL, because rqEval (..., ' select 1 id, 1 double val ',')

  • To remove the line on click of a button

    Hi friends,

    I use JDeveloper 11.1.1.5.0.

    I have a table full of 10 lines. I have a delete button. Click on the button I want to delete the selected line.

    The method works well, but compared to the level of the page it will not be deleted immediately.

    If I refresh the page, then it shows that the line is deleted.

    Please help me.

    Thank you

    $@M$

    Add the following two lines in your code before the return of rt;

    this.getEmployeeDetailsVO1().clearCache() ;
    this.getEmployeeDetailsVO1().executeQuery() ;
    

    as for your code below

    ExternalContext ectx =
    FacesContext.getCurrentInstance().getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
    HttpSession SessionId = (HttpSession)ectx.getSession(true);
    String Id = (String)SessionId.getAttribute("Id");
    

    You can simply use

    String Id = (String)ADFContext.getCurrent().getSessionScope().get("Id");
    

    And the value in use of session

    ADFContext.getCurrent().getSessionScope().put("Id","YOUR_VALUE");
    

    Let me know if it works for you :)

  • Disable "back" command to the mouse 3 button, "the wheel" - click.

    Since as long as I remember the mouse 3 button on my Logitech MX518 has the following function:
    (1) when an unlink element is pressed, nothing happens
    (2) by pressing a link; This link opens in a new tab.

    Sometimes in the past 6 months the new behaviors introduced as follows:
    (1) when you press a non-link element, the "back" command is executed.
    (2) by pressing a link; This link opens in a new tab.

    The part boring here is that if I miss-click on a link, the current tab load the last page visited, which kind of the opposite effect, I want to. I want to open a link in a new tab and stay on the current page I read.

    So my questions:
    (1) this is a feature of Firefox (or maybe behaviors specific site?) and if so, what was it introduced?
    (2) can I turn off this feature, for example, subject: config?

    You may have a problem with the mousewheel.*.action prefs and Firefox thinks you want to go back in the history of the tab.

    You can try to put them all to 0 or 1 to make the scrolling of the page.

    See http://kb.mozillazine.org/About:config_entries #Mousewheel.

    • MouseWheel.with*.action 0:Scroll lines; 1:scroll the Page; 2:history; 3:TextZoom;
  • When I enter a Web site in the url of the Enter key does not work. I have to click on the arrow at the end of the line. Is this a configuration problem?

    The Enter key does not work in the line of the URL. If I go says:
    www.Bing.com
    and then press the Enter key, nothing happens.
    I have to click the arrow at the end of the field in order to activate the link.
    If I am anywhere else on any page the Enter key works as it should.

    Please click the button of resolved next to the answer that solved your problem of Firefox support, when you are connected.

Maybe you are looking for

  • How to disable notifications from Toshiba?

    I have a new satellite running Vista. In the task bar, there is a small red dot with a white triangle in it named "Toshiba notifications. It happens every time I restart or start the laptop. He asks me to register my laptop with Toshiba. The problem

  • MacBook Pro with screen Retina or normal MacBook Pro?

    HI, I want to buy a MacBook Pro, but I don't know what we should I buy, the retina or normal? I look at the series and videos from YouTube and I want to edit videos and my pictures if I buy one, so I thought that the retina it would be better for me,

  • 70080001 happens when I do a windows update and only goes to 7% help!

    When I do a windows update it starts and then says windows encauntered an error with the 7008001 code what should I do to fix this

  • Intention to release

    I use the Android adb shell and want to use the same thing about bb10. I have an android application scope. On android, I could use the command: "adb shell am broadcast - a com.example.example.EXAMPLE. for the sending of the intentions of the PC. Is

  • Police system after upgrading DevAlpha

    After the update, the system font in applications is different.  I read on one of the long threads (but can't find it now) that someone else saw this and he had a way to solve it?  Everyone remembers what it was?