Setting property for DefaultMutableTreeNode in Swing.

Hi,
I'm working with JTree in Swing. Its getting added with DefaultMutableTreeNode dynamically. I'm using setUserObject() to set the node name what I want to display on the screen. How can I set Id for the node? Based on the Id I want to identify the selected node.
Please help me asap.
Thank you
Regards,
Rajapriya.

Override toString() in the class to show the desired value
e.g.
public String toString()
return "test"; //You can put any logic here to show the desired name
}

Similar Messages

  • How to set property for KM Resource in webdynpro Java

    Hi all
    i am trying to set the property for KM resource in webdynpro for java.
    can anybody send sample code, then it will be great help to us?
    Regards
    Sunil

    Hi Sunil,
    check in sdn with thread name as
    "Reading property from a resource via api, tricky one"
    Koti Reddy

  • Setting property for multiple objects?

    Adobe Pro X; ES2
    I need to set the access property for multiple objects based on the selection of a radio button group. I assume I have to use resolveNodes(), but cannot for the life of me get it to work. Here's what I've played with :
    if (this.rawValue == "1") { 
    xfa.resolveNodes("OtherCase_gp.[*]").access = "open";     
    } else {  
    xfa.resolveNodes("OtherCase_gp.[*]").access = "readOnly";
    If I use Action Builder, I get endless lines of "oTargetField = this.resolveNode("OtherCase_gp.OtherCaseOther_cb"); oTargetField.access = "readOnly";" There must be a better, more efficient way to do this!

    Hi,
    Here's another way to try;
    var fields = xfa.resolveNodes("OtherCase_gp.#field.(name.substring(0,9) == 'OtherCase')");
    for (var i = 0; i < fields.length; i++)
        fields.item(0).access = (this.rawValue == "1") ? "open" : "readOnly";
    This approach will only work if your fields are all under OtherCase_gp, Radzmar's solution is more general if your form has a more complicated hierarchy.
    Regards
    Bruce

  • How to set property for Cluster Environment for JMS Adapter

    Hi All,
    I am moving from DEV to Prod environment which is cluster.
    Can you Please explain me what property I need to Set for Cluster Environment for JMS Adapter, so that I could avoid race condition for Dequeue/enqueue.
    I am using soa suite 10.1..3.4
    Thanks in Advance.
    Edited by: vikky123 on Jul 12, 2010 7:03 AM

    put something like this
    <activationAgents>
          <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="PARNERLINKNAME">
            <property name="clusterGroupId">SOMEUNIQUEVALUE</property>
            <property name="portType">PARTNERLINK_PORTTYPE</property>
          </activationAgent>
        </activationAgents>

  • Set property for  background color for JButton

    I am attempting to change the colors of the UI for JButton. The change does not appear to be taking. The reason appears to be that JButton, and for that matter JLabel setOpaque(false); How can I globally change this to setOpaque(true);
    Second is there a way to save the default property hash table after the changes are made so that it will run the next time the program is executed.

    Thank you for responding. I don't feel that I have been clear in the statement of the problem. I have written a medium size desktop application(20,000 statements). I am trying to customize the color scheme by modifying the default laf properties color entries. I can modify JPanel through a put to the properties hash table. When I attempt to change the background color for JLabel and JButton it doesn't seem to take. I believe that the reason it doesn't take is because opaque(false). Is there a property that allows the overide of opaque to true or do I have to change all of the numerous JButtons in my program.
    I have decided to store all changes in a file and make the changes at the point that the program initializes each time its run.
    I am not looking for specific code but an approach.
    I would appreciate your advice.

  • Setting property  for context value attributes

    hi experts,
      created a value attribute[XYZ] in context and i want to set that value attribute type as
    com.sap.tc.webdynpro.services.session.api.IWDWindow
    From properties am not finding the above path.
    please provide the valuable information.

    hi sham,
               my question is solved.thank's for u r help
    my next task is connecting the backend  BW using jco connections.
    SingleServer
                               Host Name:
                                System Number:
                                 SAP Router:
    User Account:
                                                                              Client:
                                                                                Logon name :
                                                                                 Password:
                                                                                 language:
    where do i get  these details .is this possible to get these details from development mechine.i do have access to enterprise portal.
    Thank's&Regard's,
    Prashanth.

  • Delete Allowed Property For Current Record

    I have a requirement where I need to make a record allowed proeprty delete_allowed as false.
    Eg:
    If :variable:='YES' then
    SET_ITEM_INSTANCE_PROPERTY('block_name.item',CURRENT_RECORD,UPDATE_ALLOWED,PROPERTY_FALSE);
    end if;
    I cannot set delete_allowed property here, so how can I set delete allowed property to false?
    if I use
    SET_ITEM_PROPERTY('block_name.item',ENABLED,PROPERTY_FALSE);
    it will set property for all the records in the block, I have a multi-record block
    I am using Oracle Forms 10g
    Thanks

    Thanks for the reply.
    Yes I was thinking of doing this.
    if I put a validation in key-delrec trigger, then do I need to explicitly call a commit or any other method to delete a record if condition is not true?
    Eg:
    If :variable:='YES' then
    Message(' DELETE IS NOT ALLOWED');
    Raise Form_Trigger_Failure;
    ELSE
    commit or delete_record;
    End if;

  • How do you set a default format property for a formula defined in the AWM?

    Is there a way to define a default format property for a formula that I create in the AW?
    For example, if I define a formula in AW I can assign it a datatype of decimal. But what property do I need to add if want that formula to by DEFAULT always display a certain way, regardless if I use the Discover Plus with OLAP option or OracleBI Spreadsheet Addin?
    Example: want to display it by default, in the AW cube, as being associated to a format of 00.0000 or 00.0000% or $###,##0.00 etc. This way, no mater what tool I use to view the cube, it will by default inherit my default format (set in the AW).
    Thanks.

    Okay, but if I use the out-of-the-box products Oracle provides (ie: Discover Plus with Olap, and the OracleBI Spreadsheet Addin) I still dont understand what my solution is?
    The only other solution we tried was to create formulas using AWM template files. The issue here is trying to find out what property syntax needs to be added to the XML code, so that my formula, by default, is associated to a certain formating style (ie: 00.00). And then when you reference that formula in those out-of-the-box Oracle products, it displays as expected.

  • What is the need for setting property data inside the JMSMesage

    Hi
    Could anybody please let me know
    *What is the need for setting property data inside the JMSMesage??
    For example i have a seen a similar example as shown ??
    I have seen a
    Message.setStringProperty("Sport","Basketball");
    and also please tell me how can the MDB recievies this property data ??
    Thanks in advance .

    raviprivate wrote:
    Could anybody please let me know
    *What is the need for setting property data inside the JMSMesage??
    For example i have a seen a similar example as shown ??
    I have seen a
    Message.setStringProperty("Sport","Basketball"); Look at the detail JMS documentation on [Message Properties|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html] .
    >
    and also please tell me how can the MDB recievies this property data ?? MDB onMessage method argument is the Message object and if you look at the documentation, Message interface has getter methods to retrieve the properties.

  • Setting property attribute values for multiple selected objects.

    Hello,
    Is there an easy way to set the attribute property values for more that one selected Table Operator Attribute (column) at a time. For example the target table has over 100 columns but I only want to INSERT/UPDATE 10 of those columns. The generated MERGE, INSERT and UPDATE statements will perform DML on all of the columns in the target table, setting the 90 columns with no mapping set to NULL. This is due to the Loading Properties 'Load Column when Updating Row' and 'Load Column when Inserting Row' both default to Yes. I would like to select multiple Attributes in the Table Operator and change the 'Load Column when Updating Row' and 'Load Column when Inserting Row' to No. This is similar to what you were able to do in Oracle Forms 9.0 Designer select multiple Items in a Block and change the properties en-masse.
    Thanks

    Hi,
    Using OMB scripting to set attribute properties in a data mapping sort of defeats the purpose of utilizing a graphical user interface to define and set properties for a data mapping? Surely the GUI data mapping tool was created to get away from writing scripts and scripting would also require that you know the name of the data mapping, table operator and the set of attribute names for which you have to write one line of script to set each property value, i.e. 90 lines to set 90 attribute values.
    Cheers,
    Phil

  • How to set "Maximum Lenght" column property for database block at RUNTIME?

    Hi folks,
    Is it possible to somehow set a "Maximum Length" property for database block column at runtime?
    I have a dynamic form, which maintains mostly "STATIC DATA" within all application which are stored in different static data tables (which have similar structure). But now, description column in some of those tables was extended (not in all at this stage). I would like to avoid truncating form error while reading data from those extended tables, so I would like to set an MAXIMUM SIZE to accurate value at the time when I'm specifying TABLE NAME for that database block.
    What property should I use to set it?
       -- before executing query in "MAIN_BLOCK" I always set QUERY_DATA_SOURCE_NAME to user defined value => STATIC DATA TABLE name
       Set_block_Property('MAIN_BLOCK',QUERY_DATA_SOURCE_NAME,:control.table_name);
       Set_block_Property('MAIN_BLOCK',DML_DATA_TARGET_NAME,:control.table_name);
       -- here I would like to set also MAXIMUM LENGHT for particular column (based on some condition, etc.. correct value I can get from ALL_TAB_COLS dictionary
       SET_ITEM_PROPERTY('MAIN_BLOCK.DESCRIPTION', <<XXXXXXX>>, 300);What should I use instead of "<<XXXXXXX>>" if I want to overwrite MAIN_BLOCK.DESCRIPTION column's maximum length to 300?
    Thanks,
    Tomas

    Hi Magoo, thanks for reply.
    Yes, but then user can get other errors while trying to set description with value longer than in database (for all not extended tables).
    Aby idea how to implement SET_CUSTOM_PROPERTY like mentioned here?
    Oracle Forms - "maximum length" property.
    Thanks,
    Tomas

  • Unable to set property Refresh Completed Items for UWL system

    Hello Experts,
    We are on NetWeaver 7.40 SP2 and UWLJWF version is 1000.7.40.2.0.20130411234700.
    We have configured a system object with system alias SAP_ECC_HumanResources pointing to the backend ECC system.
    I am creating a UWL WebFlowConnector system with this same system alias in the UWL Administration page to fetch ABAP Workflow workitems from the backend and display those in the portal UWL.
    When I try to check the checkbox for the Refresh Completed Items: property and click Save it shows me an error message saying Could not connect to back end SAP_ECC_HumanResources to check if it supports direct custom retrieval feature.
    I have already followed the steps for Prerequisites for Enabling Refresh of Completed Items and Activation in Back-end System mentioned in the link Enabling Refresh of Completed Items but still getting the above error.
    I have also tried restarting the UWL service as given here (UWL) Error while configuring the Refresh of Completed Items Mechanism
    Can anyone give any suggestions what else needs to be checked for this property to work for the UWL system?
    Regards,
    Saurabh
    Message was edited by: Vera Gutbrod

    Hello Experts,
    I have managed to resolve this problem. The RFC Destination configured for UWL WebFlowConnector had some problems and it was not able to ping to the backend system. I got this RFC Destination re-configured and then restarted the UWL service and following this I am now able to set the Refresh Completed Items property for the UWL WebFlowConnector system.
    However now when I am trying to set a value of 30 seconds in the Delta Pull Channel Refresh Period (in Seconds): property and saving the change, I am getting a warning message The backend of system SAP_ECC_HumanResources is not configured for optimized delta pull.
    How do I go about setting this value for the delta pull refresh?
    Regards,
    Saurabh

  • Setting Hidden property for a Resource Object

    Hi,
    I am trying to set the hidden property for a folder by this code.
    // ICollection coll defined
    IPropertyName propName = new PropertyName("http://sapportals.com/xmlns/cm", "hidden");
    IProperty prop = coll.getProperty(propName);
    IMutableProperty mutProp = prop.getMutable();
    mutProp.setBooleanValue(true);
    coll.setProperty(prop);
    This is not working, any idea what would have gone wrong ?
    Thanks,
    Sam

    Hi,
    I am not getting any excpetion...
    i have log messages before setting the propert and after setting the property...
    so if i am trying to set from false to true......it is not getting set to true but remaining as false....
    i am trying this with /documents repository.
    Can any body give some sample snippet for setting the hidden property / is there anything else i need to do to complete the setting.
    Regards,
    Satish

  • SMLets Beta 3: Unable to set DateTime for DateTime property using SetSCSMObject

    Hello,
    I need to set dateTime for my custom fields for Incidents. I wanted to use Set-SCSMObject for that. But it doesn't work. For other field types it is working fine.
    May be I'm doing something wrong, but I don't see it. It would be great if anybody is able to help.
    This is the command I'm trying to run: (I used CreatedDate for my tests)
    Get-SCSMObject -Class (Get-SCSMClass System.WorkItem.Incident$) -Filter "ID -eq IR495" | Set-SCSMObje
    ct -Property CreatedDate -Value [datetime]"06/08/2011 14:08"
    Set-SCSMObject : String was not recognized as a valid DateTime.
    At line:1 char:104
    + Get-SCSMObject -Class (Get-SCSMClass System.WorkItem.Incident$) -Filter "ID -eq IR495" | Set-SCSMObject <<<<  -Proper
    ty CreatedDate -Value [datetime]"06/08/2011 14:08"
        + CategoryInfo          : ObjectNotFound: ([datetime]06/08/2011 14:08:String) [Set-SCSMObject], FormatException
        + FullyQualifiedErrorId : Could not assign date ,SMLets.SetSMObjectCommand
    Thank you
    Oliver

    Hello,
    You must temporary change locale in your script.
    In begin of script you must change locale in "En-Us":
    $OldCulture = [System.Threading.Thread]::CurrentThread.CurrentCulture
    $OldUICulture = [System.Threading.Thread]::CurrentThread.CurrentUICulture
    $culture = New-Object System.Globalization.CultureInfo("en-US")
    [System.Threading.Thread]::CurrentThread.CurrentCulture = $culture
    [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
    And return locale after script body:
    [System.Threading.Thread]::CurrentThread.CurrentCulture = $OldCulture
    [System.Threading.Thread]::CurrentThread.CurrentUICulture = $OldUICulture
    This has solved my issue.  You have no idea how much this has made my day.
    I'm in Australia trying to update/create/close incidents to a canadian server.  Nothing else has worked so far, except this.  The rest of the support/forums on this issue have been crap to say the least.
    It would be nice if MS mainlined the SMLets into SCSM and start actually making their product useful

  • Error: property is not set correctly for User Defined Fields.

    Hi Gurus,
    I am trying to define a new field Department of type Lookup. For this i have created a new field in user defined fields. But when i click on create user in web console it give me "property is not set correctly for User Defined Fields."
    I created a lookup field for department , but looks like i have to some kind of mapping. How can it be done?
    Thanks,
    sat

    Hi Kevin,
    I couldnt get it done. This is what I had done so far.
    Created Lookup.Users.Dept ( with code code=23 & decode=treasury)
    Added two field in xlwebadmin.properties & xlwebadmin_en.properties
    lookupfield.header.users.deptcode=Department code
    lookupfield.header.users.deptname=Department name
    In my lookfield properties in
    column caption=Department code,Department name
    Column query= Not sure what to give? here
    Thanks,
    sat

Maybe you are looking for

  • "Error in data selection" while loading

    hi, while loading data from one ODS to another(datamart) I, after extraction of some data packages successfully I m getting an error:"Error in data selection" i saw its help messages were 1)error 7 when sending an idoc 2)sql error in accessing table

  • Problem in opening new tab

    Problem in opening Mozila firefox tab. when we open mozila firefox blank page open and when we open next tab, the new tab open with "search.babylon.com/?affID=112060&tt=321- i have tried lot to stop this automatically open search of babylon but not d

  • No apply button in import settings

    unable to apply mp3 settings from the advanced page, tryed reloading 7.4.3 still having same problem cannot switch from acc to mp3

  • IPhone4 sound's not working?

    I have owned an iPhone4 for about 3 weeks and the external speaker no longer seems to work. I am unable to play music out loud, my ringtone doesn't ring, my message alert doesn't sound, and all other functions associated with the speakers do not work

  • My Broadband speed

    Hi , recently my download speeds dropped from avg 600kbps to 18.3kbps. But now my speed tests are showing 333kbps which is a huge drop from 6500kbps, I phoned bt India today and had my line tested the result shows that I am receiving Meg. Ok so there