Re: Getting the current selected Row & column in adf table

Hi,
Our requirement is we have to retrieve both the current row and column in adf table.
We can retrieve the current row in the backing bean like
ViewObject view = getViewObject();
view.getCurrentRow();
Is it possible to retrieve selected column id or column header text as we are getting for row?
please give some sample.
Thanks,
Vijay.
Edited by: Vijayakumar Palanisamy on Jun 23, 2011 2:23 AM

Hi John
My exact requirement,
1.     We have collection of records in adf table
2.     Each cell in the row has commandImageLink (Like adding approver, edit approver, delete etc)
Currently it’s working fine for me in the commandImageLink listener, but the problem is table is refreshed 2 time,
while selecting a record and commandImageLink is clicked, I have to avoid 2 times refreshing,
If it’s possible to identify a particular cell in the row selection, I can avoid the image link listener.
we are using Jdeveloper11.1.1.4.0
Please suggest.
Thanks,
Vijay

Similar Messages

  • Need help on how to specify the current select row in a View Object

    Hi,
    I have a ADF table on my page, when I was selecting the rows in this table, I want the set and get methods in the ViewRowImpl class to do some customized actions. I found out that each time regardless the row I select in the table, the viewrowimpl class will always return the data in the first row, I tried to use getCurrentRow in VO row impl. but still, gets the first row.
    Does anyone know how to get the selected row value in the View Object, or View Row Impl rather???
    Thanks!

    Hi,
    you can call a method exposed by the AM and pass teh rowKey of the selected row as an argument. When you configure the exposed AM method in the pageDef (creating a method binding) the argument is shown in a dialog from where you can use EL like #{bindings.iteratorName.currentRow.rowKey} to access the current selected row.
    Frank

  • JTree: How to get the currently selected node

    How do I get the currently selected node in JTree?
    getLastSelectedPathComponent() this method always return the last selected node and not the current one.
    Thanks in advance
    Sachin

    Use
    TreePath selectedPath = tree.getSelectionPath()If your tree allows multiple selections, use
    TreePath [] selectedPaths = tree.getSelectionPaths() this will return an array of all selected tree paths.
    Once you get the tree path, call the treePath.getLastPathComponent(). this should tell you the currently selected node.
    Hope this helps
    Sai Pullabhotla

  • I want to get the current Cursor row number

    Hello!
    Is it possible to get the current row number of a cursor in a cursor loop?
    for c_1 in cursor_1
    loop
    dbms_output.put_line(c_1. ???) --> this should show: 1 in the first loop ,2,3,...
    endloop
    best regards,
    wolf

    SQL> declare
      2  cursor c is
      3  select * from emp;
      4  begin
      5  for r in c loop
      6    dbms_output.put_line(c%rowcount);
      7  end loop;
      8  end;
      9  /
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    PL/SQL procedure successfully completed.Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • How to get the current selected value of a combo box or a option button?

    Hello All,
    I want to catch the current selected value of a combo box and also of a option button and want save it into different variables in my code. These option button and combo box are in a SAP business one form which I have created through VB dot.net coding.
    But I don't know how to do that, can any one send any example code for this.
    Regards,
    Sudeshna.

    Hi Sudesha,
    If you want to get the selected values you can do it as follows: The Combo Box value you can get from the combo box. If you want to get it on the change event, you must make sure that you check when BeforeAction = False. If you want to get an Option Button value you should check the value in the data source attached to the option button.
            Dim oForm As SAPbouiCOM.Form
            Dim oCombo As SAPbouiCOM.ComboBox
            Dim oData As SAPbouiCOM.UserDataSource
            oForm = oApplication.Forms.Item("MyForm")
            oCombo = oForm.Items.Item("myComboUID")
            oApplication.MessageBox(oCombo.Selected.Value)
            oData = oForm.DataSources.UserDataSources.Item("MyDataSourceName")
            oApplication.MessageBox(oData.ValueEx)
    Hope it helps,
    Adele

  • Get the currently selected entry point

    Hello,
    I developed an content iview, where i have to find out which entry point is currently selected in the navigation.
    Anyone an idea how to do this?
    Thanks and Regards
    Robert

    Hi Robert,
    Using the breadcrumb you can get the navigation of the current selection...
    Try out this blog
    EFP: Working with the New Taglibs - Part 2
    -Aarthi

  • How to get the current selected column and row

    Hi,
    A difficult one, how do i know which column (and row would also be nice) of a JTable is selected?
    e.g.
    I have a JButton which is called "Edit" when i select a cell in the JTable and click the button "Edit" a new window must be visible as a form where the user can edit the a part of a row.
    Then the column which was selected in the JTable must be given (so i need to know current column) and then i want the TextField (the one needed to be edited) be active with requestFocus(). So it would be
    pricetextfield.requestFocus();
    Problem now is that i have to click every time in the window the JTextField which was selected in the JTable. I have chosen for this way of editing because my application is multi-user and it would be too difficult for me when everybody did editing directly (catch signals, reload data, etc.).
    My question is how do I know the current column and the current row in a JTable?

    I'm not sure what your mean by the "current" row or column, but the following utility methods return
    which row and column have focus within the JTable.
    public static int getFocusRow(JTable table) {
        return table.getSelectionModel().getLeadSelectionIndex();
    public static int getFocusColumn(JTable table) {
        return table.getColumnModel().getSelectionModel().getLeadSelectionIndex();
    }

  • Field to make uneditable only for the current/selected row

    I have a web dynpro application and I  wanted to make some fields uneditable and for this I have done the following:
    I bound a context attribute to the readOnly property of all the fields you want to control. Then in the onEnter event of the main field, I set the value of this bound context attribute to ABAP_TRUE to change the state of the corresponding UI elements.
    I have written the following in the onenter event of the main field:
    DATA lo_el_context TYPE REF TO if_wd_context_element.
       DATA ls_context TYPE wd_this->element_context.
       DATA lv_editable TYPE wd_this->element_context-editable.
    *  get element via lead selection
       lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
       IF lo_el_context IS INITIAL.
       ENDIF.
    *  @TODO fill attribute
    *  lv_editable = 1.
    *  set single attribute
       lo_el_context->set_attribute(
         name =  `EDITABLE`
         value = 'ABAP_TRUE' ).
    Now the issue is that when I hit enter on the main field all other fields gray out/uneditable for all the rows, what I want is the other fields should be greyed out only for the row where I am entering the main field and hit enter.
    Can you please tell me how can I do that?
    Thanks,
    Rajat

    Hi Raj,
    You are not getting it. When you have only one context attribute and bind that to all the rows/columns of the table then everything will be enabled or disabled.
    In your case, create a local node with cardinality 1:1 inside the node you already have.
    Write a supply a function for this node.
    Add a attribute read_only of type wdy_boolean.
    bind this attribute to the read_only property of the table columns.
    in the supply function based on the element conditions you might have enable this attribute of disable.
    supply function method already has the necessary code , you only need to enable the commented lines and put your if ..end if  code around it.
    See a example.
    * General Notes
    * =============
    * A common scenario for a supply method is to aquire key
    * informations from the parameter <parent_element> and then
    * to invoke a data provider.
    * A free navigation thru the context, especially to nodes on
    * the same or deeper hierachical level is strongly discouraged,
    * because such a strategy may easily lead to unresolvable
    * situations!!
    *  if necessary, get static attributes of parent element
      DATA ls_parent_attributes TYPE wd_this->element_sflight.
      parent_element->get_static_attributes(
        IMPORTING
          static_attributes = ls_parent_attributes ).
    ** data declaration
      DATA ls_prop TYPE wd_this->element_prop.
    ** @TODO compute values
    ** e.g. call a data providing FuBa
      IF ls_parent_attributes-carrid <> 'LH'  .
        ls_prop-read_only = abap_true.
      ELSE.
        ls_prop-read_only = abap_false.
      ENDIF.
    ** bind a single element
      node->bind_structure(
        new_item             =  ls_prop
        set_initial_elements = abap_true ).

  • How the get the current dataTable row

    I have a dataTable with the value from List in the BackingBean.
    The script is printing the list elements, and I want to get the number of each row. I don't have any enumaration in for the records. Can it be done simply?
    Thanks for answer.

    You can use HtmlDataTable#getRowData() to retrieve the current row object in the iteration.
    But you just want to retrieve row numbers? Then rather use HtmlDataTable#getRowIndex().
    Also see http://balusc.xs4all.nl/srv/dev-jep-dat.html for several datatable use examples.

  • VS2013 / Team Explorer vsix - How to get the currently selected build definition?

    Greetings,
    My goal with a simple extension is to right-click any build definition and if my "Show Build Def Stats" menu item is selected, pop a message box with some summary details I plan to pull from the IBuildDefinition interface.
    I'm missing something fundamental I'm sure, but I cannot figure out how in the menu handler the actual build definition that I clicked on.
    The menu command is added where I want it successfully:
    Symbol info used to get this there:
        <!-- This is the Build Definition Context Menu -->
        <GuidSymbol name="guidTeamExplorerBuildDefContextMenu" value="{34586048-8400-472E-BBBF-3AE30AF8046E}" >
          <IDSymbol name="menuBuildDefinitionContext" value="0x109"/>
        </GuidSymbol>
    I am stumped as to how to get the fact that I clicked the "ISRepository" build definition in either the Initialize() or MenuItemCallBack() methods, I haven't come across the right service or container object that I recognize.
    Much obliged!
    --Jordan

    I have been investigating this for a while using .NET Reflector and finally I got it:
    In VS 2013, add references to the following assemblies in the folder C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer:
    Microsoft.TeamFoundation.Controls.dll
    Microsoft.TeamFoundation.Build.Controls.dl
    And then use this code:
    Microsoft.TeamFoundation.Controls.ITeamExplorer teamExplorer;
    Microsoft.TeamFoundation.Controls.ITeamExplorerPage teamExplorerPage;
    Microsoft.TeamFoundation.Build.Controls.Extensibility.IBuildsPageExt buildsPageExt;
    teamExplorer = base.GetService(typeof(Microsoft.TeamFoundation.Controls.ITeamExplorer)) as Microsoft.TeamFoundation.Controls.ITeamExplorer;
    teamExplorerPage = teamExplorer.CurrentPage;
    buildsPageExt = teamExplorerPage.GetExtensibilityService(typeof(Microsoft.TeamFoundation.Build.Controls.Extensibility.IBuildsPageExt)) as Microsoft.TeamFoundation.Build.Controls.Extensibility.IBuildsPageExt;
    foreach (Microsoft.TeamFoundation.Build.Controls.Extensibility.IDefinitionModel definitionModel in buildsPageExt.SelectedDefinitions)
    System.Windows.Forms.MessageBox.Show(definitionModel.Name);
    * My new blog about VSX: http://www.visualstudioextensibility.com * Twitter: https://twitter.com/VSExtensibility * MZ-Tools productivity extension for Visual Studio: http://www.mztools.com.

  • How to get the number of rows in a HTML table in some other page

    Hi,
    I am incrementing HTML table rows on button click and saving number of rows in a javascript variable. But on submitting that page I need that number of row value in the following page
    example:
    HTML table is in the page first.jsp
    and the javascript variable having the current row number is row_number
    on submitting it goes to second.jsp page. There i need that row_number value.
    Can anyone help me to solve this?
    regards,
    carry

    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt"+></td></tr>";
    document.profileform.submit;
    on submit it goes to the second page, but the value i got using >>>System.out.println("row number from text >>>box"+request.getParameter("rowNum")); is null. What is wrong with >>>my coding. Can anyone solve this.HI carry
    Check the value of bold data
    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));var cnt=inRow
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt+"></td></tr>";
    document.profileform.submit;
    }try with it

  • How to fix the width of sorting column about adf table ?

    I develop project with ADF in jdeveloper.
    When click on the sorting column header in adf table,it will adjust the width of the sorting column header.It will make page shifting.
    How can I do to avoid the adjusting ?
    How can I do to fix the width of soting table header?
    Any hint will be appreciated.
    Thank you!
    Message was edited by:
    user618145

    I have set the column width like this:
    in style.css:
    /** Column Settings **/
    af|column::header-text
    background-color:#F0EDE1;
    color:#000000;
    font-family:Arial,Helvetica,sans-serif;
    font-size:12px;
    font-weight:bold;
    padding-left: 2px;
    padding-right: 2px;
    padding-top: 3px;
    padding-bottom:3px;
    border-color: #B5B5B5;
    WIDTH: 120px;
    af|column::sortable-header-text
    background-color:#F0EDE1;
    color:#000000;
    font-family:Arial,Helvetica,sans-serif;
    font-size:12px;
    font-weight:bold;
    padding-left: 2px;
    padding-right: 2px;
    padding-top: 3px;
    padding-bottom:3px;
    border-color: #B5B5B5;
    WIDTH: 120px;
    and in jsp page,write like this:
    <af:panelBox text="test" width="1000" background="dark" >
    <af:table emptyText="" value="#{ftOverview.listOfTransefersVect}" var="transfers" width="100%" banding="row" bandingInterval="1">
    <af:column sortable="true" sortProperty="transactionId" headerText="#{resources['ft_overview.ref']}" formatType="text" width="39"
    noWrap="true">
    <af:outputText value="#{transfers.transactionId}" escape="false"/>
    </af:column>
    </af:table>
    </af:panelBox>
    but it seems doesn't work well.

  • When syncing, i often do not get the current selections added or past selections deleted fom the ipod. any suggestions?

    when i sync up my ipod, i select new songs to add and remove. although itunes on the computer says syncing, the songs are not put on or taken off. any help to fix this would be most appreciated.

    get an iPhone? 
    as to date - that is an EXIF entry placed there by the camera (phone) and iPhoto just reads it so the cause is the phone recording it incorrectly somehow - you can export one to the desktop and look at the EXIF data using simple EXIF viewer - http://homepage.mac.com/aozer/EV/
    As ro faces, iPhoto does not distinguish by camera - it processes photos - if the photos taken by one camera are acting differently from the photos taken by other cameras then again I would look to the camera - contact their support
    LN

  • How to get the Query Layout (Rows & Column fields)

    Hi,
    Any idea where in the backend repository the SAP BW query attributes are stored.
    I have created a Query using Query analyzer and i would like to where exactly this query info is stored. is there any BAPI that would give this info if i provide the query name?
    Thanks,
    Ram

    Hi Ram,
       You can see the query details from Metadata repository. againest perticular infoproviders and quiries.
    Hope it Helps
    Srini

  • How to get the sum of  a column in a table layout region

    i have page table layout region and i have many rows in that ...i have a column say xyz now i want the sum of all xyz in all rows ...is that possible ..if it is how..????
    please help me out in this issues...so that i can proceed further with my work..im stuck otu here....if the solution r there in the devguide please tell me where it is ..i mean under which section...bcoz it 1400page document...

    If you are mentioning about table/advanced table region you can enable totalling in those regions. Please check the Table / Advanced Table section as appropriate in Chapter 4 of the dev guide.
    If it is not a table / advancedTable then you will have to programmatically total the column value and display it in the appropriate cell.

Maybe you are looking for

  • How can i export a 24bit avi file from photoshop for mac?

    how can i export a 24bit avi file from photoshop for mac? i have a client that specificly needs the files to be avi and in 24bit what are the settings that i need to use to export the video using photoshop on a mac?

  • Serious boot issues with Powerbook G3 (Wallstreet II, OS 9.2.2)

    Hello, I have major issues with a Powerbook Wallstreet II I got recently. When it's finally running, it works just as well as Wallstreet Powerbooks usually do, no errors, no crashing, smooth performance, everything fine. But booting it up is, to put

  • Setting $PATH using the terminal

    Hi All! I am a newbie with OS X and I am wondering as to how to add a directory into the PATH using the terminal. Thank you very much!

  • What exactly does the extended warrenty cover?

    my silver nano, its...dying. the battery is dying and i just bought it in october. if its off for at least 10 minutes i can't turn it on unless i plug it in to the computer...but sometimes i'm not near one, and its getting frustrating. would the exte

  • Scheduled for Delivery in MMBE

    Hi All, After creating delivery note against STO, the delivery note quantity is not getting updated under the columen "Scheduled for Delivery" in MMBE.   What could be reason.  Kindly suggest. Regards Alexandro Edited by: Alexandro fozters on Nov 11,