Dispatchevent problem

I am trying to run a basic eventlistener but unable to run, in debugger shows both the init and creationcomplete methods are executed but the showText is  not able to run what might be the reason?
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
               creationComplete="onComplete()"
               initialize="init()">
    <fx:Script>
        <![CDATA[
            public static const callMe="Call_Event";
             public    function onComplete():void{
                dispatchEvent(new Event(callMe,true,false));
           public    function init():void{
                group.addEventListener(callMe,showText);
    public function showText(e:Event):void{
                  rt.visible=true;   
        ]]>
    </fx:Script>
    <s:VGroup id="group">
    <s:RichText 
        id="rt"
        text="Hai"
        visible="false">
    </s:RichText>
    </s:VGroup>
</s:Application>
thanks for reading.

Hi, Your dispatched event is not reaching to 'group' so it is not listening it.
You are dispatching it at the top application level.
So you can listen it at application level by adding listener at application itself rather than on group as this.addEventListener(CALL_ME_EVENT,showText);
or
dispatching event from group container i.e. group.dispatchEvent(new Event(CALL_ME_EVENT,true,false));
I have done it by dispatching event at group level and it works.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               initialize="{init();}"
               creationComplete="{onComplete();}"
               minWidth="955" minHeight="600">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;
            public static const CALL_ME_EVENT:String="Call_Event";
            public function init():void
                group.addEventListener(CALL_ME_EVENT,showText);
            public function onComplete():void
                group.dispatchEvent(new Event(CALL_ME_EVENT,true,false));
            public function showText(e:Event):void
                rt.visible=true; 
                trace("Done.. :)");
        ]]>
    </fx:Script>
    <s:VGroup id="group">
        <s:RichText id="rt"    text="Hai" visible="false"/>
    </s:VGroup>
</s:Application>
Hope it helps you.
Abhinav Sharma

Similar Messages

  • JButton dispatchEvent problem

    Hi,
    I've got JButtons in a JTable which means I have to capture the mouse events and forward them to the button.
    I do this with a mouse listener on the table, and the lines:
    buttonEvent = (MouseEvent)SwingUtilities.convertMouseEvent(table, e, button);
    button.dispatchEvent(buttonEvent);
    System.out.println(buttonEvent);
    table.repaint();where 'e' is the original mouse event. This produces, for example:
    java.awt.event.MouseEvent[MOUSE_CLICKED,(145,167),button=1,modifiers=Button1,clickCount=1]
    on
    javax.swing.JButton[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.5 <snip> text=Delete,defaultCapable=true]but yet nothing happens to the button. Is this a coordinate problem, or am I missing something else, as I don't really know what I'm doing?
    Cheers,
    Rob

    MOUSE_CLICKED,(145,167),Well I'm guessing that you can't just convert the table coordinates and use them as the button coordinates because the button isn't that big.
    An alternative approach might be to use the doClick() method of the button.
    In case that doesn't work, here's something I've been playing with that may help:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableButton3 extends JFrame
         public TableButton3()
              String[] columnNames = {"Date", "String", "Integer", "Decimal", ""};
              Object[][] data =
                   {new Date(), "A", new Integer(1), new Double(5.1), "Delete1"},
                   {new Date(), "B", new Integer(2), new Double(6.2), "Delete2"},
                   {new Date(), "C", new Integer(3), new Double(7.3), "Delete3"},
                   {new Date(), "D", new Integer(4), new Double(8.4), "Delete4"}
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              JTable table = new JTable( model )
                   //  Returning the Class of each column will allow different
                   //  renderers to be used based on Class
                   public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
              //  Create button column
              ButtonColumn buttonColumn = new ButtonColumn(table, 4);
         public static void main(String[] args)
              TableButton3 frame = new TableButton3();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
         class ButtonColumn extends AbstractCellEditor
              implements TableCellRenderer, TableCellEditor, ActionListener
              JTable table;
              JButton renderButton;
              JButton editButton;
              String text;
              public ButtonColumn(JTable table, int column)
                   super();
                   this.table = table;
                   renderButton = new JButton();
                   editButton = new JButton();
                   editButton.setFocusPainted( false );
                   editButton.addActionListener( this );
                   TableColumnModel columnModel = table.getColumnModel();
                   columnModel.getColumn(column).setCellRenderer( this );
                   columnModel.getColumn(column).setCellEditor( this );
              public Component getTableCellRendererComponent(
                   JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
                   if (hasFocus)
                        renderButton.setForeground(table.getForeground());
                         renderButton.setBackground(Color.WHITE);
                   else if (isSelected)
                        renderButton.setForeground(table.getSelectionForeground());
                         renderButton.setBackground(table.getSelectionBackground());
                   else
                        renderButton.setForeground(table.getForeground());
                        renderButton.setBackground(UIManager.getColor("Button.background"));
                   renderButton.setText( (value == null) ? "" : value.toString() );
                   return renderButton;
              public Component getTableCellEditorComponent(
                   JTable table, Object value, boolean isSelected, int row, int column)
                   text = (value == null) ? "" : value.toString();
                   editButton.setText( text );
                   return editButton;
              public Object getCellEditorValue()
                   return text;
              public void actionPerformed(ActionEvent e)
                   fireEditingStopped();
                   System.out.println( "Action: " + e.getActionCommand() );
    }

  • DispatchEvent() problem (bug?)

    Hi all.
    I'm using a glasspane to process all mouse clicks that occur on inert, or 'no-state' components that don't require to be redrawn when they are clicked (ie
    SwingUtilities.getDeepestComponentAt(contentPane, x, y)
    returns a component such as a jpanel or a jlabel), and i'm redirecting all other events using:
    MouseEvent event2 = SwingUtilities.convertMouseEvent(glassPane, event, component);component.dispatchEvent(event2);
    The problem is that the dispatchEvent method doesn't trigger changes in the components' state or GUI that would normally occur if I wasn't using a glasspane: the checkmarks for checkboxes don't appear, comboboxes don't display their menus, textfields don't display a caret, buttons don't click, tabbedpanes don't change tabs, etc.
    I've tried the using component.doClick() and it works fine, but i'm stumped for any component that doesn't extend AbstractButton. I don't feel like adding mouse listeners to all my components (there are over 100 of them!) just to call processMouseEvent (whether or not that would solve my problem) because they don't otherwise need to listen for mouse clicks (validations are processed when an action occurs on an OK button). Do I need to redirect the mouse events in a different way? Is there a command i should add after the dispatchEvent statment?
    I could really use some help. Thanx :)

    Thanx viravan for your input. After trying it out, however, a few problems arose:
    A) Without considering the fact that you're suggestion would lead to a bad archetacture, as you probably know ( ;o) ), that would require that I add a mouse listener to all components just to make the glasspane visible again...and, like i said above, adding mouse listeners to over 100 components that otherwise don't need them is something i'm trying to avoid.
    B) I tested the following method on a single checkbox and it works, the checkmark is drawn, even with a visible glasspane, after recieving the redipatched event:checkbox.addMouseListener(new MouseAdapter()
                public void mouseClicked(MouseEvent event)
                    JCheckBox checkbox = (JCheckBox) event.getSource();
                    checkbox.setSelected(!checkbox.isSelected());
            });So this isn't a matter of whether or not the glasspane is visible.
    C) Adding some code (see below) in the glasspane mouselistener method revealed that the state of the JCheckBox did in fact not change so it's not only a matter of paint, but a matter of changing state.                        System.out.println("State: " + ((JCheckBox) component).isSelected());
                            glassPane.setVisible(false);
                            component.dispatchEvent(event2);
                            System.out.println("State: " + ((JCheckBox) component).isSelected());The print commands return "State: false" both before and after the dispatchEvent command.

  • DispatchEvent problem between Classes

    So, what I am trying to do is to dispatchEvent(new Event("gameOver") from my score.as class.
    That "gameOver" event is supposed to be picked up with "score.addEventListener("gameOver", lostGame, false, 32);" in my main-stage class Engine.as, and in my ships class: Ship.as.
    The problem is that it doesn't seem that my Ship.as refreshes the score.as data, and the event is only executed if I do the scorecheck when the score = 0, so the events will dispatch at start.
    That is the only time my Ship.as picks up the event. If I set it to be for example 100, it doesn't pick it up.
    Any idea on what to do? Thank you on advance!
    (If there is something someone doesn't understand, I will provide script/code)

    Hi,
    I can see that the problem is not dispatching the event (correct me if I'm wrong).
    Do you instantiate score on both Engine.as and Ship.as?
    If you do then you have two separate scores, independent from one another. Make some traces to see what's happening.
    If that's the case you have to instantiate only one time (in Engine.as, which I suppose it's your main class), and then have the Ship.as to listen to that instance, or have the Engine class send the value to Ship when it changes.
    Hope it helps.

  • Controlling a Movie Clip on the Main Timeline from a loaded SWF?

    Is it possible to control a MovieClip on the main timelne from another loaded clip?
    I see posts that control loaded clips, but most are all from the loader in the main timeline.  I have a moviclip on the main timeline that I want to make visible or invisible depending on what keyframe is playing in another loaded swf.
    If I try to call the movieClip from the loaded SWF I get "error #1119.  Access of possibly undefined property...." because it doesn't exist in the loaded SWF, just the main timeline. 
    The old AS2 way just used "_root".  Since "_root" doesn't exist any more, how do you control items on the main TimeLine from a loaded SWF?

    I am not clear what you mean because you are saying you are trying to target a movieclip that does not exist where you are trying to target it.
    Try using a trace to see what you are targeting when you you target the MovieClip(parent.parent)....
    trace(MovieClip(parent.parent));
    The other approach I mentioned earlier is the more OOP-correct approach if you would rather try that way.  Here's a rough outline of it...
    AS3 - Dispatch Event
    http://forums.adobe.com/thread/470135?tstart=120
    Example:
    Add something to trigger the event in the child (your loaded swf):
    dispatchEvent(new Event("eventTriggered")); (
    if dispatchEvent problem, see: http://www.kirupa.com/forum/showthread.php?p=1899603#post1899603)
    In your loading/parent swf, listen for the complete event on the Loader.contentLoaderInfo.  In the complete event handler, add a listener for the event on the loaded swf.
    // event handler triggered when external swf is loaded
    function loaderCompleteHandler(event:Event) {
        MovieClip(event.currentTarget.content).addEventListener("eventTriggered", eventHandler);
    function eventHandler(event:Event):void {
        trace("event dispatched in loaded swf");
       // this is where your main file can set the visible property of your movieclip

  • Loading two swfs and playing them sequentially

    Hello Team,
               I have searched, but can't seem to find an answer to my question.  I'm working in Flash cs6 on Windows platform. I do not understand how to load two external swf files into another swf file(Main swf) and have them play sequentially. I certain that this task is extremely small to a lot of members of this forum, but if someone could be so kind to assist me with this inquiry I will be over-joyed.
    I am able to load one swf with the following code:
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swf/gallery.swf");
    loader.load(defaultSWF);
    addChild(loader);

    AS3 - Dispatch Event
    Example:
    Add something to trigger the event in the child:
    dispatchEvent(new Event("eventTriggered"));
    (if dispatchEvent problem, see: http://www.kirupa.com/forum/showthread.php?p=1899603#post1899603)
    The listener for this event has to be added to the main file AFTER the external file has been loaded.  In your loading/parent swf, listen for the complete event on the Loader.contentLoaderInfo. 
    yourLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderCompleteHandler);
    In the complete event handler, add a listener for the event on the loaded swf.
    // event handler triggered when external swf is loaded
    function loaderCompleteHandler(event:Event) {
        MovieClip(event.currentTarget.content).addEventListener("eventTriggered", eventHandler);
    Then just create the event handler for the dispatched event listener that was created in the loaderCompleteHandler function.
    function eventHandler(event:Event):void {
        trace("event dispatched in loaded swf");
        // load/play your second swf now

  • Switching betwwen swf files

    I have an swf file, called preloader.
    It' s used as a preloader and as a menu container.
    It has three buttons(this is the menu).
    When I click a button, it loads another sfw (a game):
    var request:URLRequest = new URLRequest(chosenGame);
    var _loader:Loader = new Loader();
    _loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
    _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
    _loader.load(request);
    In the game, I have a button, 'Quit'.
    I want, when clicked, to get me back to the preloader swf.
    Would it be correct to do it the same way?
    var request:URLRequest = new URLRequest(preloader);
    var _loader:Loader = new Loader();
    _loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
    _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
    _loader.load(request);
    Or the preloader swf allready exists (as it was never unloaded), so it should not be loaded again?

    If the preloader is supposed to be the main file that controls the rest of the game as it unfolds then an event listener should be assigned to the game file as soon as it is completely loaded (in your  onLoaded fnction).  The event handler for that event listener will process the code to unloadAndStop the _loader.  In the loaded game file the Quit button will dispatch the event that the preloader is listening for to indicate it is ready to be removed.
    Example...
    In your loading/parent swf, listen for the complete event on the Loader.contentLoaderInfo.  In the complete event handler, add a listener for the event on the loaded swf.
    // event handler triggered when external swf is loaded
    function onLoaded(event:Event) {
        MovieClip(event.currentTarget.content).addEventListener("quitTriggered", eventHandler);
    function eventHandler(event:Event):void {
        preloader._loader.unloadAndStop();
    Add the following line to the Quit button code in the loaded game file
    dispatchEvent(new Event("quitTriggered"));
    (if you encounter a dispatchEvent problem, see: http://www.kirupa.com/forum/showthread.php?p=1899603#post1899603)

  • Problems with the dispatchEvent-Methode

    Hallo,
    I have a strange problem with above mentioned methode
    I have a JTextField, and I want that only numeric inputs are
    accepted, so I used a KeyListener -Interface in the following way
    public void keyTyped(KeyEvent e)
    JTextField field =(JTextField)e.getSource();
    char c =e.getKeyChar();
    if(c>57 | c<46 |c==47 &&c >31)
    field.dispatchEvent(e);
    the other methodes keyPressed and keyReleased are implemented in the same way.
    So if I type in now in my JTextField an 'a' or whatsoever
    then the following Exception occurs:
    java.lang.StackOverflowError
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1483)
    at java.awt.EventQueue.setCurrentEventAndMostRecentTime(EventQueue.java:731)
    at java.awt.Component.dispatchEventImpl(Component.java:3448)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    Mmh, and this is not the whole Exception message.
    There are missing a couple of lines.
    But may be one of you knows what my mistake is.
    Thanks advance.

    This is not the best way to validate for numerics. Check out the "Creating a Validated Text Field" section from the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation

  • Problem about dispatchEvent:

    I want to use dispatchEvent to trigger a action. But I found: it works if I use AWT component, otherwise, if I use Swing component, it doesn't work.
    I paste my code here. I want trigger the click event of button2 when button1 is clicked. If the two buttons are Buttons, it works. If they are JButtons, it doesn't work. Please tell me why and how to resolve it.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.util.*;
    import java.sql.*;
    public class Test extends JFrame implements ActionListener {
    private Container container = null;
    private Button button1 = null;
    private Button button2 = null;
    public static void main(String args[]) {
    Test test = new Test();
    test.show();
    public Test() {
    super();
    container = this.getContentPane();
    button1 = new Button("1");
    button1.addActionListener(this);
    button2 = new Button("2");
    button2.addActionListener(this);
    container.add(button1, BorderLayout.NORTH);
    container.add(button2, BorderLayout.SOUTH);
    this.setBounds(0, 0, 400, 300);
         public void actionPerformed(ActionEvent ae) {
    Object source = ae.getSource();
    if (source == button1) {
    System.out.println("button 1 clicked");
    button1.dispatchEvent(new ActionEvent(button2, ae.getID(), ae.getActionCommand()));
    // button1.dispatchEvent(ae);
    if (source == button2) {
    System.out.println("button 2 clicked");

    If you want to trigger the event on button2 then don't you need to call button2.dispatchEvent instead of button1.dispatchEvent?
    button2.dispatchEvent(ae);One "nice" way to get a JButton to perform its action programmatically is to call JButton.doClick.
    But I don't think your program logic is quite right here anyway since button2 isn't really interested in action events - it sends them rather than receiving them. It seems that you simply want button1 to perform at least the same action as button2.
    if(ae.gtSource() == button1)
      // button1 specific stuff
      System.out.println("button 1 pressed");
    else if(ae.getSource() == button2)
      // button2 specific stuff
      System.out.println("button 2 pressed");
    // stuff common to both button1 and button2
    System.out.println("button pressed");Hope this helps.

  • Problem in dispatchevent?

    Here i have pasted the code.
    Test2.mxml
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="714" height="380" >
         <mx:Script>
       <![CDATA[
    private function addBar():void {
          dispatchEvent(new Event('addButton'));
    ]]>
    </mx:Script>
    <mx:Metadata>
      [Event(name="addButton", type="flash.events.Event")]
    </mx:Metadata>
    <mx:LinkButton color="red" x="147" y="261" label="A" click="addBar()"/>
    </mx:Canvas>
    Test.mxml
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="880" height="484" xmlns:components="components.*
    " xmlns:ns1="*">
        <mx:Script>
    <![CDATA[
    import mx.controls.Button;
    import mx.controls.Alert;
    private function addButtonHere():void {    
    var linkButton:Button =new Button();
        linkButton.label = 'A';
        cBar.addChild(linkButton);
    ]]>
       </mx:Script>
    <mx:ApplicationControlBar id="cBar" width="763" height="42">
    <mx:Button label="settings"/>
    <mx:Button  label="settings1"/>
    </mx:ApplicationControlBar>
    <components:Test2 x="49" y="64" addButton="addButtonHere()">
    </components:Test2>
    </mx:Canvas>
    Main1.mxml(application)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:components="components.*" width="1064" height="600"> 
        <components:Test />
    </mx:Application>
       Here My requirement is i have one more linkbutton named 'B' in Test2.mxml.When i clicked on B it will be
    added to applicationcontrolbar(Test.mxml).How can i achieve this?
    plz help me
    Regards
    D.Mahesh Babu

    Hi
    The easiest way to add your new button is just to create a new event and handler as below
    Test.mxml
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="880" height="484" xmlns:components="components.*
    " xmlns:ns1="*">
        <mx:Script>
    <![CDATA[
    import mx.controls.Button;
    import mx.controls.Alert;
    private function addButtonAHere():void {   
        var linkButton:Button =new Button();
        linkButton.label = 'A';
        cBar.addChild(linkButton);
    private function addButtonBHere():void {   
        var linkButton:Button =new Button();
        linkButton.label = 'B';
        cBar.addChild(linkButton);
    ]]>
       </mx:Script>
    <mx:ApplicationControlBar id="cBar" x="10" y="10" width="763" height="42">
    <mx:Button label="settings"/>
    <mx:Button  label="settings1"/>
    </mx:ApplicationControlBar>
    <ns1:Test2 x="40" y="60" addButtonA="addButtonAHere()" addButtonB="addButtonBHere()">
    </ns1:Test2>
    </mx:Canvas>
    Test2.mxml
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="714" height="380" >
         <mx:Script>
       <![CDATA[
    private function addBarA():void {
           dispatchEvent(new Event('addButtonA'));
    private function addBarB():void {
    dispatchEvent(new Event('addButtonB'))
    ]]>
    </mx:Script>
    <mx:Metadata>
      [Event(name="addButtonA", type="flash.events.Event")]
      [Event(name="addButtonB", type="flash.events.Event")]
    </mx:Metadata>
    <mx:LinkButton color="red" x="46" y="53" label="A" click="addBarA()"/>
    <mx:LinkButton x="109" y="53" label="B" click="addBarB()"/>
    </mx:Canvas>
    And the application can stay the same.
    Andrew

  • File and FileInputStream problem

    Hi all
    I have downloaded from developpez.com a sample code to zip files. I modified it a bit to suit with my needs, and when I launched it, there was an exception. So I commented all the lines except for the first executable one; and when it succeeds then I uncomment the next executable line; and so on. When I arrived at the FileInputStream line , the exception raised. When I looked at the code, it seemed normal. So I want help how to solve it. Here is the code with the last executable line uncommented, and the exception stack :
    // Copyright (c) 2001
    package pack_zip;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import oracle.jdeveloper.layout.*;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import java.text.*;
    * A Swing-based top level window class.
    * <P>
    * @author a
    public class fzip extends JFrame implements ActionListener{
    JPanel jPanel1 = new JPanel();
    XYLayout xYLayout1 = new XYLayout();
    JTextField szdir = new JTextField();
    JButton btn = new JButton();
    JButton bzip = new JButton();
         * Taille générique du tampon en lecture et écriture
    static final int BUFFER = 2048;
    * Constructs a new instance.
    public fzip() {
    super("Test zip");
    try {
    jbInit();
    catch (Exception e) {
    e.printStackTrace();
    * Initializes the state of this instance.
    private void jbInit() throws Exception {
    this.getContentPane().setLayout(xYLayout1);
         this.setSize(new Dimension(400, 300));
    btn.setText("btn");
    btn.setActionCommand("browse");
    btn.setLabel("Browse ...");
    btn.setFont(new Font("Dialog", 0, 14));
    bzip.setText("bzip");
    bzip.setActionCommand("zipper");
    bzip.setLabel("Zipper");
    bzip.setFont(new Font("Dialog", 0, 14));
    btn.addActionListener(this);
    bzip.addActionListener(this);
    bzip.setEnabled(false);
         this.getContentPane().add(jPanel1, new XYConstraints(0, 0, -1, -1));
    this.getContentPane().add(szdir, new XYConstraints(23, 28, 252, 35));
    this.getContentPane().add(btn, new XYConstraints(279, 28, 103, 38));
    this.getContentPane().add(bzip, new XYConstraints(128, 71, 103, 38));
    public void actionPerformed(ActionEvent e)
    if(e.getActionCommand() == "browse")
    FileDialog fd = new FileDialog(this);
    fd.setVisible(true);
    szdir.setText(fd.getDirectory());
    bzip.setEnabled(true);
    else
              * Compression
         try {
              // création d'un flux d'écriture sur fichier
         FileOutputStream dest = new FileOutputStream("Test_archive.zip");
              // calcul du checksum : Adler32 (plus rapide) ou CRC32
         CheckedOutputStream checksum = new CheckedOutputStream(dest, new Adler32());
              // création d'un buffer d'écriture
         BufferedOutputStream buff = new BufferedOutputStream(checksum);
              // création d'un flux d'écriture Zip
         ZipOutputStream out = new ZipOutputStream(buff);
         // spécification de la méthode de compression
         out.setMethod(ZipOutputStream.DEFLATED);
              // spécifier la qualité de la compression 0..9
         out.setLevel(Deflater.BEST_COMPRESSION);
         // buffer temporaire des données à écriture dans le flux de sortie
         byte data[] = new byte[BUFFER];
              // extraction de la liste des fichiers du répertoire courant
         File f = new File(szdir.getText());
         String files[] = f.list();
              // pour chacun des fichiers de la liste
         for (int i=0; i<files.length; i++) {
                   // en afficher le nom
              System.out.println("Adding: "+files);
    // création d'un flux de lecture
    FileInputStream fi = new FileInputStream(files[i]);
    /* // création d'un tampon de lecture sur ce flux
    BufferedInputStream buffi = new BufferedInputStream(fi, BUFFER);
    // création d'en entrée Zip pour ce fichier
    ZipEntry entry = new ZipEntry(files[i]);
    // ajout de cette entrée dans le flux d'écriture de l'archive Zip
    out.putNextEntry(entry);
    // écriture du fichier par paquet de BUFFER octets
    // dans le flux d'écriture
    int count;
    while((count = buffi.read(data, 0, BUFFER)) != -1) {
              out.write(data, 0, count);
                   // Close the current entry
    out.closeEntry();
    // fermeture du flux de lecture
              buffi.close();*/
    /*     // fermeture du flux d'écriture
         out.close();
         buff.close();
         checksum.close();
         dest.close();
         System.out.println("checksum: " + checksum.getChecksum().getValue());*/
         // traitement de toute exception
    catch(Exception ex) {
              ex.printStackTrace();
    And here is the error stack :
    "D:\jdev32\java1.2\jre\bin\javaw.exe" -mx50m -classpath "D:\jdev32\myclasses;D:\jdev32\lib\jdev-rt.zip;D:\jdev32\jdbc\lib\oracle8.1.7\classes12.zip;D:\jdev32\lib\connectionmanager.zip;D:\jdev32\lib\jbcl2.0.zip;D:\jdev32\lib\jgl3.1.0.jar;D:\jdev32\java1.2\jre\lib\rt.jar" pack_zip.czip
    Adding: accueil188.cfm
    java.io.FileNotFoundException: accueil188.cfm (Le fichier spécifié est introuvable.
         void java.io.FileInputStream.open(java.lang.String)
         void java.io.FileInputStream.<init>(java.lang.String)
         void pack_zip.fzip.actionPerformed(java.awt.event.ActionEvent)
         void javax.swing.AbstractButton.fireActionPerformed(java.awt.event.ActionEvent)
         void javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(java.awt.event.ActionEvent)
         void javax.swing.DefaultButtonModel.fireActionPerformed(java.awt.event.ActionEvent)
         void javax.swing.DefaultButtonModel.setPressed(boolean)
         void javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent)
         void java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
         void java.awt.Component.processEvent(java.awt.AWTEvent)
         void java.awt.Container.processEvent(java.awt.AWTEvent)
         void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
         void java.awt.LightweightDispatcher.retargetMouseEvent(java.awt.Component, int, java.awt.event.MouseEvent)
         boolean java.awt.LightweightDispatcher.processMouseEvent(java.awt.event.MouseEvent)
         boolean java.awt.LightweightDispatcher.dispatchEvent(java.awt.AWTEvent)
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
         void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
         boolean java.awt.EventDispatchThread.pumpOneEvent()
         void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
         void java.awt.EventDispatchThread.run()
    Thank you very much

    One easy way to send a file through RMI is to read all bytes of a file to a byte array and send this array as a parameter of a remote method. But of course you may have problems with memory when you send large files. The receive is simillary.
    Other way is to split the file and getting slices of the file, sending slices and re-assemble at destination. This assume that the file isn't changed through the full transfering is concluded.
    I hope these could help you.

  • Problem at iteration (ArrayList)

    I`e made a soft wich writes elements from an array list to a table.
         int c=0;
         for (int a=0;a<(tabela.getRowCount());a++)
              for (int b=0;b<(tabela.getColumnCount());b++){
                   tabela.setValueAt(list.get(c),a,b);
    where tabela is the Table and list is the ArrayList. This version put into each row the element from the first position of the array list (because c=0). When i run this version, there are no problems. But if I increment c at each step (to put the nex value from the arraylist to the next row) i get this error message:
    Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
         at java.util.ArrayList.RangeCheck(Unknown Source)
         at java.util.ArrayList.get(Unknown Source)
         at BazaDeDate.creazaTabela(BazaDeDate.java:100)
         at BazaDeDate.<init>(BazaDeDate.java:64)
         at Fereastra$6.actionPerformed(Fereastra.java:151)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    This is how i increment c.
         int c=0;
         for (int a=0;a<(tabela.getRowCount());a++)
              for (int b=0;b<(tabela.getColumnCount());b++){
                   tabela.setValueAt(list.get(c),a,b);
    Thanks for any good suggestions.

    Really? you don't understand what "Array Index Out Of Bounds" means?
    You've tried to access something outside of your list. Don't do that.
    Figure out why your list contains fewer items than your table has slots for; or stop assuming there are enough.

  • How do I use the event.target.name String with an external dispatchEvent?

    ...I hope the title question makes sense...
    On my stage I have an externally loaded SWF with a button. When clicked the button dispatches an event to the main stage.
    On the main stage a listener then loads an SWF into a loader called gallery.
    The gallery loader is also being shared by buttons on the main stage which use the event.target.name String to call in SWFs with corresponding names.
    I am using Tweens to fade-out and -in content to the gallery when a button is pressed.
    Loading the SWFs was working until I tried to create a universal button function for the dispatchEvent buttons...
    The problem I have is that I don't know how to define the String to tell the newSWFRequest where to find the SWF when triggered by the external buttons.
    (I may be doing this all wrong... but figured the best way to load an SWF on to the main stage from an external SWF was by using dispatchEvent??)
    My code triggers the Event and the gallery loader fades out, but then it cannot find the new SWF:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Please can someone help me understand the way to make the String point in the right direction? (I think the only errors are in bold below)
    Code:
    var myTweenIn2:Tween;
    var myTweenOut2:Tween;
    var nextLoadS2:String;
    // Listen for external event dispatched from external btns
    addEventListener("contactStage", btnClickExtrnl);
    function btnClickExtrnl(e:Event):void {
    nextLoadS2 = ?????
    myTweenOut2=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOut2.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    // Btns Universal function
    function tweenOutCompleteF2(e:TweenEvent){
    myTweenOut2.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    myTweenOut2=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/" + nextLoadS2 + ".swf");
    myTweenIn2 = new Tween(gallery, "alpha", None.easeOut, gallery.alpha, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    Thank you.

    That works – thank you!
    I'm now using this code to fade in each of the SWFs:
    function contactStage(e:MouseEvent):void {
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
        myTweenIn = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But I cannot add the fade out function. I have amended the above code to create:
    var myTweenOutX:Tween;
    var myTweenInX:Tween;
    function contactStage(e:MouseEvent):void {
    myTweenOutX=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOutX.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    function tweenOutCompleteFX(e:TweenEvent){
    myTweenOutX.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    myTweenOutX=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
    myTweenInX = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But get this error:
    ReferenceError: Error #1069: Property name not found on fl.transitions.Tween and there is no default value.
    at ACOUSTIC_fla::MainTimeline/tweenOutCompleteFX()[ACOUSTIC_fla.MainTimeline::frame1:110]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at fl.transitions::Tween/set time()
    at fl.transitions::Tween/nextFrame()
    at fl.transitions::Tween/onEnterFrame()
    Where am I going wrong?

  • Java2SDk 1.4.2.06 installation problem on Windows Server 2003

    I tried the installation of Java2SDk 1.4.2.06. ,I tried this, but it fails to complete and NO directory folder is created so I cannot continue with the proccess. The OS is Windows Server 2003.
    I have done the following procedures:
    Enabled/Disabled the IIS configuration
    Enabled/Disabled the Windows Firewall
    Enabled/Disabled Antivirus software
    The error in the event log is:
    Event Type: Error
    Event Source: Application Error
    Event Category: (100)
    Event ID: 1000
    Date: 3/6/2007
    Time: 2:23:49 PM
    User: N/A
    Computer: GERSSERVER
    Description:
    Faulting application msiexec.exe, version 3.1.4000.1433, faulting module unknown, version 0.0.0.0, fault address 0x0013b43e.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 41 70 70 6c 69 63 61 74 Applicat
    0008: 69 6f 6e 20 46 61 69 6c ion Fail
    0010: 75 72 65 20 20 6d 73 69 ure msi
    0018: 65 78 65 63 2e 65 78 65 exec.exe
    0020: 20 33 2e 31 2e 34 30 30 3.1.400
    0028: 30 2e 31 34 33 33 20 69 0.1433 i
    0030: 6e 20 75 6e 6b 6e 6f 77 n unknow
    0038: 6e 20 30 2e 30 2e 30 2e n 0.0.0.
    0040: 30 20 61 74 20 6f 66 66 0 at off
    0048: 73 65 74 20 30 30 31 33 set 0013
    0050: 62 34 33 65 b43e
    Please advice on this problem. Other tech support recommendations were to reinstall the OS.
    I have also tried installing the latest version of Java 2 SDK without success.
    Thanks for your support
    William Hernandez
    UPR-Mayaguez Campus

    Thank you so much for your help!
    I have just tried as you said. Now I see that actually at the beginning of the intallation, there is a NullPointerException. Here is the error information:
    ===============================
    Checking available disk space...
    Checking Java(TM) 2 Runtime Environment...
    Launching Java(TM) 2 Runtime Environment...
    java.lang.NullPointerException
    at sun.java2d.SunGraphics2D.revalidateAll(SunGraphics2D.java:2086)
    at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2536)
    at com.sun.wizards.awt.Header.paint(Header.java:112)
    at sun.awt.RepaintArea.paint(RepaintArea.java:177)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
    at java.awt.Component.dispatchEventImpl(Component.java:3678)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    ===============================
    Please help me out of this. Thank you.

  • Problems with updating data in excel spreadsheet using ODI

    That's my first post on this forum, therefore I'd like to say Hello to everybody reading it before I present my problem.
    First I configured the ODBC connection to the xls file which conteins my data - the file isn't defined as read-only in the ODBC connection. The next step was setting up a Microsoft Excel Data Server in the topology manager in which I inserted the physical model and of course a logical one referencing the physical one. These steps allowed me to insert a model with my table in the Designer - I can view data throug the option 'view data' appearing after the right-click on the datastore. One of the columns was defined as primary key in constraints. I can use this xls file datastore as a source in an interface - loading the target finishes with a success. But I can't update the data in the xls file using the 'data' option appearing after right-click on the datastore correspondig to it in the designer. The new window with data from file appears without any problem, but when I try to update any of the fields I recieve an error:
    *"See com.borland.dx.dataset.DataSetException error code: BASE+37*
    *com.borland.dx.dataset.DataSetException: DataSet has no unique row identifiers.*
    *Note: For QueryDataSets you need to disable metaDataUpdate.ROWID in the MetaDataUpdate property, in addition to setting the RowId property on a column.* - don't know where to configure it
    at com.borland.dx.dataset.DataSetException.c(Unknown Source)
    at com.borland.dx.dataset.DataSetException.kb(Unknown Source)
    at com.borland.dx.dataset.StorageDataSet.fb(Unknown Source)
    at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
    at com.borland.dx.dataset.DataSet.startEditCheck(Unknown Source)
    at com.borland.dx.dataset.DataSet.startEdit(Unknown Source)
    at com.borland.dbswing.TableMaskCellEditor.textModified(TableMaskCellEditor.java:340)
    at com.borland.dbswing.TableMaskCellEditor.insertUpdate(TableMaskCellEditor.java:319)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(Unknown Source)
    at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
    at javax.swing.text.AbstractDocument.insertString(Unknown Source)
    at javax.swing.text.PlainDocument.insertString(Unknown Source)
    at com.borland.dbswing.DBPlainDocument.insertString(DBPlainDocument.java:77)
    at javax.swing.text.AbstractDocument.replace(Unknown Source)
    at javax.swing.text.JTextComponent.replaceSelection(Unknown Source)
    at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(Unknown Source)
    at javax.swing.SwingUtilities.notifyAction(Unknown Source)
    at javax.swing.JComponent.processKeyBinding(Unknown Source)
    at javax.swing.JComponent.processKeyBindings(Unknown Source)
    at javax.swing.JComponent.processKeyEvent(Unknown Source)
    at com.borland.dbswing.TableMaskCellEditor.processKeyEvent(TableMaskCellEditor.java:627)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)"
    What should I do to be able to modify data from the xls file that way (is it possible in any way)?

    It is not possible to update the data directly from ODI on some technologies, mainly due to some driver limitations.
    I would suggest to edit the spreadsheet in Excel.
    Thanks,
    Julien

Maybe you are looking for

  • Watching home movies on ATV?

    I download all my captured video from my digital camcorder to iMovie. I do not really make DVDs but just go to iMovie and watch selected clips from the Event Library Tab on the left side. 1. How can I watch these video clips on ATV? Do I have to tran

  • Business process in PP

    hii GURUS iam a junior business analyst in PP......i want any material about business process and what is my role as a business analyst to do in SAP implementation...? thanx

  • Flash button cursor normal/link

    Ok, basically, I have a flash, with one button in the middle, when the mouse goes over the button the cursor changes to the link cursor as it does with any other link/button, however I want the cursor to stay the same when it hovers over the button,

  • Grey color doesn't show up in photoshop

    When I am using Photoshop, it doesn't display the color grey correctly. Usually when I use the color picker tool, it shows different shades of the color grey on the left hand side. But now, even if I input the color code explicitly as #757575, it dis

  • Music In ipod skips

    well in my ipod i have music that skips when i try to play it ,but it goes on to the next song without playing