Checking if user has selected or deselected a tree node

Hello,
In the event handler of the On Action event of a tree node, I need to decide whether the user has selected the element or deselected it.
I thought to use the following:
data:  lo_node type ref to if_wd_context_node,
         lo_element type ref to if_wd_context_element,
         l_element_selected type abap_bool.
first I tried
* need to find out if this element was selected or deselected!
  l_element_selected = context_element->is_selected( ).
but it didn't work - so I tried
lo_node = context_element->get_node( ).
  lo_element = lo_node->get_lead_selection( ).
  if lo_element = context_element.
    l_element_selected = abap_true.
  else.
    l_element_selected = abap_false.
  endif.
This did work.
I'm slightly confused as to why the two did not give the same result?
I can see in the implementation why - gotta love being able to see how the engine works - but why is the node selection table not set? For future reference, is there some flow that has to happen before the selection gets set but after the lead selection is made? Or is this just an error in the handling of the tree node element?
Cheers,
Chris

One would wonder why there is no is_Lead_Selected method. Having just the is _ Multi_  Selected method is quite confusing. Especially when the method description is "True, if element is selected in the node". One would assume that this would include lead selection.
Then again - when you consider the mismatch between methods that return values and methods that export values, this lack of a is_Lead_Selected method would be low down on my list of things to fix to make WDA more consistent.
Having Get_Static_Attributes return the data rather than export it would be much higher on my list - ( get_static_attributes_ref does actually return the reference to the data - talk about inconsistent! )

