How to highlight a row in tree table - jdev 11.1.2

Hello:
Given a key, I want to highlight (select/set currency) the corresponding row in a tree table. I thought the following code would highlight the row in the tree table that corresponds to the key, but nothing is highlighted in the tree table. ie---> treeTable.setSelectedRowKeys(selectedRowKeys); What am I doing wrong? Thanks much.
public String cb1_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Next");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
DCBindingContainer bc = (DCBindingContainer) getBindings();
DCIteratorBinding iter = (DCIteratorBinding) bc.findIteratorBinding("DDF1Iterator");
RowKeySet selectedRowKeys = new RowKeySetImpl();
ArrayList list = new ArrayList();
Row r = iter.getCurrentRow();
Key k = r.getKey();
list.add(k);
selectedRowKeys.add(list);
treeTable.setSelectedRowKeys(selectedRowKeys);
AdfFacesContext adfc = AdfFacesContext.getCurrentInstance();
adfc.addPartialTarget(treeTable);
}

Hello:
Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
Thanks for the help.

Similar Messages

  • How to insert a row in Tree table which is dragged from the table?

    Hi All,
    I am having a Tree table and a Table in the same page, like below
    Treetable                                         Table
    Item1                                              Subitem12
         Subitem1                                   Subitem13
         Subitem2                                   Subitem14
         Subitem3                                   Subitem15
         Subitem4                                   Subitem16
    Item2                                              Subitem17
         Subitem5                                   Subitem18
         Subitem6                                   Subitem19
         Subitem7                                   Subitem20
         Subitem8                                   Subitem21
    Item3
         Subitem9
         Subitem10
         Subitem11
    The requirement is i need to "drag" a row from the Table and place it under any parent node in the Tree table.
    What i have done is I make the Tree table as ".ui-sortable" and table as a "draggable".
    I am not able to find the position of the dragged item when i dropped it in the Treetable.
    Please provide me a solution.
    Regards,
    Aravindh

    Hello:
    Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
    If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
    Thanks for the help.

  • How can i update rows  in a table based on a match from a select query

    Hello
    How can i update rows in a table based on a match from a select query fron two other tables with a update using sqlplus ?
    Thanks Glenn
    table1
    attribute1 varchar2 (10)
    attribute2 varchar2 (10)
    processed varchar2 (10)
    table2
    attribute1 varchar2 (10)
    table3
    attribute2 varchar2 (10)
    An example:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)

    Hi,
    Etbin wrote:
    Hi, Frank
    taking nulls into account, what if some attributes are null ;) then the query should look like
    NOT TESTED !
    update table1 t1
    set processed = 'Y'
    where exists(select null
    from table2
    where lnnvl(attribute1 != t1.attribute1)
    and exists(select null
    from table3
    where lnnvl(attribute2 != t1.attribute2)
    and processed != 'Y'Regards
    EtbinYes, you could do that. OP specifically requested something else:
    wgdoig wrote:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)This WHERE clause won't be TRUE if any of the 4 attribute columns are NULL. It's debatable about what should be done when those columns are NULL.
    But there is no argument about what needs to be done when processed is NULL.
    OP didn't specifically say that the UPDATEshould or shouldn't be done on rows where processed was already 'Y'. You (quite rightly) introduced a condition that would prevent redo from being generated and triggers from firing unnecessarily; I'm just saying that we have to be careful that the same condition doesn't keep the row from being UPDATEd when it is necessary.

  • How to identify migrated rows on a table

    Hi, folks,
    I'm wondering how to identify migrated rows on a table.
    I understand that ANALYZE generates data into CHAINED_ROWS. The Oracle document implies that this table has both CHAINED ROWS and MIGRATED ROWS. FYI:
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14231/general.htm#sthref1881
    But how can I tell migrated rows from chained rows.
    Thanks!
    Alex

    im also not looking to ExporttoExcel feature on ADF just copy all the records displayed on a table
    im also not looking to ExporttoExcel feature on ADF just copy all the records displayed on a table ,
    Hi you can set the property( exportedRows) of exportListener
    you can limit the number of rows to download
    chekout documentaion
    ADF RichClient API - af:exportCollectionActionListener

  • How to compare two rows from two table with different data

    how to compare two rows from two table with different data
    e.g.
    Table 1
    ID   DESC
    1     aaa
    2     bbb
    3     ccc
    Table 2
    ID   DESC
    1     aaa
    2     xxx
    3     ccc
    Result
    2

    Create
    table tab1(ID
    int ,DE char(10))
    Create
    table tab2(ID
    int ,DE char(10))
    Insert
    into tab1 Values
    (1,'aaa')
    Insert
    into tab1  Values
    (2,'bbb')
    Insert
    into tab1 Values(3,'ccc')
    Insert
    into tab1 Values(4,'dfe')
    Insert
    into tab2 Values
    (1,'aaa')
    Insert
    into tab2  Values
    (2,'xx')
    Insert
    into tab2 Values(3,'ccc')
    Insert
    into tab2 Values(6,'wdr')
    SELECT 
    tab1.ID,tab2.ID
    As T2 from tab1
    FULL
    join tab2 on tab1.ID
    = tab2.ID  
    WHERE
    BINARY_CHECKSUM(tab1.ID,tab1.DE)
    <> BINARY_CHECKSUM(tab2.ID,tab2.DE)
    OR tab1.ID
    IS NULL
    OR 
    tab2.ID IS
    NULL
    ID column considered as a primary Key
    Apart from different record,Above query populate missing record in both tables.
    Result Set
    ID ID 
    2  2
    4 NULL
    NULL 6
    ganeshk

  • Highlighting one row in a table control

    Hi All,
    Can i highlight one row in a table control. I found some stroke color in the properties for a field in table control. But i am not sure, will it be applied to the entire column or to a particular field.
    Anybody aware of this.?
    Regards,
    Manjunatha.T.S

    Hi,
    This is not currently available in VC.
    Lior

  • Creation of new Row in Tree Table

    We are creating a new row using CreateListener which is written in Bean, after creating the row, we are adding it to the iterator and the new row is not getting highlighted and focus is not in new row in the table by default. It takes an click to make it editable. 'setActiveRowKey()' method didnot help here which is used in the af:table component to achieve the same.
    Any pointers regarding this issue would be helpful..
    Thanks,
    Shruthi

    Hi Max:
    According to what you described, it's really wierd. An ADF table is Surrounded by a panelCollection or not doesn't matter in terms of CreateInsert operations, I think. Also each step you said OK doesn't mean that step is 100% problem free towards your final goal. For example, when you drag and drop and ADF table onto a JSF page, you forget to turn on 'row selection', it will be OK, you won't get any error message, but later on when you find that you need to turn it back on, you have to go back to JSF page source, to manually added codes to do so.
    The simpliest solution and quickest one is to reinitiate a clean ADF project and do it all over again. It's simple straightforward in my view. Probably don't use PanelCollection first, just drop your ADF table on a form, or af:panelForm, but make sure your table and 'CreateInsert' button is surrounded by a form, otherwise, when you click on 'CreateInsert', nothing will happen. When everything works, then probably back it up and replace your form or af:panelForm with panelCollection. See how it goes.
    Thanks,
    Alex

  • How to highlight the row from the JTable then remove

    hi !!
    i'm using an abstract model in making a table....
    and having a button up and down and delete also!!
    how can i highlight the row when i click down and up!!!
    and when selected or highlighted i can press the button delete ...
    then the data is removed!!!
    pls... i need it!!
    tnx...

    Table row selection should take care of it. By default table rows can be selected.
    The getSelectionModel() method on the JTable gives you access to the row selection model. You can set that either to allow one at a time or multiple selection, and when your delete button is pressed, you access that selection model to decide which rows to delete.
    Add a ListSelectionListener so you can enable or disable your delete button as rows are selected or deselected. JTable will take care of the highlighting.

  • How can I delete rows in a table from the bottom?

    I have table that I add rows to and I want to remove rows starting with the last row. For example if I have a table with 20 rows how do I remove rows 16-20. I can't figure out how to do this.

    The following script would/should/might delete the last 4 rows of a subform named 'itemsSub' : (or actually deletes the last row 4 times hopefully!)
    for (var f = 0; f<4; f++)
    _itemsSub.removeInstance(itemsSub.all.length - 1);

  • How to delete a row in ADF Table by pressing "Delete" Key

    I want to delete a row in my ADF table by pressing the "Delete" key..How can i achieve it?

    hai ,
    I write clientListener and ServerListener..But in the script i printed the event.getKeyCode() ...*When i press Delete Key or EnterKey ,it is not printing the value*..
    The code i write is pasted below..
    In the code backing_Comm is my backingbean..Is there any problem in the code that i had written?I want to delete a selected row from my table using keypress Event...pls advice..
    <script type="text/javascript">
    onPressDeleteKey=function(event){
    alert(event.getKeyCode()); // *Here i am not getting the alert, when i press Delete Key or Enter Key..But getting alert when i press A- Z or 1 - 0*
    if(event.getKeyCode()==AdfKeyStroke.ENTER_KEY) {
    var source = event.getSource();
    AdfCustomEvent.queue(source,performDeleteOnPress,{},false);
    </script>
    <*af:table* value="#{bindings.ComMastVO.collectionModel}"
    var="row"
    rows="#{bindings.ComMastVO.rangeSize}"
    emptyText="#{bindings.ComMastVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.CompMastVO.rangeSize}"
    rowSelection="single"
    id="tblCom"
    columnStretching="last" inlineStyle="width:100%;"
    width="273"
    selectionListener="#{backing_Comm.rowSelectCom}"
    binding="#{backing_Comm.tblCom}"
    clientComponent="true" >
    <*af:column* sortProperty="Com" sortable="true">
    <*af:inputText* value="#{row.bindings.Com.inputValue}"
    label="#{bindings.ComMastVO.hints.Com.label}"
    required="#{bindings.ComMastVO.hints.Com.mandatory}"
    columns="150"
    maximumLength="#{bindings.ComMastVO.hints.Com.precision}"
    shortDesc="#{bindings.ComMastVO.hints.Com.tooltip}">
    valueChangeListener="#{backing_Comm.onValueChange}"
    autoSubmit="true" >
    <f:validator binding="#{row.bindings.Com.validator}"/>
    *</af:inputText>*
    *<af:serverListener type="performDeleteOnPress"*
    *method="#{backing_Comm.goDeleteCurrentRow}"/>*
    </af:column>
    *<af:clientListener type="keyPress"*
    *method="onPressDeleteKey"/>*
    </af:table>
    =================================================
    anybody pls help??
    Edited by: Briston Thomas on Jun 3, 2009 2:25 AM

  • How to delete a row in the table in servlets

    I have met a problem in deleting a row in table using servlets.
    My table looks like this:
    ID Name Type
    12 Milienium S
    15 USIA O
    My code looks like this:
    String query = "SELECT * FROM tb_Funds";
    rs = statement.executeQuery(query);
    while(rs.next()) {          
    StdID=rs.getString("FundID");
    StdName=rs.getString("Name");
    StdType=rs.getString("Type");
    out.print("<td><INPUT TYPE=TEXT NAME=
    myName VALUE=" + StdID + "></td>");
    out.print("<td>" + StdName + "</td>");
    out.print("<td>" + StdType + "</td>");
    buf.append("<td>" + "<INPUT TYPE=SUBMIT
    NAME=Delete VALUE=DELETE>" + "</td></tr>");
    There is a delete button in every row. May I know how to delete the row that I want by getting the ID from the table and delete it from the database.
                                       

    Deleting from a table is simple -> delete from tb_funds where id = <value>. Obviously replace <value> with the appropriate ID or use a bind variable (a ?) and prepared statements.
    Are you asking how to pass the id associated with the table row from the browser when the button is pressed?

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • How to get current row of Advanced table with no submit

    I have an advanced table with an 'Add another button'. When an empty row is created by clicking this button, LOV is used on the first column to populate other fields of the row. The rows of the table carry a button called "Add dependencies" whose functionality is to take the user to a different table to add rows to a different VO. This button is just a button and not a submitButton. I am passing the row's primary key as part of the URI as Vo attribute FdTaskId={@FdTaskId}
    The button works perfectly fine for database fetched rows (rows already present in the database), but, for the rows created using 'Add Another button', though LOV populates all fields including the primary key, the URI parameter passes null to the next page. That means, the VO attribute is not set. This works fine only when a 'submit' happens in the first page. For example, if I click Add another row again, then the previously inserted row passes the primary key fine as part of {@FdTaskId}.
    Could you please help me how I can resolve this issue?
    Thanks,
    Datta

    I am doing exactly that. My issues is that, VO attribute is passed correct for the table rows which are fetched from the database. For the table rows which got created through 'Add Another button', the VO attribute passed through URI as {@FdTaskId} is returning null. The VO attribute sets only when a form submit happens. For example, after adding a row through 'Add another row' button, click the same button again to add one more row and now go back to previously added row and now you can see that its VO attribute is set ({@FdTaskId} carries value )

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

  • How to select one row in a table with radio button

    Hi all.
    I have a VO where there is an attribute (isDefault [String]) that identifies the default record in the view. The possible values are 'Y' for yes and 'N' for no. Obviously only one record can have the 'Y' value.
    In my page I have created an ADF Table (with the usual data control drag & drop). I would to transform the default inputText of "isDefault" field with a selectOneRadio component in order to permit the user to select (and save contextually in the DB) the default row of this table.
    Can you explain me how? I'm using JDeveloper 11.1.1.4.
    Thanks in advance.
    Baduel

    Baduel wrote:
    Cvele,
    thanks for your responses. Yes, it's easier to use af:selectBooleanCheckbox but I need that the selection is mutually exclusive (only one row can be selected). >If this is possible also with the boolean checkbox please tell me how.- Let's try with CheckBox :
    1. At the ViewObjectImpl level (for example, YourViewObjectImpl), add the following code:
      private oracle.jbo.Key currSelectedRowKey = null;
      public void doRowSelection(Key newKey) {
          // de-select old one
          if (currSelectedRowKey != null) {
              Row[] rows = findByKey(currSelectedRowKey,  1);
              if (rows != null && rows.length > 0)
                   rows[0].setStatusAsBoolean(Boolean.FALSE); // cast to the appropriate row Impl class if need !
         // remember a new selected row key:
        currSelectedRowKey = newKey;
      }In the ViewRowImpl, in the transient attr settter, do as follows:
      public void setStatusAsBoolean(Boolean value) {
         setStatus(value.booleanValue() ? ONE : ZERO);
         if (value.booleanValue()) {
             YourViewObjectImpl vo = (YourViewObjectImpl)getViewObject();
             vo.doRowSelection(getKey());
       }   P.S. The above was not tested at all, but should give you an idea

Maybe you are looking for