How can I get the adf-tree-node's attributes?

I want get the attributes in the method of "selectionListener"?
How can I do?
I only know :
RichTree treeId;
RowKeySet keySet = treeId.getSelectedRowKeys();
Thanks!

You don't want to maintain a reference to the last selected node, but to the last selected path. Nodes within a tree are addressed using a TreePath, with contains references to each node from the root, down to a specific node. Look at the JavaDocs of javax.swing.tree.TreePath for more info.
Also, JTree has getter/setter methods for the selectionPath.

Similar Messages

  • How can I get the ID number of an attribute, based on the name string?

    In an IVI driver, how can I get the list of attributes of an instrument? Is there a way to retrieve the long type representation of an attribute ID, based on the string name? Say, I put "IVIDMM_ATTR_FUNCTION", and I receive the long number (i.e. 1150010), so I can call the SetAttribute function?
    Thanks.

    Hello-
    Tokens like IVIDMM_ATTR_FUNCTION are actually macros that have been #define'd in a header file. Many of the headers are found in C:\VXIPNP\WIN95\include. For example, the macro for IVIDMM_ATTR_FUNCTION is found on line 111 of ividmm.h.
    Randy Solomonson
    Application Engineer
    National Instruments

  • How can I edit the selected tree node immediately?

    I have completed a popup menu ,which appeares when I have a mouse rightclicked event
    over the selected tree node.when I selected the popup menu item,i can edit the tree node ,but
    I feel that the tree celleditor appear slowly ,what should i do? the following is my code:
    menuItemRenameNode.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    renameNode_ActionPerformed(ae);
    void renameNode_ActionPerformed(ActionEvent ae){
    setEditable(true);
    this.getCellEditor().addCellEditorListener(new CellEditorListener(){
    public void editingCanceled(ChangeEvent e){
    CellEditor cellEditor =(CellEditor)e.getSource();
    System.out.println("editing canceled:"+cellEditor.getCellEditorValue().toString());
    protected boolean canEditImmediately(EventObject e){
    return true;
    public void editingStopped(ChangeEvent e){
    CellEditor cellEditor =(CellEditor)e.getSource();
    System.out.println("editing stopped:"+cellEditor.getCellEditorValue().toString());

    Please check the suggestions in the thread: https://forums.adobe.com/thread/692020?tstart=0
    Regards,
    | T. Ravi Kumar

  • How can I get the previous clicked node in a Tree?

    I have a JTree. If a node is selected, before the user select another, I need to make a question if he have sure about the new selection.
    If the user answers not, I need to select the previous node.
    I have in my class a variable, type of DefaultMutableTreeNode, that makes reference to the last node selected.
    How can I turn this node selected again, if the user select "No"?
    Thanks for any help.
    Renato de Melo

    You don't want to maintain a reference to the last selected node, but to the last selected path. Nodes within a tree are addressed using a TreePath, with contains references to each node from the root, down to a specific node. Look at the JavaDocs of javax.swing.tree.TreePath for more info.
    Also, JTree has getter/setter methods for the selectionPath.

  • ADF and JQuery: How can I get the data back to server listener.

    Jdeveloper 11g Version 11.1.1.2.0
    I use Jquery to draw the signature. How can I get the svgOutput back to my server listener.???
    e.getSource give me the error e.getSource is not function.
    Both of function saveSignatureCapture(which calling from ADF button) and $('#save-output').click(function (event) can not send the the data back to my server listener.
    Thanks.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="dSignature" title="Signature Capture">
          <af:resource type="javascript" source="../resources/lib/jquery/jquery-1.4.2.min.js"/>
          <af:resource type="javascript" source="../resources/js/jquery.drawbox.js"/>
          <af:resource type="javascript">
            var svgOutput = '';
            function saveSignatureCapture(e) {
                var signatureText = $('#drawbox-data').val();
                var source = e.getSource();
                var type = 'saveSignatureCapture_ServerListener';
                var immediate = true;
                var params = {
                    signatureText : signatureText
                AdfCustomEvent.queue(source, type, params, immediate);
            function beginSignatureCapture(e) {
                $('#drawbox').drawbox( {
                    caption : 'This is a caption', lineWidth : 3, lineCap : 'round', lineJoin : 'round', colorSelector : true
                $('#view-output').click(function () {
                    svgOutput = window.open('data:image/svg+xml,' + $('#drawbox-data').val());
                    svgOutput.document.close();
                    return false;
                $('#save-output').click(function (event) {
                    var signatureText = $('#drawbox-data').val();
                    var source = $(document);
                    var type = "saveSignatureCapture_ServerListener";
                    var immediate = true;
                    var params = {
                        signatureText : signatureText
                    AdfCustomEvent.queue(source, type, params, immediate);
                    return false;
            $(document).ready(beginSignatureCapture);
          </af:resource>
          <af:panelStretchLayout id="psSignature">
            <f:facet name="bottom"/>
            <f:facet name="center">
              <af:panelGroupLayout id="pgSignature" layout="vertical">
                <f:verbatim>
                  <div id="divSignature">
                    <canvas id="drawbox" width="600" height="200">
                      <p>Your browser does not support &lt;canvas&gt;</p>
                    </canvas>
                  </div>
                  <br/>
                  <br/>
                  <a href="#" id="view-output">View Rendered SVG Output</a>
                  <br/>
                  <br/>
                  <a href="#" id="save-output">Save Signature</a>
                </f:verbatim>
                <af:spacer width="10" height="10" id="s10"/>
                <af:panelGroupLayout id="pghl14" layout="horizontal" halign="center">
                  <af:commandButton text="Save Signature" id="cbSaveSignatureButtonId" partialSubmit="true">
                    <af:clientListener method="saveSignatureCapture" type="click"/>
                    <af:serverListener type="saveSignatureCapture_ServerListener"
                                       method="#{backingBeanScope.mainBackingBean.saveSignatureCapture_ServerListener}"/>
                  </af:commandButton>
                </af:panelGroupLayout>
              </af:panelGroupLayout>
            </f:facet>
            <f:facet name="start"/>
            <f:facet name="end"/>
            <f:facet name="top"/>
          </af:panelStretchLayout>
        </af:document>
      </f:view>
    </jsp:root>Edited by: user553450 on Sep 17, 2010 4:02 PM
    Edited by: user553450 on Sep 17, 2010 4:13 PM

    Hi Frank,
    Thank you so much for your advice, I got lot of knowledge from your book and articles since I am in transition from forms to JDeveloper.
    By surrounding <af:panelStretchLayout id="psSignature"> with <af:form id="f1">
    Now the following code is work on Firefox, everything fine, I can get the data back and call my server listener as I expected.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" title="Signature Capture">
          <af:resource type="javaScript" source="../resources/js/excanvas.js"/>
          <af:resource type="javascript" source="../resources/lib/jquery/jquery-1.4.2.min.js"/>
          <af:resource type="javascript" source="../resources/js/jquery.drawbox.js"/>
          <af:resource type="javascript">
            function saveSignatureCapture(e) {
                var signatureText = $('#drawbox-data').val();
                alert(signatureText);
                var source = e.getSource();
                var type = 'saveSignatureCapture_ServerListener';
                var immediate = true;
                var params = {
                    signatureText : signatureText
                AdfCustomEvent.queue(source, type, params, immediate);
            function beginSignatureCapture(e) {
                var cmd = "$('#drawbox').drawbox({lineWidth:3,lineCap:'round',lineJoin:'round',colorSelector:true});";
                if (navigator.userAgent.indexOf('MSIE') !=  - 1) {
                    setTimeout(cmd, 1000);
                else {
                    $('#drawbox').drawbox( {
                        caption : 'This is a caption', lineWidth : 3, lineCap : 'round', lineJoin : 'round', colorSelector : true
          </af:resource>
          <af:form id="f1">
            <af:panelStretchLayout id="psSignature">
              <f:facet name="bottom"/>
              <f:facet name="center">
                <af:panelGroupLayout id="pgSignature" layout="vertical">
                  <f:verbatim>
                    <canvas id="drawbox" width="600" height="200">
                      <p>Your browser does not support &lt;canvas&gt;</p>
                    </canvas>
                  </f:verbatim>
                  <af:spacer width="10" height="10" id="s10"/>
                  <af:panelGroupLayout id="pghl14" layout="horizontal" halign="center">
                    <af:commandButton text="Save Signature" id="cbSaveSignatureButtonId" partialSubmit="true">
                      <af:clientListener method="saveSignatureCapture" type="click"/>
                      <af:serverListener type="saveSignatureCapture_ServerListener"
                                         method="#{backingBeanScope.mainBackingBean.saveSignatureCapture_ServerListener}"/>
                    </af:commandButton>
                  </af:panelGroupLayout>
                </af:panelGroupLayout>
              </f:facet>
              <f:facet name="start"/>
              <f:facet name="end"/>
              <f:facet name="top"/>
            </af:panelStretchLayout>
          </af:form>
          <af:clientListener method="beginSignatureCapture" type="load"/>
        </af:document>
      </f:view>
    </jsp:root> However, I got the error following error when I run the page from IE8.
    Assertion failed: Incorrect use of AdfRichUIPeer.GetDomNodeForCommentComponent.AdfRichCommandButton[oracle.adf.RichCommandButton] id=cbSaveSignatureButtonId StackTrace:function(x217)[AdfRichCommandButton[oracle.adf.RichCommandButtonId]..........
    FYI, the following simple testing code has the similar error in IE8 too (not for Firefox).
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:resource type="javaScript" source="../resources/js/excanvas.js"/>
          <af:form id="f1">
            <f:verbatim>
              <canvas id="drawbox" width="600" height="200">
                <p>Your browser does not support &lt;canvas&gt;</p>
              </canvas>
            </f:verbatim>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>The error is: Assertion failed: Incorrect use of AdfRichUIPeer.GetDomNodeForCommentComponent.AdfRichDialog[oracle.adf.RichDialog] id:::msgDlg StackTrace function(x217).......
    Your advice is very much appreciated.

  • HT1692 how can i get the previous contact details in iphone

    how can i get the previous contact details in iphone

    You don't want to maintain a reference to the last selected node, but to the last selected path. Nodes within a tree are addressed using a TreePath, with contains references to each node from the root, down to a specific node. Look at the JavaDocs of javax.swing.tree.TreePath for more info.
    Also, JTree has getter/setter methods for the selectionPath.

  • How can we get the image which is stored in clipboard by labview, is there any functions available like text from clip board

    How can we get the image which is stored in clipboard by labview, i can get the text in clipboard by using invoke node directly.but i cannot get the image, is there any functions or vi available.(image is in Png format)

    The Read from Clipboard method is, unfortunately, limited to text. If the clipboard contains an image then you need to use OS-specific functions calls. This is an example program for Windows. It's old, but it should still work.

  • How can i get the list of all users present in the LDAP

    Hi Experts,
    How can i get the list of all users present in the LDAP ?
    Is there any API or function Code to get all user list??
    Please help me out!!!
    Help will be rewarded

    Well it will depend on exactly where your UME configuration points to in the LDAP tree but yes, it is possible to get all users.  Something like the following should do it:
    import com.sap.security.api.*;
    import com.sapportals.portal.prt.component.*;
    IUserFactory iuf;
    ISearchResult isr;
    IUser user
    String userid;
    iuf = UMFactory.getUserFactory();
    isr = iuf.getUniqueIDs();
    you will need to iterate the ISearchResult object but you can get IUser objects by
    userid = (String)isr.next();
    user = iuf.getUser(userid);
    then you can imanipulate / identify / or whatever you need with the user object
    Haydn

  • How can I get the name of weblogic.Server

    Hi all,
    in my EJBs I want to know, on which server instance I´m running. I need this for
    logging info. How can I get the servers name?
    When I load the JNDI tree and select java:comp, an error occurs and a lot of information
    is printed. One is weblogic.Server and that is what I´m searching for.
    I use WLS 6.1 SP1
    Any ideas? Thanks,
    Nicole

    Use JMX. See http://dima.dhs.org.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Nicole" <[email protected]> wrote in message
    news:3c4d6daa$[email protected]..
    >
    Hi all,
    in my EJBs I want to know, on which server instance I´m running. I needthis for
    logging info. How can I get the servers name?
    When I load the JNDI tree and select java:comp, an error occurs and a lotof information
    is printed. One is weblogic.Server and that is what I´m searching for.
    I use WLS 6.1 SP1
    Any ideas? Thanks,
    Nicole

  • Answer: to How can I get the reset button to work.

    How can I get the reset button to work?: Answer
    Thanks to everyone who helped on this. You are awesome. Especially Ned!!  Posted here because I was unable to add more to the existing post.
    Here is the question:
    When you click on the reset button, this error below comes up. If you can't find the button it is the navy colored rectangular thing in the lower left corner of page.
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
        at flash.display::DisplayObjectContainer/removeChild()
        at AddATree2/onReset()
    When you click on the reset button, this error below comes up. If you can't find the button it is the navy colored rectangular thing in the lower left corner of page.
      Here is the answer:
    //when you click the reset button everything is removed from the stage
        //except the star, baclground, and reset button (trees and greeting REMOVED)
        public function onClear(Event:MouseEvent):void
                if (tree3) removeChild(tree3);
                if (tree2) removeChild(tree2);
                if (webText) removeChild(webText);
                if (tree) removeChild(tree);
                clickCount = 0;

    This is the answer to what to put in the onclear function.

  • How can I get the language of the user logged on using only DI API?

    Hello,
    how can I get the language of the user logged on using only DI API,
    without invoking the UI?
    Can I read the value from some table using sql?
    I could write to file the first user's connection to the language code in SAP and then use it from external program, but I do not like this solution ...
    I know only this possibility:
            '_SboCy ==> SAPbobsCOM.Company
            '_SboCys ==> SAPbobsCOM.CompanyService
            '_SboApp ==> SAPbouiCOM.Application
            CodLng Dim As String = ""
            Dim lng As SAPbobsCOM.UserLanguages _SboCy.GetBusinessObject = (BoObjectTypes.oUserLanguages)
            If lng.GetByKey (_SboApp.Language) Then
                codLng = lng.LanguageShortName
                'Etc. ..
            End If
            lng = Nothing
    Thanks

    Hi Enrico,
    The language settings are held on the user's Windows profile and not in the database. In SBO 2007A onwards there is an XML file that is created by the SBO client (previous versions stored the information in the registry). The file is called b1-current-user.xml and you'll find it in the temporary application data under the user's profile (by default this will be C:\Documents and Settings\<profile>\Local Settings\Application Data\SAP\SAP Business One for Windows XP). This XML file contains a node that looks like the following:
    <leaf kind="single" name="Language" type="String">
         <value>8</value>
    </leaf>
    where the value is the language id that should correspond to the same setting in the DI API. If your application will always run on a workstation where the SBO client is installed then you could read this XML file. Of course, this file may not exist for a particular Windows user if they have never opened the SBO client so you'd need to have a default setting.
    If you application will be installed on a workstation which doesn't have an SBO client installed on it then there is no way to tell what default language to use and you'll need to build this logic in to your own application (eg have a screen where the user can choose their preferred langauge and then store this as a config file in a similar way to how the SBO client works).
    Kind Regards,
    Owen

  • How can i get the images from a picture ring into a cell in Excel?

    Hi
    I need to get the chosen image from a picture ring into a cell in a Excel worksheet. If i use an invoke node i only get to write a picture from file. How can i get the picture directly from the picture ring into Excel?
    Kenneth

    No, there is no simple way of doing it directly. You need some clipboard manipulation which means you need to write some codes in excel as well. Importing the image through a file is much easier.
    -Joe

  • I am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier

    i am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier photo please help me to recover my photos

    Well I'll guess you're using iPhoto 11:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • I accidentally erased a music album that I purchased on iTunes. How can I get the iTunes store to recognize that it is no longer in my iTunes library and download it again?

    I accidentally erased a music album that I purchased on iTunes. How can I get the iTunes store to recognize that it is no longer in my iTunes library and download it again?

    Delete the broken links in iTunes then look at your purchased list to redownload.
    If this happened because you were deleting files from the iTunes folder in Finder, don't.  You have to let iTunes do all the deleting and moving or you will end up with broken links.

Maybe you are looking for

  • Why can't i see songs on my iPod in iTunes when connected

    I have several songs on my iPod touch that I'd like to delete, but when i plug it into my computer and open iTunes, the songs are not displayed as being on the iPod.  How do I make them visible to delete them?

  • Management tool to Tracking port by IP address

    Is there a tool to easy find out the corresponsing port in a group of switches by IP address?

  • Making class available to bootstrap loader?  interesting twist.......

    We're deploying our jar wrapped in an exe (created by exe4j). It's not an option to unwrap the jar, but I want to make a particular class available to the bootstrap loader. If you're not familiar with exe4j, you can pass arguments to the jvm, so I ca

  • Is Paris beta available for download?

    I want to explore Paris if beta is available for download. Where can I get it? url pls. Thanks

  • Cisco switching

    Hi, I have a 3750E-48PD new switch which was added at access layer. We have configured it for connection to end user ports. However, upon final configuration completion, I am able to telnet into the switch but not able to SSH into it. When i telnet i