Problem catching events from my ComboBoxItemRenderer

Hi all,
I have a problem catching a custom event dispatched by my
custom ComboBoxItemRenderer. In the renderer I dispatch an event as
follows:
dispatchEvent(new Event("smallTest",true,true));
As this is a bubbling event i expected to be able to catch it
in one of the parent containers. However, the opposite is true.
Then, lowering my goals i tried to catch the MouseEvent.CLICK event
raised by the button in the ComboBoxItemRenderer. I failed in the
same way...
Somebody has a clue? Thanks in advance!
(the following is an isolated description of my small problem
The Mainapp
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()" layout="absolute" xmlns:local="*">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]
public var aDataProvider:ArrayCollection = new
ArrayCollection(
[ {label:"one", data:1},
{label:"two", data:2},
{label:"three", data:3} ]);
private function init() : void {
addEventListener("smallTest", doAlert);
private function doAlert(event : Event) : void {
Alert.show("yo");
]]>
</mx:Script>
<mx:ComboBox id="cb" itemRenderer="ComboBoxItemRenderer"
dataProvider="{aDataProvider}" width="200"/>
</mx:Application>
The Renderer
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml"
width="100%">
<mx:Script>
<![CDATA[
import mx.core.Application;
private function doClick() : void {
dispatchEvent(new Event("smallTest",true,true));
]]>
</mx:Script>
<mx:Label color="red" text="{data.label}"/>
<mx:Spacer width="100%"/>
<mx:Button label="*" width="40" click="doClick()"/>
</mx:HBox>

Listening from the combobox (cb) didn't work. Found out that
the hierarchical parent list from the view of the itemrenderer was
as follows:
List18.ListBaseContentHolder21
List18
[object _ComboboxTest_mx_managers_SystemManager]
[object Stage]
For now, i managed to fix the problem by listening from the
systemManager but this is more like a hack.

Similar Messages

  • Catch Event from a FileDownload!!!

    Hey magical people
    Somebody knows how can i catch an event from Element UI FileDownload?
    Thanks for all!!!

    A. Van de Camp,
    You can create two iViews that communicate with each other on the same page, using client-side eventing, so that the output of the first iView serves as the input to the second. Eventing in the portal is based on the use of the Enterprise Portal Client Manager (EPCM), an object defined by the portal client framework to handle functions such as client eventing.
    To define eventing between an iView created and existing in the portal(web dynpro iview), and an iView created in Visual Composer:
    1.Check the properties of the existing portal iView and find out its EPCM event name.
    2. In Storyboard, open the iView that is to be the second part of the eventing scenario and create the required port: as input or as output.
    3. Double-click the newly-created port and in the Configure Element task panel, enter the portal event name in the Signal name field and the EPCM event in the EPCM event field.
    Regards,
    Sami

  • How to catch events from SAP

    Hi everybody:
    I'm trying to set an event in SAP and catch it from a .NET progam using the .NET Connector.
    I have sow the function BP_EVENT_RISE but it seems it doesn't help enough.
    We want to verify if the users have use an especific transaction inside SAP program. We have user exits created and we only need to indicate over the .NET program who is listening for some event.
    How can I solve this?
    We are not using Business Connector.
    I will appreciate any suggestion.

    The User Exit only reflects one step of exit performed by the user.
    The events that i need to perform have the objetive to inform that some task have been performed inside SAP, a complete task, not only knowing that the user have finished his day work.
    The idea it's to know that the user finished a new human resource registration, beyond it's well done, I need to know the number of the human resource.
    On this point, I need to continue the registration in an automatic way over the security system (active directory), send an event to the person who have to regiter him over the corporate system and configure his mail (if needed).
    I have look and evaluate the advise, but it dosen't solve my needs. I have to wait until my user finished his job (or ask him to exit) each time he register a new human resorce, that's not my idea.
    Any other sugestion?. Thanks.

  • Catching event from canvas class

    Hi,
    I want to catch an event from MyCanvas class/obect to MyMidlet class/object. I have implemented keypressed method in MyCanvas. can i use it pr do i have to do something else..
    Any ideas?
    Cheers
    Indy

    hi mlk!
    well, i want to catch Canvas.Fire event. sorry but i should have given you an idea of the code. well here it is:
    public class MyMIDlet extends MIDlet implements CommandListener {
    private Display display;
    private MyCanvas canvas;
    private Command exitCommand = new Command("Exit", Command.SCREEN, 1 );
    public MyMIDlet(){
    canvas = new MyCanvas(this);
    protected void startApp(){
    display.setCurrent(canvas);
    canvas.addComman(exitCommand);
    canvas.setCommandListener(this);
    public void commandAction( Command c, Displayable d ){      
         if( c == exitCommand ){
         exit();
    public class MyCanvas extends Canvas{
    protected void keyPressed(int keyCode) {
         if(keyCode < 0)
         int key = getGameAction(keyCode);
    if(key == Canvas.FIRE){
         System.out.println("FIRE");
    So, when Canvas.FIRE is 'pressed' i want MyMIDLET to know that it happend..
    thanks again
    indy

  • Catching Events from Com side using ActiveX bridge

    Hi,
    I have packaged a java swing application into an activex control using the ActiveX bridge. I now need to be able to fire events from my java code which the com/VB code needs to be able to trap. The event handler on the com side looks like this: function(BSTR param1, BSTR param2, BSTR param3), but the java event model only allows passing the EventObject in the param for the introspector to work. How do I fire an activex event that the com client is able to trap??

    Thanks, beders. Your solutions above works, although I found the only way to install the SDK was to the use following URL rather then the one beders suggested:
    http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm
    This SDK is the full one and not just the Core SDK so may take a little longer to download.
    You also need to ensure that the location to cmd.exe (ie. C:\WINDOWS\system32) is on the path variable otherwise SetEnv.bat fails when it calls cmd.
    J

  • Problem syncing events from iPhoto

    Hi,
    In iTunes I selected the events I want to sync with my iPhone and it worked pretty good for a while, but now it says they are synchronised but a lot of them are missing on the phone. Any idea how to fix it ?

    You cannot share videos from iPhoto. You will need to manage them in iTunes or some other app.
    Regards
    TD

  • Problem catching events after opening system form

    Hi
    In my addon i open a system form from a user form. after closing the system form , my user form does not cause any event to be handled by my addon. in other words pressing on the forms button items does not cause any event to accure. in order for the form to work i need to close the form and reopen it from the menu. question is how can i know what is causing the form to stop responding and how can i fix it?
    appreciate the help
    Yoav

    Hi Yoav,
    It looks like when the system, form closes you remove a filter for your user form or your remove the listener for your user form.
    Regards
    Ad

  • Catch event from Web Dynpro for Java

    Dear guru's,
    we have a working Web Dynpro for Java. It delivers a company code that needs to be routed to a visual composer model. In the Web Dynpro we use the WDPortalEventing.fire command to trigger an event named 'ShowCompanyCode' in namespace com.sap.vc:epcm. In the visual composer, I used a 'signal in' for the same namespace and event name. However, the supplied value for the company code is not received. Both iviews (from VC and Web Dynpro) are on one page.
    I have enabled the flash debug console and did some testing with a VC model that consists of two iviews on one page. Here it does work. I have found some differences in the debug output that points in a direction.
    In the case of the VC iviews, I get the following string in the debug console: signalinAHAPP -<Params version="2" ><Row STR1="1000" /></Params>. This results in a correct transfer of company code value '1000'.
    When getting the info from the Web Dynpro iview, I get the following string:  signalinAHAO8 -1000. It seems that the web dynpro does not supply the values in a correct way. However, the same mechanism is used to supply the data to another web dynpro iview and that works fine.
    Do we have to use special coding to be able to fire the event to a VC iview? Any help will be appreciated and points will be awarded!
    Thanks,
    Arno

    A. Van de Camp,
    You can create two iViews that communicate with each other on the same page, using client-side eventing, so that the output of the first iView serves as the input to the second. Eventing in the portal is based on the use of the Enterprise Portal Client Manager (EPCM), an object defined by the portal client framework to handle functions such as client eventing.
    To define eventing between an iView created and existing in the portal(web dynpro iview), and an iView created in Visual Composer:
    1.Check the properties of the existing portal iView and find out its EPCM event name.
    2. In Storyboard, open the iView that is to be the second part of the eventing scenario and create the required port: as input or as output.
    3. Double-click the newly-created port and in the Configure Element task panel, enter the portal event name in the Signal name field and the EPCM event in the EPCM event field.
    Regards,
    Sami

  • ALV Catch Event's

    Hi,
        l am using 'REUSE_ALV_GRID_DISPLAY'.
    I am able to catch event, from ALV list, example DBLCLICK.
    I would like to catch command from key pad also, example ENTER.
    How can l do?

    Hi,
    you need to SET The pf status using the PFstatus option,
    here you have to set the OKCODE for the Green tick button
    that is related to enter.
    say ENTR for the Green Tick button and catch it in User Command form.
    you need to have two forms
    one for pf status, one for user_command.
    Regards
    vijay

  • How to catch the mouse event from the JTable cell of  the DefaultCellEditor

    Hi, my problem is:
    I have a JTable with the cells of DefaultCellEditor(JComboBox) and added the mouse listener to JTable. I can catch the mouse event from any editor cell when this cell didn't be focused. However, when I click the editor to select one JComboBox element, all the mouse events were intercepted by the editor.
    So, how can I catch the mouse event in this case? In other word, even if I do the operation over the editor, I also need to catch the cursor position.
    Any idea will be highly appreciated!
    Thanks in advance!

    Hi, bbritta,
    Thanks very much for your help. Really, your code could run well, but my case is to catch the JComboBox event. So, when I change the JTextField as JComboBox, it still fail to catch the event. The following is my code. Could you give me any other suggestion?
    Also, any one has a good idea for my problem? I look forward to the right solution to this problem.
    Thanks.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test3
    extends JFrame {
    // JTextField jtf = new JTextField();
    Object[] as = {"aa","bb","cc","dd"};
    JComboBox box = new JComboBox(as);
    public Test3() {
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container content = getContentPane();
    String[] head = {
    "One", "Two", "Three"};
    String[][] data = {
    "R1-C1", "R1-C2", "R1-C3"}
    "R2-C1", "R2-C2", "R2-C3"}
    JTable jt = new JTable(data, head);
    box.addMouseListener(new MouseAdapter() {
    // jtf.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e)
    System.out.println("-------------------JComboBox mouseclick....");
    jt.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e)
    System.out.println("-------------------JTable mouseclick....");
    // jt.setDefaultEditor(Object.class, new DefaultCellEditor(jtf));
    jt.setDefaultEditor(Object.class, new DefaultCellEditor(box));
    content.add(new JScrollPane(jt), BorderLayout.CENTER);
    setSize(300, 300);
    public static void main(String[] args) {
    new Test3().setVisible(true);
    }

  • Catching window closing events from JFrame

    I'm having problems catching windowClosing() events from a JFrame (just doesn't get to my event listener it would seem!).
    I register and setup a window listener in the constructor of my JFrame class. Prior to this I set the default close operation as DO_NOTHING_ON_CLOSE (as you're suppose to if tyou want to handle window closing events).
    When user clicks on x (window terminate) button (in WIN systems), nothing is dispatched to my event listener. Any ideas?
    Extract from constructor:
    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    addWindowListener(new MainWindowListener(this));
    MainWindowListener looks as follows (EDImemConvert extends JFrame):
    class MainWindowListener extends WindowAdapter
    private EDImemConvert f;
    public MainWindowListener(EDImemConvert f)
    this.f = f;
    public void windowClosing(WindowEvent e)
    System.out.println("gets here...");
    f.ReturnResources();
    f.dispose();
    System.exit(0);
    }

    This works for meimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame {
      public Test() {
        addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent we) { System.exit(0); }
        setSize(300,300);
        setVisible(true);
      public static void main(String args[]) { new Test(); }
    }Normally, I just use this line
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    instead of adding a listener. It will clean up everything nicely.

  • I have no problems copying iMovie Events from one Mac to another, however, how can I copy iMovie Projects from one Mac to another?

    I have no problems copying iMovie Events from one Mac to another, however, how can I copy iMovie Projects from one Mac to another?  Any help will be appreciated.  Thank you.

    This should give you some good insight, I'd probably store them on an External HD on the old machine and then just drag and drop to the new machine.
    https://discussions.apple.com/docs/DOC-4141

  • Problem creating iCal Events from Mail in Leopard

    The new function that allows the user to create iCal events from Mail messages is quite impressive and very useful. Unfortunately the data detectors seem to have trouble with certain commonplace date formats. While the detector recognises the date, it cannot activate an event in iCal. For instance the data detector will pick up the dates in these formats and create iCal events:
    30 October 2007
    30 Oct 07
    30/10/07
    but not in this format:
    30-Oct-07
    In the latter case, the data detector recognises it is a date, produces the drop menu, but will not carry through and create an event to iCal. It's annoying in that many companies use the latter format in their communications. Any workaround?

    There is another problem I have found.
    I have my computer set in international settings formats to show the date in the "English format"
    January 4th 2007 is 4/1, however an entry in mail 4/1 is put into iCal on the first of April!
    I found this out after looking for a meeting I knew I had put in for next week.
    beware, can this bug be fixed?

  • Capturing events from a JCheckBox in a JTable cell

    I am trying to capture item state changed event from a JCheckbox in a JTable. When user selects checkbox I do insert in database and on deselect I do delete from database. The item state changed event is not firing correctly...can you please tell me what I am doing wrong. My JTable uses CustomModel which is used by many other apps. So I can not really modify CustomModel only to work with my JTable. Here is my code.
    public class MyClass extends JPanel
    .....some code to add panel, jscorollpane, etc.
    ResultSet res;
    GUI gui; //Custom Class to deal with different GUI layouts
    JTable myJTable = new JTable();
    GUI.CustomModel custModel;
    public void init()
         displayJTable();
    attachCheckBoxListeners();
    private void displayForms()
         res = //resultset from DB
    Vector cols = new Vector(10);
    cols.addElement(new Integer(1);
    gui.DisplayResultSetinTabel(res, myJtable, cols, null);
    custModel= (GUI.CustomModel) ((TableSorter) myJTable.getModel()).getModel();
    custModel.setEditableColumn(0, true);
    //Attach CheckBox Listener to all the checkbox in JTable
    private void attachCheckBoxListeners()
    for(int row = 0; row< myJTable.getRowCount(); row++)
    Object val = cm.getValueAt(row, 0);
    final JCheckBox jcb = (JCheckBox) gridForms.getCellEditor(row, 0).getTableCellEditorComponent(gridForms, val, true, row, 0);
    jcb.addItemListener( new java.awt.event.ItemListener() // Add Item Listener to trap events
    public void itemStateChanged(java.awt.event.ItemEvent event)
                   if(myJtable.getSelectedRow() == -1) // if no row is selected in table return
                        return;
                   try               
                   if (res.absolute(myJtable.getSelectedRow())+1))
         if(jcb.isSelected())
    saveData();();      
         else
    deleteData();
         catch(Exception e)
    System.out.println("ERROR ");
    } //end of AttachCheckBoxListeners ()
    private void SaveData() {}
    private void DeleteData() {}
    Okay....the problem is when JCheckBox state is changed (by user) from Selected to Deselected itemStateChanged() is fired and it does delete from database. then again itemStateChanged() called it detects Jcheckbox as selected and does inseret in database. On Jtable gui...that checkbox is still shown as desected.
    Please tell me what is going on here.....
    Thank you.

    In short - never listen to low-level events from editorComponents (low-level meaning everything below - and most of the time including - a editingStopped/editingCancelled of the cellEditor). Your problem belongs to the model realm - save if a cell value is changed - so solve it in the model realm by listening to event from the tableModel and trigger your business logic when you detect a change in that particular cell value.
    Greetings
    Jeanette

  • Capturing events from a bluetooth remote control

    I purchased a Fujitsu Remote Control RC900 and installed it on my Windows 7 computer.
    Now I try to capture the remote control key events in a Java application.
    I can catch some events as keyboard events (such as "Enter" or arrow keys) but for many keys I have not found a way to catch any event.
    Still, some media applications can recognize the events.
    I also tried listening mouse events with this swing tutorial class
    http://docs.oracle.com/javase/tutorial/uiswing/examples/events/MouseEventDemoProject/src/events/MouseEventDemo.java
    But no success. Any ideas?
    Is there any remote control event framework for Java, apart from keyboard or mouse events?

    In short - never listen to low-level events from editorComponents (low-level meaning everything below - and most of the time including - a editingStopped/editingCancelled of the cellEditor). Your problem belongs to the model realm - save if a cell value is changed - so solve it in the model realm by listening to event from the tableModel and trigger your business logic when you detect a change in that particular cell value.
    Greetings
    Jeanette

Maybe you are looking for

  • Font Book 2.0.3

    I am trying to find out if my Font Book has Crashed. My Illustrator all of a sudden would stop responding, uninstalled it and reinstalled. But I get the following error when I tried to create a PDF: The font Futura could not be imbedded in the PDF do

  • CG36 - Import report - No file format in the key file?

    Hi all, Transaction CG36: .Key files are successfully checked by u2018Check directoryu2019 in transaction CG36. The second step is the import process. The Import shows u2018greenu2019 successfully. But the Job description shows the following message:

  • Parallels Desktop, Boot camp or something else

    I am wanting to run Windows on my MacBook Pro - but didn't know what route to go. Has anyone tried Parallels, Fusion, boot camp, etc - What are the pros/cons of them. I am currently running Tiger on mine. And just to make sure...I do have to my Windo

  • Using iwork '05 after using trial version of iwork '06

    As a teacher, I do lots of lessons in Keynote 2.0.2 A 30 day trial version of iwork '06 (including an updated Keynote) came with my recent purchase of ilife '06. Now that the 30 days has expired, I can't open Keynote files I used during those 30 days

  • Drawing in Dreamweaver

    Is there a way of drawing lines in Dreamweaver? At the moment I am adding a screen dump and text in Dreamweaver then having to add arrows/lines using FrontPage. This is really faffy as the lines do not look right and the arrows appear higher or lower