Select and highlight a default row in a table

Hi everybody.
When using a table in WD, the first line is selected and highlighted by default.
I'd like to reproduce the same behaviour but this time, the selected and highlighted row shouldn't be the first row but any other one that has to be defined previously.
How could I do that??
Thanks for any suggestions you may have.
Regards,
C.

For example I have a node SFLIGHT which am using to display data in tabular format on my layout. I have attached a supply function POPULATE_DATA to my context node SFLIGHT to fetch & populate the node.
METHOD populate_data .
  DATA: lt_sflight TYPE wd_this->elements_sflight.
  SELECT carrid
         connid
         fldate
         price FROM sflight INTO TABLE lt_sflight.
  node->bind_table( new_items = lt_sflight ).
ENDMETHOD.
And within my WDDOINIT method am programmatically setting the LeadSelection to the 3rd row as how shown below:
METHOD wddoinit .
  DATA: wd_node TYPE REF TO if_wd_context_node.
  wd_node = wd_context->get_child_node( name = 'SFLIGHT' ).
  wd_node->set_lead_selection_index( '3' ).
ENDMETHOD.
Regards,
Uday

Similar Messages

  • JComboBox selection and highlight problem of the selected item

    Hi,
    I have a question how can I make my newly added item to the combo-box selectable and highlighted. I am adding new items to my custom comboBox dynamically and I want whatever item I add to be selected by default. I am using my own custom ComboBoxModel that extends AbstractListModel and implements ComboBoxModel and TreeModelListener, and my custom Renderer that extends JLabel and implements ListCellRenderer. Because I am trying to get a tree structure in my comboBox model and that's why I have my own custom model and renderer. Now when I add a new node or item to my comboBox it is being added and shown in the combo-box textField, but as soon I pull down the combo-box my parent directory is selected though my current selection is the last node added. That's how I am adding new nodes and making it selectable
    treeModel.insertNodeInto(tempNode, (DefaultMutableTreeNode)nodeCollection.lastElement(), 0);
    int nodeTotal =((CMRGlobals.myTreeGlobals).getModel()).getSize();
    Object lastNode = CMRGlobals.myTreeGlobals).getModel()).getElementAt(nodeTotal - 1);
    ((CMRGlobals.myTreeGlobals).getModel()).setSelectedItem(lastNode);
    when I do this my node is added under my parentNode and is shown in the comboBox but when I try to pull down the combo my parent node is high lighted and when I move out of the combo-box my parent node gets selected and show in the combo-box though I haven't selected it,and the contents of my last node are shown. I am just writing my own custom model that simulates the effect of JTree. I am using these......
    DefaultMutableTreeNode and
    DefaultTreeModel
    and in my JComboBox I am setting my model as
    this.setModel(new myModel(treemodel));
    this.setRenderer(new myRenderer());
    I am building my own FileDialog that just works like FileDialog I have all the functionality except this problem.Thanks for any help. I know I have posted this same thread yesterday but I didn't get any response hoping now may somebody can help me.Thanks again

    never mind I got it
    Thanks

  • Issue with table selection and display the seleted rows in another page as a table data

    Dear ALL,
    I have a  requirement as below:
    I have a custom OAF  page having one button, on pressing the button it will open a popup window, in that i am doing search operation and data would populate in table region below.
    Then from the table i am doing multiple selection of rows and i have a button, on pressing the button the seleted rows should display in the base page where i called this popup window and popup window should close.
    so i am able to perform multiple selection of row  from the table but how i can display the seleted rows in my base page  and how i can close the poup window after the seleted rows displayed in the base page, please help me on this.
    Thanks
    Deb

    Hi,
    For navigation data from one page to another  you can use  a hashmap that contains the parameters.
    // processFormRequest()
    HashMap hsp = new HashMap(1);
    hsp.put("myParam", "myParamVal");
    pagecontext.setForwardURL("MY_FUNCTION", (byte)0, null, hsp,true, "N", (byte)0);
    You can then retrieve this parameter in processRequest() via:
    pagecontext.getParameter("myParam")
    //Code for redirect to base page with commit
    Refer to the setPostToCallingPage method, from OADialogPage Class how to make the dialog page action buttons submit back to the calling page. In the example, the OK button commits the changes on the dialog page and the NO button rolls back the changes.
    OADialogPage dialogPage = new OADialogPage(OAException.*, mainMessage, null, "", "");
    dialogPage.setOkButtonItemName("okButton");
               dialogPage.setOkButtonToPost(true);
               dialogPage.setNoButtonToPost(true);
               dialogPage.setPostToCallingPage(true);
               dialogPage.setOkButtonLabel(yes);
               dialogPage.setNoButtonLabel(no);
    Thanks,
    Dilip

  • How to make selected and active a child row of a treeTable?

    Hello,
    I am inserting a new child row into a af:treeTable, disclosing it, but I can't figure out how to make it selected and active so the focus of the user to go on it.
    Jdeveloper version 11.1.2.3.0
    This is how I am inserting the child node:
    public void createLocation(RowIterator ri, Key selectedNodeKey) {
            final String locationCategoryViewDef = "model.views.LocationCategoryView";
            if (ri != null && selectedNodeKey != null) {
                Row[] found = ri.findByKey(selectedNodeKey, 1);
                if (found != null && found.length == 1) {
                    Row foundRow = found[0];
                    String nodeDefname = foundRow.getStructureDef().getDefFullName();
                    RowSet parents = (RowSet)foundRow.getAttribute("LocationView");
                    Row childrow = parents.createRow();
                    //hardcoded locationId
                    childrow.setAttribute("LocationId", 434558);
                    parents.insertRow(childrow);
    }  And this is the treeTable:
    <af:treeTable value="#{bindings.LocationCategoryView2.treeModel}" var="node" varStatus="vaarr"
                  partialTriggers="gaga gag4a ga4a"
                  selectionListener="#{bindings.LocationCategoryView2.treeModel.makeCurrent}"
                  displayRow="selected" rowSelection="single" id="tt1" editingMode="clickToEdit"
                  horizontalGridVisible="true" binding="#{pageFlowScope.treeTableBean.sampleTreeTable}">
        <f:facet name="nodeStamp">
            <af:column id="c5" width="15">
                <af:outputText value="#{node}" inlineStyle="display:none" id="ot1"/>
            </af:column>
        </f:facet>
        <f:facet name="pathStamp">
            <af:inputText value="#{node}" id="ot2"/>
        </f:facet>
        <af:column id="c2" headerText="Location CategoryName">
            <af:inputText value="#{node.LocationCategoryName}" inlineStyle="font-weight:900" id="ot45"/>
        </af:column>
        <af:column id="c6" headerText="Location CATID">
            <af:inputText value="#{node.LocationCategoryId}" inlineStyle="font-weight:900" id="ot6"/>
        </af:column>
        <af:column id="cgg2" headerText="Var INDEx">
            <af:outputText value="#{vaarr.index}"/>
        </af:column>
        <af:column id="c1" headerText="Location Name">
            <af:inputText value="#{node.LocationName}" id="ot3"/>
        </af:column>
        <af:column>
            <af:panelGroupLayout layout="vertical">
                <af:commandLink id="gaga" text="addLocation" inlineStyle="color:red"
                                action="#{pageFlowScope.treeTableBean.createChildren}"
                                rendered="#{node.LocationId == null}" partialSubmit="true"/>
                <af:commandLink id="gag4a" text="delete category" inlineStyle="color:blue"
                                partialSubmit="true" rendered="#{node.LocationId == null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
                <af:commandLink id="ga4a" text="delete location" inlineStyle="color:green"
                                partialSubmit="true" rendered="#{node.LocationId != null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
            </af:panelGroupLayout>
        </af:column>
    </af:treeTable>

    Yes I did now but nothing changes. The current, selected and active row is still the parent node...
    Even I am adding AdfFacesContext.getCurrentInstance().addPartialTarget(this.sampleTreeTable); for just in case..

  • Photoshop Elements select tool, when targeting layer or multiple layers the layer properties box pops up.  Having to very carefully and repeatedly select and highlight layers to move, or merge when using Move Tool.  Win 8, Adobe 12, Intuos 4 w/ updated dr

    This issue has been going on for several weeks.
    The Move Tool is not functioning properly when selecting and TARGETING a layer or multiple layers, as the Layer Properties box pops up requiring me to close it and try again.
    How to reset or is there an update and fix for this issue.
    Using Win 8, Elements 12, and Intuos 4 Pen and Tablet.

    To reset the tool I suggest click on it once and then look for something like this in the bottom half of your window:
    In the above picture I have marked one section in red box.  You need to click on it to get the option to either reset the only tool you have clicked or to reset all the tools in the editor window.  Of course you have to be in Expert Mode to get this to work.
    Good luck.

  • How to highlight the first row of a table

    When entering the form, how do I get the first row of the table to be highlighted when it has not been selected yet? There is already data in the table. Thanks.
    Allyson

    Any ideas on what would cause this NOT to work? I added this row right after the table is created and populated and it is still not highlighted when I enter the form. The snippet of code that does this is:
    MyTableModel modelS = (MyTableModel)dataModel.get("S");
    jTable1 = new JTable(modelS);
    jTable1.setRowSelectionInterval(0,0);MyTableModel is this:
    class MyTableModel extends DefaultTableModel {
      public MyTableModel(Object[] columnNames, int numRows) {
        super(columnNames, numRows);
      public boolean isCellEditable(int row, int column) {
        if (TableKey == 'S') {
          if (column == 6) {
            return false;
        if (TableKey == 'O') {
          if (column == 0 || column == 4 || column == 5) {
            return false;
        if (TableKey == 'P') {
          return false;
      return true;
    }Can anyone help? Thanks.
    Allyson

  • How to set a row as default row in adf table

    Hi,
    I have a requirement: when page is launched there are multiple records with different status displayed on the page and i had to make the first record with Status = XXX as default selected row in adf table. How to code it?
    Thanks!
    Susan

    Hi Frank,
    Thanks a lot for your quick response!
    We are using Jdev 11g. After received your response, i went through all of your responses in ADF coner and OTN for the related topics (setting detail row) and got some ideas(Specially, i got your detail coding for moving makeCurrent expression into selection listener method into backing bean, etc ) and was ready for coding this function. But our PM changed their mind and we dont need this function. So, I had to move to another area......
    Your articles and your responses really help me!
    Thanks again for your help!
    Susan

  • Select and ... only one time in table - how?

    Hallo,
    in SRList from SRDemo "Select and View / Edit" comes only on top of the table.
    In my page it comes on top and bottom of the table. why is it so and how i can customize it?
    i don't see the point.

    There isn't much point when you only have 10 items in the table, but imagine the case where there are 100 or more rows in the table (possibly after the user has selected to view all rows). Then it would be conveniant to have the selection facet at the bottom of the table too, so that the user doesn't need to scroll all the way back up to the top.
    As for customisation, I don't think that you can change the behaviour in that way.

  • SELECT and ORDER with several indexes on a table

    Hi,
    I am looking for the best way to select rows from a table if they satisfy a condition depending on several indexes, or from a join.
    I am currently doing it with unions, like that:
    SELECT article_id, article_date, score(1) score
    FROM articles
    WHERE CONTAINS(article_body,'searchQuery',1) > 0
    UNION
    SELECT article_id, article_date, score(1) score
    FROM articles
    WHERE CONTAINS(article_title,'searchQuery',1) > 0
    UNION
    SELECT article_id, article_date, 100
    FROM articles
    WHERE article_id IN (SELECT article_id FROM article_keywords WHERE keyword = 'searchQuery')
    ORDER BY score DESC, article_date DESC
    But I was wondering whether it would be better performance-wise to do it with conditional expressions like
    SELECT article_id, article_date, score(1) scoreBody, score(2) scoreTitle
    FROM articles
    WHERE
    CONTAINS (article_body,'searchQuery',1) > 0
    OR CONTAINS (article_title,'searchQuery',2) > 0
    OR article_id IN (SELECT article_id FROM article_keywords WHERE keyword = 'searchQuery')
    ORDER BY scoreHeadline DESC, scoreBody DESC, article_date DESC;
    Also, if doing it with conditional expressions, I don't see how to avoir having to declare several "scores".
    In a more general way, I don't see exactly how to consider the results coming from the join with the article_keywords table in terms of score (right now I'm giving them 100, so they're coming up first).
    I am completely new to indexes, so my apologies if anything in this SQL is hurting just looking at it.
    Thanks for reading, and for any help you can bring.

    You can check out the explain plan for the two queries. I did a small test for employees table . The first query scans the table 3 times, while the second does only once.
    hr@XE> EXPLAIN PLAN FOR
      2  SELECT * FROM employees
      3  WHERE last_name like 'Joh%'
      4  UNION
      5  SELECT * FROM employees
      6  WHERE last_name like 'Pet%'
      7  UNION
      8  SELECT * FROM employees
      9  WHERE last_name like 'King%';
    Explained.
    Elapsed: 00:00:03.06
    hr@XE> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1534505908
    | Id  | Operation                     | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT              |             |     3 |   204 |     9  (78)| 00:00:01 |
    |   1 |  SORT UNIQUE                  |             |     3 |   204 |     9  (78)| 00:00:01 |
    |   2 |   UNION-ALL                   |             |       |       |            |          |
    |   3 |    TABLE ACCESS BY INDEX ROWID| EMPLOYEES   |     1 |    68 |     2   (0)| 00:00:01 |
    |*  4 |     INDEX RANGE SCAN          | EMP_NAME_IX |     1 |       |     1   (0)| 00:00:01 |
    |   5 |    TABLE ACCESS BY INDEX ROWID| EMPLOYEES   |     1 |    68 |     2   (0)| 00:00:01 |
    |*  6 |     INDEX RANGE SCAN          | EMP_NAME_IX |     1 |       |     1   (0)| 00:00:01 |
    |   7 |    TABLE ACCESS BY INDEX ROWID| EMPLOYEES   |     1 |    68 |     2   (0)| 00:00:01 |
    |*  8 |     INDEX RANGE SCAN          | EMP_NAME_IX |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("LAST_NAME" LIKE 'Joh%')
           filter("LAST_NAME" LIKE 'Joh%')
       6 - access("LAST_NAME" LIKE 'Pet%')
           filter("LAST_NAME" LIKE 'Pet%')
       8 - access("LAST_NAME" LIKE 'King%')
           filter("LAST_NAME" LIKE 'King%')
    hr@XE> explain plan for
      2  select * from employees
      3  where last_name like 'Joh%' or last_name like 'Pet%' or last_name like 'King%';
    Explained.
    Elapsed: 00:00:00.01
    hr@XE> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1445457117
    | Id  | Operation         | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |           |     3 |   204 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| EMPLOYEES |     3 |   204 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("LAST_NAME" LIKE 'Joh%' OR "LAST_NAME" LIKE 'Pet%' OR
                  "LAST_NAME" LIKE 'King%')

  • ADF 11g can not select and copy data from cell of readonly table in IE

    hi,
    In ADF 11g, when render view object as readonly table with Single RowsSelection, using IE browser can not select and copy data from the cell, but it work in firefox.
    is it a bug?
    Edited by: kent2066 on 2009-5-18 上午8:46

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

  • I am unable to hold down command + select and highlight different texts.

    I am aware and have been using the "command+drag" in order to select different texts in different areas; however, I am now unable to do so. When I hold down the command button, and drag over different texts in different places, the highlight instantly disappears. I am only thus, able to highlight one portion of texts at one time.

    I do not have a clue about enabling non-contiguous select in Pages.  A quick look at the preferences and menu items did not show me anything.
    Firefox seems to allow non-contiguous selection.
    Safari, No
    Thunderbird email client, Yes (but is from the makers of Firefox, so most likely has common code).
    Reeder, No (RSS feed reading client)
    Messages, No
    Adium, No (3rd party chat client)
    Evernote, No
    iTunes, No (but it teases you by highlighting while dragging across the 2nd text area, but when you release the mouse, it unhighlights)
    Terminal, Yes
    iTerm, No (3rd party terminal emulator)
    So it would seem this is a function of the application.

  • How to highlight a single row in the Table components

    Hi,
    I am trying to do the following :
    1) Select a staff member's name from a dropdown list
    2) click on dropdown.name and show all the projects the member is working in a Table1
    3) when clicked on the project in Table1, show all team members of selected project in Table2.
    I would like to highlight the original staff member's name in Table2. Any ideas how I should go about doing it ? I tried the setSelected() method, but this selects all rows.
    TIA

    Winston has a blog on that topic:
    http://blogs.sun.com/roller/page/winston?entry=setting_table_column_style
    Lark

  • Selecting a one pixel high row of a table

    I have created a table about 18 rows high and have one row 1 pixel high. It is colored black to separate sections.
    I am unable to select it to erase it. I have zoomed in, also tried the table palette.
    Any ideas?
    SH

    Select the row in code view?<br /><br />-- <br />Murray<br /><br /><br /><[email protected]> wrote in message <br />news:[email protected]..<br />>I have created a table about 18 rows high and have one row 1 pixel high. It <br />>is colored black to separate sections.<br />><br />> I am unable to select it to erase it. I have zoomed in, also tried the <br />> table palette.<br />><br />> Any ideas?<br />><br />> SH

  • Store BP and Item properties in Rows of new table in parallel to columns

    Hi Product Development Team,
    At present SAP B1 stores BP and Item properties as 64 columns in respective master table.
    As the main purpose of property feature is for Reporting and Analysis, Analysis Report developers faces difficulties in preparing analysis report based on properties in the present structure of prperties in column.
    I suggest to introduce additional new table (each for Business Partners and Items properties) which contain rows for selected BPs/item's selected properties.
    In order to retain present functionality the existing column can remain as it is and also continue to updated as it is.Only additional new table will also get updated and new analysis reports can be build using these newly suggested tables.
    Best Regards,
    Samir Gandhi

    No Body responded very strange !!!!!

  • Howto create 'select statement' that returns first row? (simple table)

    quick question that drives me crazy:
    Say I have the following table:
    ID....car_model....point_A....total
    1........333.............NY..........54
    2........333.............NJ..........42
    3........333.............NH...........63
    4........555.............NJ...........34
    5........555.............PA...........55
    I would like to create a select statement that return car_model which the starting point is NJ - in this example it's only 555.
    thanks for any tips

    fair enough.
    the problem is this: given the table below, I need to create a report that reflects car rentals from specific location. you can rent a car from different locations; a car has a starting point (like a flight itinerary) so consider this:
    Mark rent a car with the following itinerary:
    NY--> NJ
    NJ--> PA
    PA-->FL
    FL-->LA
    the end user would like to see all car that were rented between X and Y and start point was NJ, so in the example above, the starting point is NY so it doesn't match the end users' criteria.
    The table is organized in the following manner: ID....car_model....point_A....total
    * I don't know whey the someone choose point_A as a column description as it just suppose to be 'location'
    so, back to my first example:
    ID....car_model....point_A....total
    1........333.............NY..........54
    2........333.............NJ..........42
    3........333.............NH...........63
    4........555.............NJ...........34
    5........555.............PA...........55
    if I do this:
    Select car_model from myTable where point_A='NJ'
    the return result will be 333 and 555 but that is in correct because 333 starting point is NY.
    I hope I provided enough information, thanks

Maybe you are looking for

  • Dynamic FROM clause

    Hi, I am needing to use a dynamic "<font color="blue">FROM (insert table name here)</font>" as well. From reading several posts, it seems like I need to do this using dynamic SQL. I can pass the name of the table into the stored procedure, but I am g

  • Looking for a BAPI that does the same as /$SYNC

    Dear Experts, Could someone tell me which BAPI resets all buffers, I need one just like running /$SYNC. Thanks in advance. PS: I use a system for test purpose, not a real one in a company.

  • Error while Accessing OIF admin Console

    Hi All, This is Pokuri i installed OIF 10g and to fix some error i also installed one patch p6157821 after that i tried to login to OIF admin console but showing error " 500 Internal server error Servlet error: Error instantiating servlet 'uix' (serv

  • Instant Client 10.2, WindowsXP - odbcad32.exe crashes

    I tried to use IC 10_2 (Basic and ODBC) to access an Oracle Database with Microsoft Access. I could configure a datasource with odbcad32.exe and use it with MSAccess successfully. Next step was a try to dynamically configure it from within MSAccess w

  • Java Function result.addValue(newValue)?

    Hi All,          Could you tell me what this function does? result.addValue(newValue); Regards, XIer