ADF treetable - Identify RightClick of selected vs unselected row

Hello,
We have a tree table with client and server Listeners set for selection and contextMenu types
TreeTable is set to use contextMenu select = true
Use Case 1
User selects a Row
selection listener fires
Use Case 2
User right clicks a selected Row
contextMenu listener fires
Use Case 3
User right clicks a unselected Row
selection listener fires
contextMenu listener fires
We need to differentiate between Use Case 1 and 3
For Use Case 3, our requirement is to suppress/ignore the firing of selection Listener
A possible approach could be to read the event source (tree table) and check if any immediate oncoming event is of type contextMenu, and then bypass the code inside selectionListener
Any pointers ?

Couple of points
1. The documentation mentions the use of getRowKey() which is returning null
The highlighted row key is established as a currency in the table when the action for context menu item is executed. The currency in the table can be retrieved by calling "table.getRowKey()"
2. As posted, we are interested to know if the row was right clicked and then disregard the selection Listener. The server listener for context menu select is fired after the selection listener. So we need help
Any pointers ?
Thanks

Similar Messages

  • ADF Treetable scrolling position resets to top on refresh

    I have a master details page with the following components.
    TreeTable with a Check Box on LHS  and TabbedPannel on RHS.
    So, users can select any row on the LHS and the corresponding details will be displayed on RHS in a new Tab. When user closes the Tab it will clear the Check Box on TreeTable.
    Issue is, when user is at last row of TreeTable when there are more rows (Scroll bar will be at last), and user closes the Tab on RHS side, I will be clearing the checkbox binding and refresh the treetable using PPR to reflect the same.
    This is causing the treetable  scroll bar to be reset to the top. And User lost the old position on needs to scroll down again.
    Can we control the Scroll bar position after PPR refresh (or)
    Can we just clear off the CheckBox selection (only one row) with out refeshing the whole treetable
    Environment:
    JDev Version : 11.1.1.6.2
    Component : ADF TreeTable with TreeModel binding (Not using BC)

    In my case, I am fine with disclosureState items. They do not collapse even after I remove the checkbox selection and refreshing the TreeTable component.
    Only issue is scrollbar is resetting to top.
    I can't use the disclosure event as they can do expandAll , select first compoenent scroll down and close the selection on RHS tab.
    Which will reset the LHS scrolling position to top.

  • Adf TreeTable,  collapsed and expand property.

    Hi,
    I want to set some instructional text on UI based on whether af:treetable row is expanded or collapsed. Is there any property that I can use on UI that give this information?
    I am using adf, Oracle JDeveloper 11g.
    Thanks
    -Rishabh

    Hi Frank,
    In Treetable I have two columns and one column in nodeStamp. For example, node column show name of "application", second column show names of scholarships and the third column has commandbutton to apply for that application. Each row in application can be expanded to see list of scholarships attached to that application. Here is the code for this....
    <af:treeTable value="#{bindings.SaAppListVO1.treeModel}"
    var="node"
    selectionListener="#{bindings.SaAppListVO1.treeModel.makeCurrent}"
    id="treeTable" expandAllEnabled="true" rowBandingInterval="0"
    width="94%" columnStretching="column:application"
    columnBandingInterval="0"
    disableColumnReordering="true"
    summary="List scholarships attached to application"
    rendered="#{ bindings.SaAppListVO1.estimatedRowCount > 0}">
    <f:facet name="nodeStamp">
    <af:column headerText="Application"
    id="application">
    <af:outputText value="#{node.AppName}"
    rendered="#{node.AppId1 ne null}"
    inlineStyle="font-size:12px; font-weight:bold;"/>
    </af:column>
    </f:facet>
    <f:facet name="pathStamp"/>
    <af:column headerText="Scholarships" width="300" noWrap="false">
    <af:panelGroupLayout layout="horizontal">
    <af:goLink styleClass="csaLink" text="#{node.ScholarshipsName}">
    <af:showPopupBehavior triggerType="click"
    popupId="::notewindow"/>
    </af:goLink>
    <af:image shortDesc="Need-Based"
    source="/images/gold.png"
    rendered="#{node.IsNeedBased == 'y'}"
    inlineStyle="text-align:left;"/>
    </af:panelGroupLayout>
    </af:column>
    <af:column align="center">
    <af:commandButton text="Apply!"
    rendered="#{node.AppId1 != null}"
    action="apply_new">
    <af:setPropertyListener from="#{node.AppId1}"
    to="#{pageFlowScope.appId}"
    type="action"/>
    </af:commandButton>
    </af:column>
    </af:treeTable>
    My question here is, where node row is in collapsed mode there is nothing in "scholarship" column. And when it is expanded it list all the scholarship. What I want is to add a text message in that column showing how many scholarships are there for that application in collapsed mode.
    Is there any way for doing this?
    Thanks,
    -Rishabh

  • Adf  treeTable issue

    HI again!
    I 'm a bit confused about using an adf treeTable component (adf faces 11g).
    I've created a down-hierarchy tree with root nodes and child nodes. Now i need to bind an action listener to child nodes only. So i've defined the nodeStamp facet's component as a commandLink and assigned the appropriate action listener to it.
    The problem is that it fires now when i click a root node link as well as when i click a child node link. Is there any solution for this?
    It would be great at all if it were possible to define the root node component to be something like output text (not command component) and the child component to be a command link.
    Thanks in Advance. Alex.

    You can use a switcher component inside the tree to display different things based on the tree node type #{node.hierType.structureDefName}.
                  <af:tree value="#{bindings.LocationsView1.treeModel}" var="node"
                           selectionListener="#{bindings.LocationsView1.treeModel.makeCurrent}"
                           rowSelection="single" id="t1"
                           binding="#{backing_index.tree}">
                    <f:facet name="nodeStamp">
                      <af:group id="g1">
                        <af:switcher id="s1" defaultFacet="drag"
                                     facetName="#{backing_index.allowDrag}">
                          <f:facet name="drag">
                            <af:panelGroupLayout id="pgl2">
                              <af:outputText value="#{backing_index.allowDrag}" id="ot3"/>
                              <af:outputText value="#{node}" id="ot1">
                                <af:attributeDragSource attribute="value"/>
                              </af:outputText>
                            </af:panelGroupLayout>
                          </f:facet>
                          <f:facet name="nodrag">
                            <af:group id="g2">
                              <af:outputText value="#{backing_index.allowDrag}#{node.selectedRow}" id="ot4"/>
                              <af:outputText value="#{node}" id="ot2"/>
                            </af:group>
                          </f:facet>
                        </af:switcher>
                      </af:group>
                    </f:facet>
                  </af:tree>

  • Identify multiple Excel selection ranges passed to VBA.

    If I select two ranges of a worksheet from within the worksheet/Excel itself and run a VBA (macro) to perform operations in VBA on the ranges, how do I identify those two selections in the VBA code to work with
    them?
    In other words, in the work book drag with the mouse to select a range, then Ctrl+drag a second range then call/run the macro/VBA. (For example, right-click drag cells B11 to B14, release, then Ctrl-right-click cell F1 (or F1 to F7). Then run the macro.)
    How do I reference those two selected ranges (B11:B14 and F1 or F1:F7from the example) in the VBA code?
    I see many example within VBA of selecting multiple ranges, but how do I refer to ones "passed" to the macro? (I'm thinking it would be something like Application.Selection.first and Application.Selection.second, etc but VB doesn't show anything
    to choose past Application.Selection .)
    Is it even possible to identify that two selections exist or is it all one selection, even if they are disjoint ranges?
    If it's all one selection (Application.Selection), how might I identify two non-contiguous ranges from within the selection and "split" them into two?
    I just found out that in Excel I can select three non-adjacent cells from any row or column, but I can only copy those three cells if they are on the same row or column. I didn't try more cells.
    This is all in Excel 2007.

    JimC, you get my ANSWERED vote!
    As near as I can tell, it does almost exactly what I need. I tested with four non-contiguous cell selections and the loop displays each one in the order selected.
    What it doesn't do is give the range of a contiguous area in the order of selection, meaning selecting e20 to a3 (dragging up to the left) gives range a3 to e20. Essentially, a range bigger than one cell is always identified as lowest order cell
    to highest order cell.
    I can handle that if needed by selecting individual cells through the range (as long as it's not too many cells) in the order I want to deal with them.

  • ADF treeTable element problem

    HI friends.
    I'm using now JDeveloper 11.1.1.2
    Can anybody help with a small trouble i faced as tried to fit an ADF treeTable element in my application.
    I've created a down-hierarchy tree which includes elements of two levels: parent elements and child elements.
    The source code of a tree model element in a respective page defenition file looks like this
    <tree IterBinding="CaptanView1Iterator" id="CaptanView1">
          <nodeDefinition DefName="minit.org.model.views.voc.CaptanView"
                          Name="CaptanView10"
                          TargetIterator="#{bindings.CaptanView1Iterator}">
            <AttrNames>
              <Item Value="fio"/>
            </AttrNames>
            <Accessors>
              <Item Value="CaptanHistoryView"/>
            </Accessors>
          </nodeDefinition>
          <nodeDefinition DefName="minit.org.model.views.voc.CaptanHistoryView"
                          Name="CaptanView11" TargetIterator="#{bindings.CaptanHistoryView1Iterator}">
            <AttrNames>
              <Item Value="violationdate"/>
              <Item Value="articles"/>
            </AttrNames>
          </nodeDefinition>
        </tree>i've also assosiated a navigation case action with a command link which in fact repesents the node of the tree.
    The problem is that for some nodes i have to click the mouse button twice to have the action handler trigger.
    A first click leads to what it seems like a simple repost and the second click works properly. By the way i occasionally get the following message as i click my tree-node links.
    <ActionListenerTag$BindingActionListener><processAction> JSF1043: ActionListener for component 'tt1:5:ot2' will not be processed - both binding and type are null.It's weird that the underlined message and wrong behavior take place not in a regular way, for some tree nodes only.
    Any help would be appreciated.
    Alex.

    Hi,
    the reason for not getting an answer is that you describe a problem that exists on the view layer and show th etree definition on the ADF binding layer.
    Frank

  • Is there an easy way to see how many rows in a table? (selected or unselected)

    Hi all,
    Forgive me if this is a REALLY dumb question but I would love to know if there there is an easy way to to see how many rows there are in a table in InDesign?
    (And I bet I am really going to kick myself when I hear the answer and how simple it probably is..lol !)
    I am working on a huge catalog and am dealing with LOTS of tables...very long tables too at times. I am also doing a lot of copying and pasting back and forth between InDesign and Excel and it would REALLY help if I knew how many rows there are in a table without having to manually count them (TIRESOME!!).
    Also, is there a way to see how many rows I have selected at any one time? It would be SO WONDERFUL if the info box could also provide this information.
    Thank you SO MUCH in advance for your help:))
    Christine
    **UPDATE**
    Oh boy I AM going to kick myself! Why only NOW that I wrote this question did I suddenly notice that the Table palette shows the number of rows and columns? lol.
    Okay, then is there a way to see how many rows I have selected at any given time?

    @Christine – try the following ExtendScript (JavaScript):
    if(app.selection.length === 0
        || !app.selection[0].constructor.name === "Cell"
        || !app.selection[0].constructor.name === "Table"){
        exit(0);
    var sel = app.selection[0];
    if(sel.constructor.name === "Cell"){
        var tableRowLength = sel.parent.rows.everyItem().getElements().length;
    if(sel.constructor.name === "Table"){
        alert("All "+sel.rows.everyItem().getElements().length+" rows selected in current table." );
        exit(0);
    var numberOfRowsSelected = sel.rows.length;
    var indexOfSelectedRows = sel.rows.everyItem().index;
    var startRowSel = indexOfSelectedRows[0]+1;
    var endRowSel = indexOfSelectedRows.length+indexOfSelectedRows[0];
    alert(numberOfRowsSelected +" row(s) selected.\r"+startRowSel+" to "+endRowSel+" out of "+tableRowLength+" of current table.");
    You need not select whole rows, just one or a couple of cells.
    Then run the script.
    An alert message is telling you how many rows belong to the cell range you have selected and:
    which rows of the table are selected…
    A typical message would be:
    6 row(s) selected.
    3 to 8 out of 20 of current table.
    The script does some basic checks of the selection.
    If no cell or table is selected, it will just do nothing…
    Uwe
    Message was edited by: Laubender | Some language cosmetics in the alert message

  • Select the current row in read only querry VO

    Hi.,
    I am using jdev 11.1.1.5
    I had created a Finyear EO with corresponding VO
    I had also created a read only querry VO [PostdGLhdlnVO]
    I had created a viewlink between FinyearVO and PostdGlhdlnVO with following conditions
    FinyearVO.bu = PostdGLhdlnVO.bu
    FinyearVO.year = PostdGLhdlnVO.year
    I need to select the current row and print that row using println statement. as i am using readonly querry while i drag and drop the PostdGLhdlnVO i cant able to select the current line (i.e., when user clicks the current row)
    My scenario:
    I need to create a non database checkbox for every row in that table [PostdGLhdlnVO] which will get the current row
    can anyone help me to create a nondatabase checkbox for that table

    Try,
    This may help:
    Re: ADF Table Multiple row selection by Managed Bean-Prasad

  • Select the current row

    hi.,
    I am using jdev 11.1.5
    can any would please tell me how to select the current row in a table and perform operations in it.,
    My Scenario:
    I had created a table.,
    If the user clicks the button named post it must check the attribute [
    Year] and the Status must be updated to all the year
    For eg;
    St Year
    N 201011
    N 201112
    if the user clicks the button The st attribute should be updated with corresponding Year
    so that the N must be updated to P with the year 201011 now my output should be
    st Year
    P 201011
    N 201112
    any one can pls help me

    Hi..
    You can try this using In built Bindings.For that Table need row selection single and need form using same VO.for update drag Commit operation as a button to form.
    http://www.mandsconsulting.com/adf-table-row-selection-event-update-form

  • Indesign cc crash on selecting multiple table row

    If i try to select more than a row or the entire column indesign crash and quit. exported to cs6 and opened it works perfectly
    https://www.dropbox.com/s/2ih8nu2cfc1rjs3/tableproblem.indd

    Hi,
    I'm experiencing exactly the same error - this is on a MacPro4.1 with Mountain Lion. I've repaired permissions and all the hardware checks out. Seems to crash on table selection - also in overprint the redraw on table selections is all over the place (selecting the top row seems to select 2 below it, switching to standard view seems to display correctly). CC seems very buggy, hopefully I can save my work as a template and use CS6 to finish up (going to print in less than 2 hours!)
    Worth noting that there is no other program running in the background and it happens from a clean reboot.
    Here's the report:
    Process:         Adobe InDesign CC [227]
    Path:            /Applications/Adobe InDesign CC/Adobe InDesign CC.app/Contents/MacOS/Adobe InDesign CC
    Identifier:      com.adobe.InDesign
    Version:         9.0.0.244 (9000)
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [118]
    User ID:         501
    Date/Time:       2013-06-27 15:37:57.208 +0100
    OS Version:      Mac OS X 10.8.4 (12E55)
    Report Version:  10
    Interval Since Last Report:          123663 sec
    Crashes Since Last Report:           4
    Per-App Interval Since Last Report:  81445 sec
    Per-App Crashes Since Last Report:   4
    Anonymous UUID:                      EE196355-9B41-C217-A3F7-7C12613A3228
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
    VM Regions Near 0:
    -->
        __TEXT                 0000000100000000-0000000100006000 [   24K] r-x/rwx SM=COW  /Applications/Adobe InDesign CC/Adobe InDesign CC.app/Contents/MacOS/Adobe InDesign CC
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   com.adobe.InDesign.Widgets              0x0000000111d308a3 0x111cec000 + 280739
    1   com.adobe.InDesign.Tables UI            0x00000001181d6954 0x118153000 + 538964
    2   com.adobe.InDesign.Tables UI            0x00000001181d5fc7 0x118153000 + 536519
    3   com.adobe.InDesign.Tables UI            0x00000001181d8b42 0x118153000 + 547650
    4   com.adobe.InDesign.Table Model          0x0000000113abca9b 0x113aa4000 + 101019
    5   com.adobe.InDesign.Table Model          0x0000000113abc0b5 0x113aa4000 + 98485
    6   com.adobe.InDesign.Table Model          0x0000000113aba2a5 0x113aa4000 + 90789
    7   com.adobe.InDesign.Table Model          0x0000000113b5404e 0x113aa4000 + 720974
    8   com.adobe.InDesign.Text                 0x00000001133d3859 0x113267000 + 1493081
    9   com.adobe.InDesign.Text                 0x00000001133e11a9 0x113267000 + 1548713
    10  com.adobe.InDesign.Text                 0x000000011340e518 0x113267000 + 1733912
    11  com.adobe.InDesign.Text                 0x0000000113409613 0x113267000 + 1713683
    12  com.adobe.InDesign.Text                 0x000000011342847a 0x113267000 + 1840250
    13  com.adobe.InDesign.Text                 0x000000011342833a 0x113267000 + 1839930
    14  com.adobe.InDesign.Text                 0x00000001134220a8 0x113267000 + 1814696

  • Add radioButton to select the particular Row

    Hello
    Team
    I have one af:table componant i want to give the radio button to a row for select the particular row...
    this functionality bydefault added in 10g but..now i am working in 11g,how can i achive this functionality

    Hi,
    this is tricky because it involves manual coding. You would need to add a radio button. You would use
    http://adfui.us.oracle.com/projects/adf.faces/multiproject/adf-richclient-api/tagdoc/af_selectBooleanRadio.html
    in an extra column and define the group attribute so all rows participate in a single select case. The, when you select a group you need to fire a change event that allows you to determine which radio button is clicked. Based on this information you select the current row in the table. I didn't code this, but this is how I would do it. As said, gows with some coding especially when you nedd to synchronize the radio button with the selction users do by directly clicking into the table
    Frank

  • Selecting only one row at a time

    Hi experts,
    i have following doubt regarding selecting rows from a db:
    Is there any way of selecting only one row AT A TIME from a dabase just to collect the data in rows instead of in a unique document containing all the rows?
    I would like you to ellaborate on this as i need to send only one row to the IE, and then other row, and so on... without throwing any error!
    I have seen that there are SELECT SINGLE and SELECT UP TO 1 ROW, but these two methods are only useful when retrieving only one row, and that does not match my requirements. I need to process all the rows but one by one..
    I know that we can use the receiver jdbc adapter as if it was a sender by means of its specific datatype, but how to do it row by row??
    Hope i had explained well..
    Thanks in advance and best regards,
    David

    Hi kiran,
    Yes, my table has 5 not null fields but i am selecting and updating fixes values so i think that I will definetely go for the next solution:
    SELECT * FROM t1 WHERE status='0' and ROWNUM<2;
    UPDATE t1 SET status='1' WHERE status='0' and ROWNUM<2;
    My only concern is if the update will take the same row that the select.... BTW, I think it will
    ..What do you guys think?
    I ve been trying to operate with your proposed queries but i received some errors. Your queries are very interesting but i think that with the above ones i meet my requirements as the status field will be 0 for not processed rows and 1 for precessed ones (and the update will look for the row that meets the same 'where' clause than the select, and then, and only then, it will set status='1').
    The only thing i have to care about is what i questioned before.
    Thanks a lot and best regards,
    David

  • Selection of a row in  a table

    Hi,
    I have a problem with JTable. ...i have just started working with JTables and still have not got a complete hang of how they function.
    I have a table whose model is "AbstractTableModel". I have different data in each row of the table therefore i have a celledtior and cell renderer per row. Each row is rendered as a combo box. There is only one column in that table. What i need to do is when the user clicks on any of these the rows in the table i need to evaluate what is the content in that row(in the combo box-It should be the values that have not been used up yet in the other rows...so basically as you add rows the combo box content will keep shrinking till all the possible vlaues are exhausted).
    I added a celleditor listener for every row. When the user clicks on the cell the event get's captured but the row value that shows up is not row the user selected. The value is always the previous selected row. Each cell is rendered as a combo box.
    For example if the user selected the first row in the table then the value of the row selected is -1. If the the user adds two more rows and selects the third row then the value selected is 0 (previos selected).
    What i cannot figure out is how in the world is this value obtained.
    Please help !! I tried everything i can think of to get the correct value of the row selected.
    Thanks a lot for your time and patience.
    Archana

    Hello Suman,
    Please, look at 'No First Select from Table' section of this blog: [/people/jarrod.williams/blog/2006/12/14/visual-composer-tips-and-tricks|/people/jarrod.williams/blog/2006/12/14/visual-composer-tips-and-tricks]
    Good luck,
    Ola

  • Selecting an entire row with the help of Checkbox

    Hi and Evening to Everybody,
    I have a Scenario where i need to select an entire row using the check box. Let me first define the Situation. I created a Simple Sql-report where the first column is a Simple Checkbox and the second column is a display only name and followed by the rest 5 columns as a checkbox.
    my table structure is :
    **create table satt (SELECT_ALL VARCHAR2(10), Name VARCHAR2(50), Object1 VARCHAR2(10), Object2 VARCHAR2(10), Object3 VARCHAR2(10), Object4 VARCHAR2(10), Object5 VARCHAR2(10));**
    Now i had a requirement where i need to Check All or Uncheck All Checkbox by clicking SELECT_ALL column header and i made it using
    simple java-script :
    "<input type="Checkbox" onclick="$f_CheckFirstColumn(this)">"
    Now i need to Check all checkbox in a row by clicking any of the SELECT_ALL check boxes. (Say i have 5 checkboxes in SELECT_ALL column and if i click 3rd checkbox... i need the entire 3rd row checkbox to be checked on click of that 3rd check box).
    I hope i was clear with my question. i did my best. Please help me out with this... Im eagerly lookin for the solutions.
    Thanks & Regards,
    - The Beginner.
    Edited by: 854477 on Jul 13, 2011 4:57 AM
    Edited by: 854477 on Jul 13, 2011 5:01 AM

    Solomon Yakobson wrote:
    There is no row order in relational tables unless ORDER BY is used, so there is no way to decide if 3 Mathematics belongs to 100 or to 200.
    SY.That's not how I interpretted it. I thought he was saying that in the first row column B has the value:
    '1 Physics'||chr(10)||'2 Chemistry'||chr(10)||'3 Mathematics'
    in which case something like this would work
    select a,replace(b,chr(10),chr(10)||a||' ') from table;

  • How to restrict the default selection of first row in ALV  in Webdynpro

    Hi Experts,
    In webdynpro i used ALV to display the bulk amount of datas under a view container. While running it ll cme by default selection on first row. how to restrict that.....

    Hi Vimal,
    Whenever we create nodes then by default the Initialization lead selection property of  node is always checked. That why in the alv by default the first row is selected.
    To restrict this default selection just unchecked the Initialization lead selection property of your node.
    Regard
    Manoj Kumar

Maybe you are looking for

  • CS6 actions not working in CC

    Hi all. I bought some stuff from Phlearn.com and their actions written in CS6 don't work in CC.  Is there any way to migrate them? Thanks, Matt.

  • How do I get rid of Norton Internet Security?  Migration assistant problem

    I have a new MacBook Pro and I used a firewire connection and migration assistant to transfer files. Unfortunately, the assistant transferred all my applications, even the ones I didn't want, like Norton Internet Security, which slowed down my old G4

  • Supposed to be simple: XQuery issue mapping array of objects

    I've been having an issue having a web service return a repeating set of elements. The xsd seems correctly formatted with the right structure and maxOccurs set to ounbounded etc. This is the actual service: public RecArea[] getAllRecAreas() throws Ex

  • IMac, actually is any mac worth it?  -doesn't i in iMac stand for Internet?

    Somewhere after the 10.5.2 updates, things started going south. I should also include I'm on ATT Yahoo DSL 3/512 with a 2Wire 2701 HGB. Also tested on a Ambit (single line, Natted but not routed) Cable modem (would not acquire DHCP). using just ether

  • Execute a Select in the if conditon

    DECLARE   vcount NUMBER; BEGIN   SELECT COUNT(*) INTO vcount FROM EMP WHERE EMPNO=7788;   IF (vcount >=1) THEN     DBMS_OUTPUT.PUT_LINE('emp exists');   ELSE     DBMS_OUTPUT.PUT_LINE('emp not exists');   END IF; END;The above code is working but the