Changing custom AWT component to Swing component

I created my own AWT component. I'd like to change it to Swing component.
Does anyone know how to change or create a custom Swing component?
Please also provide some framework to develop a custom Swing component.

First try to know the difference between SWING & AWT. You can either adopt to SWING or AWT but be specific of what you want to do !
If you like to migrate from AWT to SWING ,then make the necessary changes in your coding.(ie, re frame things like , Frame to JFrame , Button to JButton ,JTextField to JTextField etc..)
For creating custom components ,say a component called MyLabel and you should design a class which extends JLabel and do whatever you like...
eg import javax.swing.*;
public class MyLabel extends JLabel
  MyLabel(String title)
     this.setTitle(title);
     this.setBackground(Color.white);
     this.setForeground(Color.blue);
}For more details go to java tutorials.

Similar Messages

  • Changing AWT components to Swing components

    I'm having a little trouble changing some AWT components to Swing components. I received an error message when I tried to run my program. I looked up the component in the java docs. But, I did not see the option the error was talking about. The error and the area of code is listed below. Thank you for any help you can provide.
    Error message:
    Exception in thread "main" java.lang.Error: Do not use P5AWT.setLayout() use P5A
    WT.getContentPane().setLayout() instead
    at javax.swing.JFrame.createRootPaneException(JFrame.java:446)
    at javax.swing.JFrame.setLayout(JFrame.java:512)
    at P5AWT.<init>(P5AWT.java:56)
    at P5AWT.main(P5AWT.java:133)
    Press any key to continue . . .
    Code:
    JPanel p3 = new JPanel();
    p3.setLayout(new FlowLayout(FlowLayout.CENTER));
    ta = new JTextArea(20, 60);
    p3.add(ta);
    setLayout(new FlowLayout(FlowLayout.CENTER));
    add(p3);

    you need to change the line...
    setLayout(new FlowLayout(FlowLayout.CENTER)); to
    getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER));

  • Custom Pipeline Component stopped changing input filename

    Hi
    In my project, I have a custom pipeline component to change the input file name. I use it in the receive pipeline decode stage. It was working initially when I had only a receive pipeline and custom pipeline component in my solution. later I introduced
    two schemas, an orchestration, map and a send pipeline. The rename is not working anymore. Please help.
    receive adapter: FILE
    send adapter: FTP
    Custom pipeline component: (File Name Setter)
    Receive pipeline:
      decode: custom pipeline component to rename the filename
      disassemble: flatfile disassembler conecting to a document schema
    Map:
      Schema 1 to Schema 2 (transforms from Windows to Unix format)
    Orchestration:
      receive message
      transform using map above
      send message
      Exception Handler
    Send pipeline:
      FlatFile assembler
    manibest

    May be its not working now, because in the orchestration which you have added,
     you’re constructing a new message from the received message and the context properties from the Received message is not copied across to the newly constructed message. So when you use “%SourceFileName%” macro in the send port,
    the ReceivedFileName context property is missing in the newly constructed message which is sent out.
    So in your Orchestration, while constructing (in MessageAssignment shape) the outbound message from the Received message, copy the context property of the Received message to the newly constructed message. Something like this
    //This line copies all the context properties from received message to the outputted message
    msgOutputted (*)= msgReceived(*)
    //or
    //This line just copies the receive file name context property from received message to the outputted message
    msgOutputted (FILE.ReceivedFileName)= msgReceived (FILE.ReceivedFileName).
    If you’re not using the Orchestration or constructing the new message (even in map), then just add the schemas/orchestration or any pipeline would not affect the ReceiveFileName code. May be in this case, debug the pipeline and also check whether the outputted
    message has ReceivedFileName in its context property.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Add change event to a custom MXML component

    I am building an MXML project in Flash Builder 4.5
    I have a custom MXML component that contains a TextInput field. I want the custom component to have a change event that triggers a function in the main application.
    I created a test project to try and solve this.  At the moment, it appears to trigger an event once and then stops.  Please take a look and let me know where I am going wrong. Many thanks.
    customComponent.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
               width="40" height="20">
        <mx:Script>
        <![CDATA[
            [Bindable]
            public var value:Number;
            protected function inputBox_clickHandler(event:KeyboardEvent):void
                if (event.keyCode == 38 ) {
                    keyUp();
                if (event.keyCode == 40 ) {
                    keyDown();
            protected function keyUp():void
                value = value++;
                dispatchEvent(new Event('change'))
            protected function keyDown():void
                value = value--;
                dispatchEvent(new Event('change'))
        ]]>
    </mx:Script>
    <mx:Metadata>
        [Event(name="change", type="flash.events.Event")]
    </mx:Metadata>
    <mx:TextInput id="inputBox" x="0" y="0" width="40" height="20"
                  text="{value}"
                  keyDown="inputBox_clickHandler(event)"
                  change="dispatchEvent(new Event('change'))"
                  />
    </mx:Canvas>
    main.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                xmlns:CustomComponents="CustomComponents.*"
                minWidth="955" minHeight="600" layout="absolute">
    <mx:Script>
        <![CDATA[
            private function changeTestLabel():void
                testLabel.text = String(myComponent.value);
        ]]>
    </mx:Script>
    <CustomComponents:customComponent x="180" y="183"
        id="myComponent" value="0"
        change="changeTestLabel()">
    </CustomComponents:customComponent>
    <mx:Label id="testLabel" x="165" y="206" text="Test label"/>
    </mx:Application>

    I have found the solution to this...
    The clue was that it worked the first time a change was made, changing the value to the default '0'.
    The problem was that the var value is type Number and the inputBox.text is type String.
    I therefore added the following function:
      protected function textChange():void
       value = Number(inputBox.text);
       dispatchEvent(new Event('change'))
    I also changed the  change="dispatchEvent(new Event('change'))"  property to
       valueCommit="textChange()"
    ... and that fixed it..
    Thanks to all those who took the trouble to look at this

  • How to get change a GUI component from another class?

    Hi there,
    I'm currently trying to change a GUI component in my 'Application' class from my 'Dice' class.
    So the Application class sets up some GUI including a JLabel that initially displays "Change".
    The 'Dice' class contains the ActionPerformed() method for when the 'Change' button (made from Application class) is clicked.
    And it returns an 'int' between 1 and 6.
    Now I want to set this number back int he JLabel from the Application class.
    APPLICATION CLASS
    import javax.swing.*;
    import java.awt.*;
    import java.util.Random;
    import java.awt.event.*;
    public class Application extends JFrame implements ActionListener{
         public JPanel rollDicePanel = new JPanel();
         public JLabel dice = new JLabel("Loser");
         public Container contentPane = getContentPane();
         public JButton button = new JButton("Change");
         public Dice diceClass = new Dice();
         public Application() {}
         public static void main(String[] args)
              Application application = new Application();
              application.addGUIComponents();
         public void addGUIComponents()
              contentPane.setLayout(new BorderLayout());
              rollDicePanel.add(dice);
            button.addActionListener(diceClass);
            contentPane.add(rollDicePanel, BorderLayout.SOUTH);
            contentPane.add(button,BorderLayout.NORTH);
              this.setSize(460, 655);
              this.setVisible(true);
              this.setResizable(false);
         public void changeDice()
              dice.setText("Hello");
         public void actionPerformed(ActionEvent e) {}
    }DICE
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Dice implements ActionListener
         public Dice() {}
         public void actionPerformed(ActionEvent e)
              //super.actionPerformed(e);
              String event = e.getActionCommand();
              if(event.equals("Change"))
                   System.out.println("Will be about to change the 'dice' label");
                   Application application = new Application();
                   application.dice.setText("Hello");
    }

    It's all about references, baby. The Dice object needs a way to communicate with the Application object, and so Dice needs a reference to Application. There are many ways to pass this. In my example I pass the application object directly to Dice, but a better way would use interfaces and some indirection. Look up the Observer pattern for a better way to do this that scales much better than my brute-force approach.
    import javax.swing.*;
    import java.awt.*;
    public class Application extends JFrame // *** implements ActionListener
        // *** make all of these fields private ***
        private JPanel rollDicePanel = new JPanel();
        private JLabel dice = new JLabel("Loser");
        private Container contentPane = getContentPane();
        private JButton button = new JButton("Change");
        // *** pass a reference to your application ("this")
        // *** to your Dice object:
        private Dice diceClass = new Dice(this);
        public Application()
        public static void main(String[] args)
            Application application = new Application();
            application.addGUIComponents();
        public void addGUIComponents()
            contentPane.setLayout(new BorderLayout());
            rollDicePanel.add(dice);
            button.addActionListener(diceClass);
            contentPane.add(rollDicePanel, BorderLayout.SOUTH);
            contentPane.add(button, BorderLayout.NORTH);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setPreferredSize(new Dimension(460, 655));
            pack();
            setLocationRelativeTo(null);
            setVisible(true);
            setResizable(false);
        // *** I'm not sure what this is supposed to be doing, so I commented it out.
        //public void changeDice()
            //dice.setText("Hello");
        // *** ditto.  I strongly dislike making a GUI class implement ActionListeenr
        //public void actionPerformed(ActionEvent e)
        // *** here's the public method that the Dice object calls
        public void setTextDiceLabel(String text)
            dice.setText(text);
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Dice implements ActionListener
        // *** have a variable that holds a reference to your application object
        private Application application;
        private boolean hello = true;
        public Dice(Application application)
            // *** get that reference via a constructor parameter (one way to do this)
            this.application = application;
        public void actionPerformed(ActionEvent e)
            String event = e.getActionCommand();
            if (event.equals("Change"))
                System.out.println("Will be about to change the 'dice' label");
                if (hello)
                    // *** call the application's public method
                    application.setTextDiceLabel("Hello");
                else
                    application.setTextDiceLabel("Goodbye");
                hello = !hello;
                //Application application = new Application();
                //application.dice.setText("Hello");
    }

  • JSplitPane with AWT component

    Hi all,
    I have a problem with JSplitPane, I use it with JPanel as right component and an AWT component as left Component, so when I move The Divider of the JSplitPane it hides under the AWT component not on the top of it.
    I know that result from problem of heavy weight component and light weight component .. but my question is there any work arround I can do to make the Divider appear on the top of the AWT component??
    Thanks,

    You've been given an idea: DO NOT MIX AWT and SWING Components.
    Why do you need to mix them? What is the AWT component?
    If it's something you wrote yourself, then you can change it. If it's not, decompile it and change it. Anyone who can't provide a Swing version of their stuff at this point is out of business and shouldn't care what you do with it.
    If it's some Canvas subclass, you can make it a Swing component by changing 2 lines: extends JPanel instead of Canvas and change paint() to paintComponent().
    is there any work arround I can do to make the Divider appear on the
    top of the AWT component??definitely not, unless you make the divider a heavyweight component somehow.

  • Custom pipeline component creates the folder name to archive messages

    Hi 
    I have an requirement that a BizTalk application is receiving untyped messages and at the receive location the pipeline have to archive the incoming message with the specifications:
    suppose I have an xml like
          <PurchaseOrder>
            <OrderId>1001</OrderId>
            <OrderSource>XYZ</OrderSource>
            <Code>O01</Code>
          </PartyType>
    In the pipeline component it has to read this xml and have to use OrderSource value 'XYZ' to create a archival folder and the message have to archive with file name '%MessageId%'
    It has to be done by writing custom pipeline component where I am not familiar with c# coding, Can anyone please how to implement mechanism.
    Thanks In Advance
    Regards
    Arun
    ArunReddy

    Hi Arun,
    Use
    BizTalk Server Pipeline Component Wizard to create a decode pipeline component for receive. Install this wizard. This shall help you to create the template project for your pipeline component stage.
    Use the following code in the Execute method of the pipeline component code. This code archives the file based with name of the file name received.
    public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
    MemoryStream tmpStream = new MemoryStream();
    try
    string strReceivedFilename = null;
    DateTime d = DateTime.Now;
    try
    //Get the file name
    strReceivedFilename = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties").ToString();
    if (strReceivedFilename.Contains("\\"))
    strReceivedFilename = strReceivedFilename.Substring(strReceivedFilename.LastIndexOf("\\") + 1, strReceivedFilename.Length - strReceivedFilename.LastIndexOf("\\") - 1);
    catch
    strReceivedFilename = System.Guid.NewGuid().ToString();
    originalStream = inmsg.BodyPart.GetOriginalDataStream();
    int readCount;
    byte[] buffer = new byte[1024];
    // Copy the entire stream into a tmpStream, so that it can be seakable.
    while ((readCount = originalStream.Read(buffer, 0, 1024)) > 0)
    tmpStream.Write(buffer, 0, readCount);
    tmpStream.Seek(0, SeekOrigin.Begin);
    //ToDo for you..
    //Access the receive message content using standard XPathReader to access values of OrderSource and construct file pathAccess the receive message content using standard XPathReader to acceess values of OrderSource and contruct the file path
    string strFilePath = //Hold the value of the file path with the value of OrderSource
    string strCurrentTime = d.ToString("HH_mm_ss.ffffff");
    strFilePath += "\\" + strReceivedFilename + "_";
    FileStream fileStream = null;
    try
    System.Threading.Thread.Sleep(1);
    fileStream = new FileStream(strFilePath + strCurrentTime + ".dat", FileMode.CreateNew);
    catch (System.IO.IOException e)
    // Handle the exception, it must be 'File already exists error'
    // Wait for 10ms, change the file name and try creating the file again
    // If the second 'file create' also fails, it must be a genuine error, it'll be thrown to BTS engine
    System.Threading.Thread.Sleep(10);
    strCurrentTime = d.ToString("HH_mm_ss.ffffff"); // get current time again
    string dtcurrentTime = DateTime.Now.ToString("yyyy-MM-ddHH_mm_ss.ffffff");
    fileStream = new FileStream(strFilePath + strCurrentTime + ".dat", FileMode.CreateNew);
    while ((readCount = tmpStream.Read(buffer, 0, 1024)) > 0)
    fileStream.Write(buffer, 0, readCount);
    if (fileStream != null)
    fileStream.Close();
    fileStream.Dispose();
    if (originalStream.CanSeek)
    originalStream.Seek(0, SeekOrigin.Begin);
    else
    ReadOnlySeekableStream seekableStream = new ReadOnlySeekableStream(originalStream);
    seekableStream.Position = 0;
    inmsg.BodyPart.Data = seekableStream;
    tmpStream.Dispose();
    catch (Exception ex)
    System.Diagnostics.EventLog.WriteEntry("Archive Pipeline Error", string.Format("MessageArchiver failed: {0}", ex.Message));
    finally
    if (tmpStream != null)
    tmpStream.Flush();
    tmpStream.Close();
    if (originalStream.CanSeek)
    originalStream.Seek(0, SeekOrigin.Begin);
    return inmsg;
    In the above code, you have do a section of code which will access the receive message content using standard XPathReader to access values of OrderSource and construct the file path. I have
    commented the place where you have to do the same. You can read the XPathReader about here..http://blogs.msdn.com/b/momalek/archive/2011/12/21/streamed-xpath-extraction-using-hidden-biztalk-class-xpathreader.aspx
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to migrate Stellent 7.5.1 custom layout component to OCS 10gR3

    Hi,
    I am in the process of upgrading stellent 7.5.1 to OCS 10gR3. There is a custom layout component in 7.5.1 wanted to find out how can I migrate the layout component. As probably there are changes in 10gR3 so want to find out how to migrate the custom layout component and any changes required before migrating to 10gR3.
    Thanks.

    Hi
    am putting out the steps needed for upgrading an existing CS instance from version 7.5.1 to 10gR3. Its basically a 2 step process where we use Configuration Migration Utility to migrate the CS structure and Archiver to migrate the existing contents. The steps are as follows :
    1. Install a new CS 10gR3 instance on the server and configure it as per the install guide.
    2. Verify that the basic functionalities for the newly installed instance is working fine by doing some simple tests like checkin ,checkout , update etc. Then upgrade the CS to the latest patchset level which can be downloaded from http://updates.oracle.com/download/6907073.html.
    3. Install the latest version of Configuration Migration Utility component (which is found in the same uprgade patch set ) on both the 10gR3 CS (target) instance and the 7.5.1 CS (source).Enable them on both the CS instances and restart the same.
    4. Run the Configuration Migration Utility on the source CS and download the CMU Bundle created on it.
    5. Upload the CMU Bundle created in previous step to the Target CS and import the configurations from that.Verify that the CMU process is completed successfully on the Target CS instance.
    6. Create a new archiver instance on the Source CS and export all the contents in that.
    7. Open the Archiver Applet for the target CS instance and then Point the collections to the collections.hda of the source CS instance so that we can import the contents. Start the Import process on target server.
    8. Once the CMU and Archiver Process are completed then your 10gR3 CS would be an exact replica of the Source 7.5.1 Instance.
    You may also go through System Migration Guide to get more understanding on the Migration / Upgrade processes.
    Hope this helps
    Thanks
    Srinath

  • Foreground Color of a Disabled AWT Component

    How do you change the foreground color of a disabled AWT component?

    You would have to write your own renderer that checkes to see if the component is enabled or disabled. Your renderer would then draw the component as you like in both of those states.

  • Custom itemRenderer component based on cell value: error 1009

    I'm working on an item renderer for a dataGrid that has different states depending on the cell and row values.
    The cell value is a toggle (true or null), and sets whether content should be shown in the cell or not
    The row properties determine what is shown when the cell value is true.
    The dataGrid dataProvider is populated based on user id input.
    I created the itemRenderer as a custom actionscript component, closely following this example:
    360Flex Sample: Implementing IDropInListItemRenderer to create a reusable itemRenderer
    However, my component results in Error #1009 (Cannot access a property or method of a null object reference) when a user id is submitted.
    package components
         import mx.containers.VBox;
         import mx.controls.*;     import mx.controls.dataGridClasses.DataGridListData;
         import mx.controls.listClasses.BaseListData;
         import mx.core.*;
         public class toggleCellRenderer extends VBox
              public function ToggleCellRenderer()
              {super();}
              private var _listData:BaseListData;   
                   private var cellState:String;
                   private var cellIcon:Image;
                   private var imagePath:String;
                   private var imageHeight:int;
                   private var qty:String = data.qtyPerTime;
                   private var typ:String = data.type;
              public function get listData():BaseListData
                   {return _listData;}
              public function set listData(value:BaseListData):void
                   {_listData = value;}
              override public function set data(value:Object):void {
                   super.data = value;
                   if (value != null)
                   //errors on next line: Error #1009: Cannot access a property or method of a null object reference.
                   {cellState = value[DataGridListData(_listData).dataField]}
              override protected function createChildren():void {
                   removeAllChildren();
                   if(cellState=='true'){
                        cellIcon = new Image();
                        addChild(cellIcon);
                   //there is another state here that adds another child...
              //next overrides commitProperties()...
    There are no errors if I don't use an itemRenderer--the cells correctly toggle between "true" and empty when clicked.
    I also tried a simple itemRenderer component that disregards the cell value and shows in image based off row data--this works fine without errors or crashing. But I need to tie it to the cell value!
    I have very limited experience programming, in Flex or any other language. Any help would be appreciated.

    Your assumption that the xml file either loads with "true" or nothing  is right.
    After modifying the code to the following, I don't get the error, but it's still not reading the cell value correctly.
    package components
         import mx.containers.VBox;
         import mx.controls.*;   
         import mx.controls.dataGridClasses.DataGridListData;
         import mx.controls.listClasses.BaseListData;
         import mx.core.*;
         public class toggleCellRenderer extends VBox
              public function ToggleCellRenderer()
               super();
              private var _listData:BaseListData;   
              private var cellState:Boolean;
              private var cellIcon:Image;
              private var imagePath:String;
              private var imageHeight:int;
              private var qty:String;
              private var typ:String;
               public function get listData():BaseListData
                 return _listData;
              override public function set data(value:Object):void {
                   cellState = false;
                   if (listData && listData is DataGridListData && DataGridListData(listData).dataField != null){
                       super.data = value;
                       if (value[DataGridListData(this.listData).dataField] == "true"){
                           cellState = true;
              override protected function createChildren():void {
                   removeAllChildren();
                   if(cellState==true){
                        cellIcon = new Image();
                        addChild(cellIcon);
                   //there is another state here that adds another child...
              //next overrides commitProperties()...
    - didn't set the value of qty or typ in the variable declarations (error 1009 by this too--I removed this before but wanted to point out in case its useful)
    - added back in the get listData() function so I could use the listData
    - changed the null check
    All cells are still returning cellState = false when some are set to true, even if I comment out [if (value[DataGridListData(this.listData).dataField] == "true")] and just have it look for non-null data. That shouldn't make a difference anyway, but it confirms that all cells are returning null value.
    Swapping out the first if statement in set data with different variables results in the following:
    [if (listData != null)]  all cells return null (cellState=false for all)
    both [if (value != null)] and  [if (DataGridListData != null)]  results in error 1009 on a line following the if, so I assume they return non-null values.
    All rows have data, just not all fields in all rows, so shouldn't listData be non-null?  Could it be that the xml file hasn't fully loaded before the itemRenderer kicks in?
    I also realized  I had removed the item renderer from many of the columns for testing, and since some columns are hidden by default only one column in the view was using the itemRenderer--hence the single alert per row I was worried about earlier.
    Thanks for your help so far.

  • Steps to create a custom Window component?

    What steps do I need to take to create a custom Window component? My approach now results in the component being uneditable in design view. What I do is simply select "New > MXML component", base it on spark.components.Window and supply a filename. I tried with a Panel component and that works fine.

    Hi,
    Step by Step creation of SAP Payroll Funcitons:
    1) Follow the menu path
       Human Resources>>Time Management>>Administration>>Tools>>Funtions/Operations
       or transaction PE04. Enter a four digit name for e.g ZIABC, and press the create
       button, enter the description. On creation the system proposes the name of
       the routine use it, or enter a name of your choice by selecting the option 'Self-defined'.
    2) During the execution of payroll some tables are filled with wage types and there amounts
       to make these tables available to your routine enter the name of the table for e.g (RT or
       CRT) in the input parameters, and to make the changes done to the data in the tables
       avaiable to the payroll enter the name of the table in the Output parameters as well.
       Input Parameters
       Ctry                                         Num     Object Name
       99                                           1       RT
       99                                           2       CRT
      and same shall be done in the Output Paramters if required.
    3) Create an include in the program PCBURZ990 (using Transaction:
    SE38), in which create a subroutine with the name supplied by SAP or the
    name selected by you during Funtion creation,
    in our case, it is FUZIABC.
    Note: The program PCBURZ990 is in SAP Namespace, so an Access Key
    will be required before you can proceed. But it will not be overwritten during any upgrade.
    *Example of the subroutine
       FORM FUZIABC.
    *enter the code
       ENDFORM.
    4) After this activate the program the Funtion and add it in the schema used for payroll processing.
    Reward points if helpful.
    Regards,
    Manoj.

  • JMenu with AWT component

    dear friends;
    i have added menu bar in Jframe which is containes menues.
    AWT component is added the the same frame .
    problem is:
    menues are overlapping with awt component while i clicked the menu bar.
    dear friends help me immediately.
    thank u

    dear friends help me immediately.It's your own fault or combining Swing and AWT widgets. You're not supposed to do that, as it can lead to strange effects. Like this one.

  • Change Tracking Webdynpro Component Error

    I am using CE 7.11 SP04 with MDM 7.1 SP04.
    Installed all the 2 webdynpro components.
    Configured change tracking on MDM, also configured change tracking iView on CE.
    Issue1:
    When I run change tracking as an iView through Portal , the logoff button on change tracking iView throughs null pointer exception.
    Issue2:
    I am consuming the change tracking webdynpro component on my custom webdynpro wrapper.
    I have added the following code to pass the id and lookup table as per the how tto guide to consume MDM webdynpro's.
    RepositorySchemaEx schema = MetadataManager.getInstance().getRepositorySchema(wdContext.currentContextElement().getUserSessionContext());
    GetPermanentIdFromRecordIdCommand cmd = new GetPermanentIdFromRecordIdCommand(
    wdContext.currentContextElement().getUserSessionContext());
    TableId tableId = schema.getTableId(ASSIGNMENT);
    cmd.setRecordIds(ids);
    cmd.setTableId(tableId);
    cmd.execute();
    int[] permIds = cmd.getPermanentIds();
    if (permIds != null && permIds.length > 0) {
    int permId = permIds[0];
    wdThis.wdGetMDMChangeTrackerInterface().setPermanentId(permId); // until here it works fine
    wdThis.wdGetMDMChangeTrackerInterface().selectLookupTable(""+tableId.getIdValue()); // it throws null pointer exception here in SAP delivered change tracking component. Not sure whether it is SAP bug. Has anyone faced same issue?
    Any help is appreciated!}
    Here is the error
    java.lang.NullPointerException: while trying to invoke the method com.sap.mdm.ChangeTrackingBean.setLookupTableId(int) of an object loaded from field com.sap.mdm.MdmChangeTrackerComp._tracker of an object loaded from local variable 'this'
        at com.sap.mdm.MdmChangeTrackerComp.selectLookupTable(MdmChangeTrackerComp.java:812)
        at com.sap.mdm.wdp.InternalMdmChangeTrackerComp.selectLookupTable(InternalMdmChangeTrackerComp.java:333)
        at com.sap.mdm.MdmChangeTrackerCompInterface.selectLookupTable(MdmChangeTrackerCompInterface.java:140)
        at com.sap.mdm.wdp.InternalMdmChangeTrackerCompInterface.wdInvokeMethod(InternalMdmChangeTrackerCompInterface.java:148)
        at com.sap.tc.webdynpro.progmodel.generation.ExternalControllerPI$ExternalInterfaceInvocationHandler.invoke(ExternalControllerPI.java:339)
    Thanks

    JDBC Alias should be provided as the Application Parameter for webdynpro not in the URL.

  • An Awt Component Identifying Its display Status

    I am writing a custom Component (one extending java.awt.Component) for a game which would be running under Applet. Is it possible for a Component to identify if the Applet window (the browser) is put into the background, minimised or hidden? The Component.isShowing() call seems to return true regardless of the status of the browser window. I don't want to rely on Applet.start()/Applet.stop() and want each Component to be able to do this. Is it possible?
    Edited by: alec_lee_yl on Jan 28, 2010 5:39 PM

    If you use a fixed-width font then you will be able to pad the strings with the right number of blanks and get your columns to line up.

  • Synchronization on awt component

    I was facing some deadlock issues on the awt component and trying to resolve the problems. I have searched using google and also in this forum but not much information that i can found. Anyone have some good article on sychonization on awt component ?
    By the way, I have some question on the synchronization issues on awt component. Questions as below :
    1. we should only synchronize out component by synchronized on getTreeLock() ? From what i know is that anything to do which layout and changing the structure of tree of awt component should synchronize the tree lock. Am i correct on this ?
    2. since paint() method only being execute by AWT-Thread (correct ?), the paint() method shouldn't be synchonized ? If I was refering to a lot of informations in my paint method when doing painting, how i can make sure those informations/data was synchronized ?
    3. It was recommended that any layout process of component should be done by AWT-Thread (Event Dispatching Thread) ? Currently my product have to compatible with jre 1.1. which invokeLater() only introduced in java 1.2. How can I layout my component in AWT-Thread ?

    Hi!
    Sorry to read that. Unfortunately, Firefox Sync is not a back up service and the information is stored in the servers only temporarily so the rest of your devices can get the information.

Maybe you are looking for

  • How to use LOOP(Until) step in a Workflow

    Hi, How to use LOOP(Until) step in a Workflow? What are the steps involved in using the step LOOP(Until).

  • Exported jpegs can't be copied/pasted

    Hi, I'm working on CS6, OSX, I exported a logo to jpeg form Illustrator, when I open it on the default image preview app and try to copy (cmd+V) it won't let me, the copy option under edit isn't gereyed out but when I use it or press cmd+v a sound te

  • TS1363 need to sync my iphone  and update but it keep freezing my computer up

    i need to up date my phone and sync it but evrytime i try it freezes my computer up i need help

  • SOBJ current setting (oss note 135028, 77430)

    Hi all, I'm working in a ECC6 R/3 system. In according with sap notes 135028 and 77430 I would modify standard current setting for some views used in customizing transaction. Reading note 135028 I follow the indicated solution : "...open the IMG and

  • Generic WSDL vs Specific WSDL

    Hi All, Can you list down the differences between Generic WSDL vs Specific WSDL? When do we need to prefer Generic against Specific or vice versa? Also, following are my concerns on Generic WSDL: If my front end application developed is using Generic