Similar Messages

  • How to check which user has the privilege to execute a stored procedure?

    I am using Oracle 7 and I would like to check which user has the privilege to execute a stored procedure. How can I check it? Is there any view I can query for?
    Alex Hung

    Please check DBA_SYS_PRIVS.
    SQL> select * from dba_sys_privs
    2 where grantee='HARY';
    GRANTEE PRIVILEGE ADM
    HARY EXECUTE ANY PROCEDURE NO
    ....

  • Reader SDK: any way to see what text the user has selected?

    I'm using the Adobe Reader SDK with C#, looking at the interapplication communication features.
    I can open a document in Reader and allow the user to user the reader tools like select text, etc.
    Here's the problem: I want to have my application know what text the user currently has selected.  And I'd like it to know the name of the field that the user has selected, not just the text of the field.
    Microsoft Office's Interop has something like this:
    currentDocument.GetSelectedText();
    Is there any way to do this with IAC or the javascript or plug-in features of the Reader SDK?
    If not, can it be done with the Acrobat API?  I've looked through both sets of documentation, and haven't found what i needed.
    Thanks for any help!

    To write a plug-in for the Adobe Reader you need to go through 2 separate steps.
    Step one - Download the Adobe Acrobat SDK (from here http://www.adobe.com/devnet/acrobat)
    and build your plug-in against the Acrobat product, following the documentation to make sure you only use API's that are available in the Reader program. The documentation tells you what version of the Adobe ACrobat or Reader program is needed for the function and whether the function can be called in Reader.
    Step two - Apply for a Reader certificate to allow your plug-in to be loaded by the Reader, the link is on the same web page as the above link. This step can be initiated before you have created your plug-in, and I would recommend that you do start this process before you develop your plug-in as Adobe can refuse to give you the certificate in which case all your development would be wasted.
    Only once you have permission form Adobe can you make your plug-in work with the reader application.
    Once you have done both these steps there are plenty of people on this forum that can help you with specific problems you may encounter.
    If you are not sure you have the knowledge to build the plug-in, there are plenty of people that you can hire to create the solution for you.
    HTH
    Malcolm

  • If a User has select only on a table, it isn't listed in TABLES

    I have a group of Users I want to be able to access a view of the table (select only).
    I created a role and table/select privs. for those users. In SQL Developer they
    do not see a list under TABLES for those tables they have SELECT Access to.
    They can, however, enter a query (if they know the name) and select from the table,
    but they have to know the table name and they are not listed.
    Is there an Oracle priv. a user must have to have to view the TABLES (although they
    only have select)?

    Yes, I would think so. But for all the tables listed, when you click on the DATA tab you do not see any data. The only way to view is to go the SQL Worksheet and query *
    from the table.
    The user has SELECT on the tables.

  • Query to get objects list for which the current user has 'SELECT' privilege

    Hi,
    I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views. The privilege information for the current user is scattered in more than one system views. I have following system views
    USER_TAB_PRIVS_RECD - Object grants for which the current user is the grantee
    ROLE_TAB_PRIVS - describes table privileges granted to roles. Information is provided only about roles to which the user has access.
    If the object privilege is granted explicitly like "GRANT ALL ON TABLE_NAME TO "USERNAME" then this privilege entry goes to USER_TAB_PRIVIS_RECD
    If the object privilege is granted by ROLE. Role is created with certain object privileges. this role is assigned to user "GRANT ROLE_NAME TO "USERNAME"", then this entry goes to ROLE_TAB_PRIVS
    From these findings, I have composed below query
    (SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT')
    Have I got user's all prvilege details? should I look some other system views?
    How to exclude system table privileges details?
    (SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT' AND OWNER NOT IN ('SYS','SYSTEM') Is this right?
    What about Public role in Oracle? Should I consider public role here?
    Oracel Version :11g
    I want make this query to work on Oracle 8i or above version
    Thanks

    >
    I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views.
    >
    You will need a hierarchical query to do that.
    Try this script for Listing privileges recursively for Oracle users
    http://www.adp-gmbh.ch/ora/misc/recursively_list_privilege.html

  • Region Customization - can you extract the page regions a user has selected

    Is there an APEX view, or someway to determine programmatically, which customizable regions a user has selected?
    In the case where we have set regions to be 'Customizable and Shown By Default', our application needs to know which regions a user has selected or de-selected, as the application processing logic will vary depending on the user selection.

    Here are some useful queries.
    To see all the views available.
    select *
    from apex_dictionary
    where column_id = 0Then the other column_id values are the actual columns on those views.
    So I ran this:
    select *
    from apex_dictionary
    where column_name like 'CUST%'And found a good candidate on view APEX_APPLICATION_PAGE_REGIONS
    You're looking at something like this:
    select region_name, customization, customization_name
    from APEX_APPLICATION_PAGE_REGIONS
    where application_id = :APP_IDThanks
    -Jorge
    Please update your user name from user2543337 to something more friendly

  • Feature Request: Ability to detect which tab user has selected in tab view

    'Twould be nice if the tab the user has selected could be restored when a dialog box with a tab view is re-presented.
    Or is there a way and I'm just brain-dead at the moment?
    Thx,
    R

    Hi, Rob,
    Use the «value» property of viewFactory:tab_view() with data from «identifier» from nesting viewFactory:tab_view_item(). I just tried this and it works well. You can bind this value directly to entry in preferences table, and the tab selection will be restored at each run.
    Alex

  • How to see answer user has selected

    Is there away the answers to a quiz the user has selected can be viewed on a page at the end of a quiz and printed out.

    Hi Devon,
    I just made a sample project to see if it was actually possible to do and it is.
    You can't assign variables on a quiz slide (or any of the buttons) so you would need to add a blank slide between each of your question slides. This slide would the assign a user defined variable with the value from the selected answer on the previous slide. The slide only has to be 0.2 seconds long.
    I attached a demo project here (including the .cp file). Here you will be able to see how I did it and copy the actions and scripts.
    I also uploaded it to my site since the approval process can be rather long here ;o)
    http://www.captivate4.com/demonstrations/quizAdvancedActions.zip
    @ Lilybiri - the more the better ;o) I myself use a custom Flash quiz tied into our LMS so it's similar to what you do I guess.
    /Michael
    Click here to visit the www.captivate4.com blog

  • How can a jsp page tell which Oracle Responsibility the user has selected?

    We have two responsibilities - Timecard Administrator and Timecard Viewer. Everything that they can access is the same, except for one particular jsp page which we want to present a slightly different view if the user's responsibility is Timecard Viewer (specifically, the edit link in the results page will be suppressed). Unfortunately in order to implement this, the jsp code needs to be able to distinguish which of those two responsibilities the user has selected. I have written jsp code to print all the environment variables and unfortunately the environment is essentially identical regardless of which of the two responsibilities the user selected.
    How do I pass in the active responsibility to that page/environment in a way that can be tested by the jsp code?
    Thank you,
    Graham Toal <[email protected]>

    Yes, I tried something like this (shortened to the basics for this post):
    <pre>
    sqlQuery="select responsibility_name from fnd_responsibility_vl where responsibility_id = FND_GLOBAL.RESP_ID";
    stmt=con.createStatement();
    rs=stmt.executeQuery(sqlQuery);
    int field_count=rs.getMetaData().getColumnCount();
    while (rs.next()) {
    for (int i=0; i<field_count; i++) {
    logger.write("Responsibility: "+rs.getObject(i+1),"JSP",objName,0,-1,1001);
    </pre>
    However it did not print any results at all.
    I'm trying a different approach at the moment - I've cloned the menus from the Administrator responsibility to the new Viewer responsibility, and have altered the top-level menu so that I can insert a new variable into the process state myself; that way by the time the user navigates to the changed page, there should be a variable there that can be tested.
    Unfortunately the top-level menu isn't just a simple menu, it's a piece of code that issues an HTML redirect depending on the parameter passed in - which is set in the Oracle function screen for the function attached to that menu.
    (was something like utpa_top_menu.jsp?ADMIN and I changed it to utpa_top_menu.jsp?VIEWER, with appropriate tests for the new module name:
    <tt>
    else if ("VIEWER".equals(moduleName))
    url = "/utpa/jsp/admin_reports-viewer.jsp";
    </tt>
    In admin_reports-viewer.jsp I've added <tt>session.putValue("REPVIEWER","y");</tt> and in the actual target main page I have:
    <pre>
    if (session.getValue("REPVIEWER") == "y") {
    // viewer
    out.println("<CENTER><B>You are using the Timecard Viewer responsibility</B></CENTER><BR>");
    } else {
    </pre>
    And although the URL bar at the top of the screen is displaying the correct (redirected) URL, the page that is displayed is blank. Completely empty. 0 bytes. The file is present on the filing system; has content; has the correct ownership and permissions; I've reloaded apache, even had the systems guys reboot completely. I'm at a loss :-/
    Graham

  • CFGRID - validate user has selected a row?

    Hi,
    How do you verify someone has selected a row in a CFGRID
    before clicking a submit button? Right now I have to use a
    cftry/cfcatch to error trap the user from click the submit button
    before selecting a row in a cfgrid.
    Many thanks,
    Kiley

    <cfinput type="Button" name="btn_submit" value="Click Me"
    onclick="canSubmit();">
    function canSubmit(){
    if(gridName.selectedIndex != undefined){
    submitForm();
    else{
    alert('Please select a record from the grid first...');
    Ken

  • Selecting a RichTree component tree node

    Hi,
    How do I get the selected tree node in a RichTree component?. I would like to select the node with the mouse and possibly use the popup menu to initiate an action (e.g. delete). How do I add an item to the popup menu to do this? I'm using the RichTree component in JDev 11g. Any sample code would be helpful.
    Thanks
    Colin

    Colin,
    To perform some operation on node selection within af:tree component you simply need to create a selectionlistener and decorate the tree component with the listener you implemented. For the context-menu you describe the af:tree has an attribute named contextMenuId. Set the value of this attribute to equal the id of an af:popup that contains an af:menu that represents the menu that you want displayed on a right-click. Below is a link to the tag doc for the af:tree component
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/tagdoc/af_tree.html
    --Ric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to find Org unit User has selected

    Hi All,
    We are setting up printing on our CRM 5.0 system (Web interaction centre) and was wondering if anyone knows of a way to find out what Org unit the users is logged on as ??
    We are using Actions to print specific smartforms off for the users and need the prints to go to an assigned printer.. We are hoping to use a printer that is assigned to the 'Default Printer' attribute in the org structure (PPOMA_BBP)
    As you will be aware users can be in many positions (under the org units) in the org structure and when we log onto the Web IC we get the option of which one we would like to use... Is there a function that can read this Org unit so we can use it in the printer determination BADI to decide what printer the prints will go to ???
    Many Thanks
    Gaz

    As soon as you make the profile selection,IC sets the profile and org unit in the session.
    You can read them using
    Data: lv_prof     type ref to if_ic_profile,
                    pname       type        string,
                    orgunit     type        crmt_ic_org_unit.
    lv_prof = cl_ic_profile_service=>get_instance( ).
    pname = lv_prof->get_profile( ).
    org_unit = cl_crm_ic_services=>get_org_unit(  ).
    Thanks,
    Thirumala.

  • How to find if the user has selected one or many files using a file chooser

    I have a file chooser but want it to return either a file or file array depending on whether more than one file is selected but there doesn't seem to be any way to find out if that is the case or not. I want it to look something like:
                if(fileChooser.getSelectedFile().isDirectory()==true)
                    selectedFile=fileChooser.getCurrentDirectory();
                else if(fileChooser.multipleFilesSelected())
                    fileChooser.getSelectedFiles();//we have more than one file selected
                else   
                    fileChooser.getSelectedFile();    //if we have one file selected
                }am I going about dealing with this in the right way?

    OK, I scoured the API again and found I could avoid the problem altogether by using
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JFileChooser.html#isMultiSelectionEnabled()
    and
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JFileChooser.html#setFileSelectionMode(int)

  • How can i find out what cursor the user has selected on an xy graph?

    I have an XY graph in which while the program runs it will be creating cursors in certain locations on the plot. I want to give information about this cursor when selected upon, I THOUGT that active cursor does this.. but appreently not.. it seems to jsut keep spitting out 0, any ideas?

    > I have an XY graph in which while the program runs it will be creating
    > cursors in certain locations on the plot. I want to give information
    > about this cursor when selected upon, I THOUGT that active cursor does
    > this.. but appreently not.. it seems to jsut keep spitting out 0, any
    > ideas?
    You might look at the Selected Cursors property. It indicates which
    cursors will be acted upon by the movement palette. It should be
    equivalent to the small LED buttons on the cursor palette.
    Greg McKaskle

  • OfficeJet 4630 Defaults to Network Fax when user has selected Network Printer Instead on WIN XP

    Hi, just installed the OJ4630 and selected the "Network Printer" as the default.  When choosing to print an MS Word document in "My Documents" the "Network Printer" correctly appears as the default.  But when choosing to print a picture in "My Pictures" the "Network Fax" becomes the default, which is an error.  Please advise, thanks!

    Hi 
    Thanks for reporting the issue. Here is the way to fix it.
    Go to windows->Control panel-> Printers and devices
    Right click on the 4630 Fax Printer, select the option Set as default printer and you'll see two choices there: one is printer driver and other one is fax driver.   You choose print driver to set as default.
    Done
    Hope it will help you.
    happy Printing!!!
    Click on the "Thumbs up"button on the left to say "Thanks"
    Please mark the post that solves your problem as "Accepted Solution"
    (Although I am employed by HP, I am speaking for myself and not for HP)

Maybe you are looking for

  • PL/SQL function body returning SQL Query Problem

    I have wandered around the forums and found quite a bit of helpful information that has gotten me to the point I am now at. Unfortuntely, PL/SQL is not my strongest point and I am getting an error when I attempt to run my report. This is what I have

  • Wlan not working in win 10 in hyper v

    hi ,  I have installed Windows 10 preview in my Hyper V using Windows 8.1.  i have followed this steps in these urls http://blog.credera.com/technology-insights/microsoft-solutions/using-your-windows-8-wireless-connection-inside-hyper-v/ http://blogs

  • Word doc saved/printed as PDF looks bitmapped

    I have a client who is trying to save an electronic letterhead as a PDF in order to send neditable legal documents. However, when they try this, everything in the PDF appears bitmapped. The cient described it as "fuzzy" or "soft", but when you zoom i

  • XSLProcessor

    I'm calling the processXSL method with XSLStylesheet and XMLDocument as args in order to transform a master XML doc into several XML docs that match the db structure of target views. I've done this successfully in pl/sql and using Steve Meunchs' JScr

  • JCo IDoc: SAP Business Connector required?

    On my searching for the error IDOC_ERROR_METADATA_UNAVAILABLE i have found this thread: BC 4.7 -IDOC_ERROR_METADATA_UNAVAILABLE "As of SAP BC 4.7 the SAP Adapter (the piece dealing with the SAP system(s)) uses the new SAP IDoc Java API which uses oth