Custom Event Issue

Hope you flex geniuses can help me on this one....
the issue: an action script custom event is being dispatched
by one object but is not being "heard" by it's parent despite the
fact that a) the child object uses the [event] declaration in it's
class definition, b) the event is being correctly dispatched, and
c) the parent object uses an addEventListener method to listen for
the event.
the layout:
includes an application component (mxml) that has as it's
only direct child an action script custom component called
FloorPlan. On creationComplete the floor plan object instantiates
an action script class called Booth as many times as is required
(based on the number of booths that needs to be displayed on the
floor plan) and then adds the instances to itself via addChild()
method. The booth objects are based on Sprite class and so they
have click events, etc. When one of the booth instances is clicked,
the click event of the booth instance fires and the handler creates
an instance of the ShowCompanyProfileEvent (action script class
based on the Event class) and then dispatches it. The
ShowCompanyProfileEvent event handler for now should just open an
Alert box.
I know the code works within the Booth class because when I
register an event listener in the booth class itself and then click
on a booth, the listener "hears" the dispatched event and opens the
Alert box.
The problem is that The floor plan instance has a registered
event listener to listen for the dispatched custom event also but
nothing happens when I click a booth instance (which like I said
should dispatch the custom event). I deleted the addEventListener
code in the booth class thinking that maybe it was catching it
first but still it wouldn't work.
Any ideas? I have reallysearched and searched to no avail. As
I mentioned, I get no errors at all when I compile and run the
code. I just don't get the expected results.

LensterRAD, don't know if I got the hole idea but I guess you
are listening to the ShowCompanyProfileEvent directly on the
FloorPlan, something like:
FloorPlan.addEventListener(ShowCompanyProfileEvent,
someFunction);
if this is the case, you'll probably need to add the BUBBLE
parameter to the event, so it will follow the hole event
propagation model.
something like: dispatchEvent(ShowCompanyProfileEvent,
true);

Similar Messages

  • Custom Event - Issues with triggering

    Hi Experts,
    I've developed one workflow for travel management. The flow is as below.
    1. Whenever expense report is created, workflow will get triggered
    2. If the expense report requires receipts, workflow will be waiting for the receipts attachment. After attaching the receipts workflow will move further for approval process. For this I've created one custom event, which will be triggered from enhance spot (OA_BADI_LINK) implementation when receipts are attached
    3. I'm using the custom event created and wait step to hold the workflow till the event get triggered
    4. If receipts are required and not attached for 2 days, workflow will be terminated
    It was working fine in development server. After transporting the all related objects to testing server, in testing server the workflow was not moving further even after attaching the receipts. I wanted to check whether the custom event is getting triggered or not, while attaching the receipts. For this, I've requested admin team to switch on the event trace (SWELS) in testing server. After switching on the event trace, my workflow is working fine. I mean, the workflow is moving further whenever receipts are attached.
    I'm with no clue, why it was not working before activating the event trace and why it is working after that.
    Can any one help me in finding out the cause?
    Thanks in Advance,
    Siva Sankar.

    Hi Shital,
    Thanks for ur reply.
    Standard event that is maintained in SWE2 was getting triggered and workflow was getting started. But, the custom event that is getting triggered from enhancement was not working properly.
    What settings admin do using SWEQADM tcode?
    Thanks,
    Siva Sankar.

  • Issue in using custom event from outreach

    Hi
    I have created a custom event and executed a scenario successfully for this custom event from ACC. But when I try to configure the same event from Outreach(BCC), I am able to see this custom event in the list of available events, but after selecting this event there is no option to configure attributes for this event, but I can configure attributes in ACC. My BCC version is 10.1.1
    Edited by: 1002715 on Apr 26, 2013 3:06 AM

    Dear Ankit,
    Once the pricing procedure is downloaded, please maintain the document pricing procedure at service contract header level, and maintain the customer pricing procedure at business partner sales area billing data.
    In spro, maintain the pricing procedure for the combination of sales area, document pricing procedure, customer pricing procedure.
    Please crosscheck whether the condition table is active or not.
    Regards,
    Maddy

  • Problem reading custom property file from custom event handler.

    Hi,
    My custom event handler needs some bits of information that I have set up in a property file. However, when the event handler runs it throws a FileNotFound exception - actually its because permission was denied.
    I have added the code System.getProperty("user.name") to find out the actual user that the event handler is running as. It reports that "oracle" is the user.
    That's great. However, the permissions on the file will allow oracle to read/write the file. If I log onto the server where OCDB runs (as oracle), I can vi the file.
    The file is owned by another user, but the "oracle" is a member of the group that has read/write (we're running on a unix box). The file is not 777.
    The event handler is actually calling a static utility method that returns the Properties. This utility is used elsewhere in other custom apps in conjunction with OCDB (on the same server). It works there, so the utility is functioning correctly.
    Is there something going on that I'm missing? Like somehow the event handler is acually runn as somebody else?
    Here is the node log.
    2007/07/17 12:52:16 [oracle.ifs] [37] 434364 system FINE: Error /opt/csc/sfi/configuration/sfi.properties (Permission
    denied) Additional INFO: java.io.FileNotFoundException: /opt/csc/sfi/configuration/sfi.properties (Permission denied)
    Thanks in advance for the help.
    Winston

    Matt,
    Sorry to have wasted your time. It was a server reboot issue. The ocdb server hasn't been restarted since early July. We added the users and groups late last week. Although we tested on line, the server wasn't quite up to speed with the new changes.
    We bounced the server and all is well.
    Thanks
    Winston

  • Item Details iView and Custom Event

    Dear experts,
    I need to implement a custom validation using a BAPI call to external R/3 system.
    I am planning to use the Item Details custom event as a trigger for my custom web dynpro and have my BAPI call there. My question is, can I do that? The reason I'm asking is because the event says it's a post-save-event. What I need to do is to prevent the actual Saving and display an error message if the
    BAPI call returns "false".
    Thanks for your help,
    Boris

    I see that there are too many answers to this thread
    OK, here is how we solved the issue. We are subscribing in a custom Web Dynpro to the Post-save-event of the Item Details iView and we are performing the BAPI call.
    Based on the result of the call we are setting a flag on the record and this flag is used as a syndication block.
    Hope that helps someone ...
    Boris

  • Eventhandlers of children of application can not receive custom event dispatched by application

    Hello dear Adobe community,
    hope you can help me with this issue.
    When the application dispatches a custom event, the child uicomponent can only receive the event by using Application.application.addEventListener or systemManager.addEventListener. Simply adding a listener, without application or systemmanager, does not allow the event to be received by the child component.
    I want to be able to use the addEventListener and removeEventListener without SystemManager or Application.application, or could you provide a better workaround? How can I use the addEventListener, do I need to overwrite EventDispatcher, which I wouldnt like to do?
    Just to clarifiy, if i remove the systemManager in front of addEventListener(CustomEventOne.EventOne,sysManHandleCE,false) it will not add it and will not fire. 
    The code below is an example for this problem that the event is not getting fired in the right moment. The mainapplication got only a button with the customEventOne that gets dispatched.
    public
    class MyCanvas extends Canvas{
    public function MyCanvas()
    super();
    width=300;
    height=300;
    addEventListener(FlexEvent.CREATION_COMPLETE,handleCC,false,0,true);
    private function handleCC(event:FlexEvent):void
    removeEventListener(FlexEvent.CREATION_COMPLETE,handleCC);
    addEventListener(CustomEventOne.EventOne,handleCE,false,0,true);
    addEventListener(Event.REMOVED_FROM_STAGE,handleEvt,false,0,true);
    systemManager.addeventListener(CustomEventOne.eventOne,sysManHandleCE,false,0,true);
    private function handleEvt(event:Event):void
    trace("In removed from stage handler");
    systemManager.removeEventListener(CustomEventOne.EventOne,sysManHandleCE);
    trace(hasEventListener(FlexEvent.CREATION_COMPLETE));
    trace(hasEventListener(CustomEventOne.EventOne));
    trace(hasEventListener(Event.REMOVED_FROM_STAGE));
    private function handleCE(event:CustomEventOne):void
    trace("I got it");
    private function sysManHandleCE(event:CustomEventOne):void
    trace("I got it");
    public class CustomEventOne extends Event
    public static const EventOne:String = "EventOne";
    public function CustomEventOne(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
    super(type, bubbles, cancelable);
    override public functionclone():Event
    return newCustomEventOne(type,bubbles,cancelable);
    Thank you in advance,
    Michael

    I think you need to look at event propogation. The object that dispatches an event will be sitting on the display tree. The event propagates up the tree to the roots. Your canvas should be attached to the application, but even then it sits lower in the tree branches than the event dispatcher, so it won't see the event being dispatched because the event is not propagated to the children of the object that dispatches it but to the parent of the object that dispatches it.
    So, your canvas is a child of the application, but dispatching the event from the application means that the canvas doesn't see it because events are notified up the tree using the parent link, not the child links.
    You may wish to investigate how the display list and event propagation works and then the MVC pattern.
    Paul

  • Creating custom event listener ?

    Hello,
    Is there anyone that have a link to a tutorial or have some information on what is needed to be able to create a custom event listener on a component ?
    I am creating an interactive JSF chart library (JSFlot) and I would like to have events such as ChartDraggedEvent and ChartClickedEvent. I can create the events fine (and I can even queue them fine throught the standard action and actionListener interfaces), but I would like for the component to have attributes like chartDraggedListener and chartClickedListener, so that I can fire off the appropriate event to the appropriate listener.
    Any help would be very much appreciated!

    Well, that is what I am doing. The Renderer:
    if (event != null && event.equalsIgnoreCase("drag")) {
                        String componentValue = request.getParameter("componentValue");
                        //Cut out logic irrelevant for this example
                        FlotChartDraggedEvent dragEvent = new FlotChartDraggedEvent(component, dragValue);
                        dragEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
                        dragEvent.queue();
                   } else if (event != null && event.equalsIgnoreCase("click")) {
                        //Cut out logic irrelevant for this example                    
                        FlotChartClickedEvent clickEvent = new FlotChartClickedEvent(component, clickedPoint, clickIndexInt, clickSeriesIndexInt, clickSeriesLabel);
                        clickEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
                        clickEvent.queue();
                   }The problem though, is that both of these events gets delivered to the actionListener attribute of my component. What I assume is missing is functionality to register a custom listener for each event, and some code in the Tag-class and TLD to supply these listeners, and its these issues that I am unsure how is done. I may be missing something very basic here though :)

  • Hiding a custom event in portal eventing

    Hi,
    Can anyone tell me how to hide the custom event in portal eventing?
    Regards
    MQ

    I too use the PopUpManager, but to load Modules and had
    similar event/data and data binding issues. I ran across this post
    and have been integrating it's methods into my original code.
    Perhaps a read might help you as well.
    http://clockobj.co.uk/2007/10/17/simplified-cairngorm-easy-mvc-for-adobe-flex/

  • How to define custom event and how to trigger the defined event

    hi,guys
    hurry issue....................hope get help.
    I am using oracle weblogic 10gr3 portal.and we choiced java portlet.as of now,we got some question about custom Event.hope you can give some idea....
    thank you so much.
    question detail:
    1.for java portlet ,how to define custom event.
    2.how to trigger this event.
    3 about the data,may be sometime need to transit Biz data.
    auctully,I just want to implements between two portlets communicate.
    for example:
    existing portletA,portletB.
    portletA is a list,like:
    A AA <button>
    after I click this buttom,then portletB will be effect,it means they are interact with each other.
    does anybody hit this issue before,if you solved pls share me .
    thank you for you help....

    Hello,
    Please note that everything below applies to JSR168 portlets ONLY- JSR286 portlets and other portlet types handle events a little differently.
    From inside your JSR168 portlet you can send an event during processAction or when receiving another event by using the PortletBackingContext object, such as:
    import javax.portlet.ActionResponse;
    import javax.portlet.ActionRequest;
    import javax.servlet.http.HttpServletRequest;
    import com.bea.netuix.servlets.controls.portlet.backing.PortletBackingContext;
    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
    HttpServletRequest httpRequest = (HttpServletRequest) actionRequest.getAttribute("javax.servlet.request");
    PortletBackingContext portletBackingContext = PortletBackingContext.getPortletBackingContext(httpRequest);
    portletBackingContext.fireCustomEvent("customEvent", "This is a custom event");
    To receive an event, in your .portlet file you just need to put in a "handleCustomEvent" tag specifying which method to call when the event is received, such as:
    <?xml version="1.0" encoding="UTF-8"?>
    <portal:root xmlns:netuix="http://www.bea.com/servers/netuix/xsd/controls/netuix/1.0.0"
    xmlns:portal="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0 portal-support-1_0_0.xsd">
    <netuix:javaPortlet title="Listening Portlet" definitionLabel="yourPortletName">
    <netuix:handleCustomEvent event="customEvent" eventLabel="customEvent" filterable="true" description="custom event handler">
    <netuix:invokeJavaPortletMethod method="processCustomEvent"/>
    </netuix:handleCustomEvent>
    </netuix:javaPortlet>
    </portal:root>
    Then, in your receiving portlet the method "processCustomEvent" would receive the event, such as:
    public void processCustomEvent(ActionRequest actionRequest, ActionResponse actionResponse, Event event)
    The event payload can be any Serializable object you want, but for forward-compatibility with JSR286 it would be ideal if it had a valid JAXB binding.
    Kevin

  • When login Apps, get APP-FND--01926: The custom event WHEN-LOGON-CHANGED ra

    When login Apps, get APP-FND--01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-01403: no data found
    Applied patch
    6241631 11i.ATG_PF.H.delta.7 (RUP 7) and it's pre-requisite patches
    Forms can not be launched successfully.
    APP-FND--01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-01403: no data found
    Followed
    Note 391243.1: Unable to access forms - getting APP-FND-01926 error (Doc ID 391243.1)
    Note 555409.1: Client Gets App-Fnd-01926 Every Time After Bounce Apps 11i Forms Service (Doc ID 555409.1)
    these two notes, can not solve the issue.
    Executed following action plans:
    1. Backup custom.pll file on your issued instance(DEV instance).
    2. Copy a custom.pll files from a working environments(i.e. PROD instance) to this issued instance(DEV instance).
    3. Compile the new copied Library CUSTOM.pll manually by running the command:
    f60gen module=CUSTOM.pll userid=APPS/APPS output_file=$AU_TOP/resource/CUSTOM.plx module_type=library batch=no compile_all=special4. The $FORMS60_PATH needs to be in sync with the the Context.xml specifically the s_f60path variable
    i.e >/oracle/apps/test10appl/au/11.5.0/resource:/oracle/apps/test10appl/au/11.5.0/resource/stub</FORMS60_PATH>
    5. Run Autoconfig instantiate the changes.
    Issue still exists.
    Please HELP~~
    Thanks,
    Jackie

    Hello Srini,
    app11i@hpfsapp2> ls -ltra CUSTOM
    -rwxr-xr-x 1 app11i dba 24576 Aug 29 2001 TMCUSTOM.pll
    -rwxr-xr-x 1 app11i dba 20480 Mar 8 2006 CUSTOM.pll.backup
    -rwxr-xr-x 1 app11i dba 24576 Feb 22 2007 CUSTOM.pll.20120215
    -rwxr-xr-x 1 app11i dba 32768 Oct 4 2007 CHRM_CUSTOM.plx
    -rw-r--r-- 1 app11i dba 36864 Oct 8 2007 CHRM_CUSTOM.pll
    -rwxr-xr-x 1 app11i dba 20480 Feb 14 15:20 TMCUSTOM.plx
    -rw-r--r-- 1 app11i dba 24576 Feb 15 09:22 CUSTOM.pll
    -rwxr-xr-x 1 app11i dba 16384 Feb 15 09:23 CUSTOM.plx
    I don't quite understand "only one copy of CUSTOM.plx in the PATH directories", what is PATH directories? How to check? You mean environment variable?
    EBS version: 11.5.10.2
    DB version: 9.2.0.8
    OS: Linux x86
    Thanks,
    Jackie

  • Working with custom events

    I am trying to work with the EventDispatcher class to dispatch a custom event to stop a video from playing. The video plays inside a MovieClip with an attached class file called PlayerProfile. I want the video in the PlayerProfile MovieClip to stop playing when the user clicks on another MovieClip called ScrollBox. I'm getting no compile or runtime erros, but the code is not stopping the video. I have seen use of a public static constant to represent the custom event. Is that what I am missing here.
    Any help, as always, is much appreciated.
    Here is the code for the PlayerProfile MovieClip with relevant code in bold:
    package
        import flash.display.MovieClip;
        import gs.TweenLite;
        import flash.events.MouseEvent;  
        import flash.events.Event;
        public class PlayerProfile extends MovieClip
            public function PlayerProfile()
                this.ProfileButton_mc.buttonMode = true;
                this.StatisticsButton_mc.buttonMode = true;
                this.HomeButton_mc.buttonMode = true;
                this.VideoButton_mc.buttonMode = true;
                this.ProfileButton_mc.addEventListener(MouseEvent.CLICK, profileClickHandler);
                this.StatisticsButton_mc.addEventListener(MouseEvent.CLICK, statisticsClickHandler);
                this.HomeButton_mc.addEventListener(MouseEvent.CLICK, homeClickHandler);
                this.VideoButton_mc.addEventListener(MouseEvent.CLICK, videoClickHandler);
                TweenLite.from(this, .5, {alpha:0});
                //adds the listener to receive the stopVideo custom event
                this.addEventListener("stopVideo", stopVideoHandler);
           //method to stop the video
            private function stopVideoHandler(event:Event):void
                this.Video_mc.stop();
            private function profileClickHandler(event:MouseEvent):void
                this.Video_mc.stop();
                this.gotoAndStop("Profile");
                TweenLite.from(event.target, .5, {alpha:0});
            private function statisticsClickHandler(event:MouseEvent):void
                this.Video_mc.stop();
                this.gotoAndStop("Stats");
                TweenLite.from(event.target, .5, {alpha:0});
            private function homeClickHandler(event:MouseEvent):void
                this.Video_mc.stop();
                event.target.root.gotoAndStop("Home");
            private function videoClickHandler(event:MouseEvent):void
                this.gotoAndStop("Video");
                TweenLite.from(event.target, .5, {alpha:0});
    Here is the code on my Main Timeline that dispatches the event, again with relevant code in bold:
    stop();
    //adds listeners to call the profile functions
    this.ScrollBox.addEventListener(MouseEvent.CLICK, clickHandler);
    //functions to advance the movie to the profiles
    function clickHandler(event:MouseEvent):void
        gotoAndStop(event.target.name);
    //code to dispatch the custom event
    this.ScrollBox.addEventListener(MouseEvent.CLICK, stopVideoHandler);
    function stopVideoHandler(event:Event):void
        dispatchEvent(new Event("stopVideo"));

    you have a scope issue.   your PlayerProfile instance is listening for that custom event.  your PlayerProfile instance must dispatch that event for the listener to detect it.  ie, if pp is your PlayerProfile instance on your main timeline, use:
    pp.dispatchEvent(new Event("stopVideo"));

  • Vnc into my computer to fix custom event function

    I have a custom event that is not behaving correctly and I can't get any help by posting the code its just too complicated so I'm wondering if somebody wants to VNC into my computer and attempt to fix it ....it will go something like this.....I'll reproduce the problem then i'll open up all the relevant classes then I'll collabrate via instant messenger.....alternatevily i'll email the source if you don't want to vnc....i prefer vnc though because this applicaiton uses severside php scripts and flash media server......connecting to those technologies  from the source wouldn't be a problem though

    Hello Lorraine,
    Thank you for contacting Apple Support Communities. You might try the steps in the following article regarding iPhone battery charging:
    iPhone and iPod touch: Charging the battery
    http://support.apple.com/kb/HT1476
    Specifically:
    Resolving issues
    If your battery doesn't charge, or if your device shows a low-battery image, black screen, or "accessory not supported" alert, follow these steps.
    Inspect the connector at the bottom of the phone:
    Make sure that there are no bent pins in the connector.
    Make sure that the connector is free from debris.
    If there are bent pins or debris, please contact Apple Support.
    Otherwise, continue troubleshooting.
    Make sure that the outlet you're using works.
    Make sure that the Apple USB cable and Apple USB power adapter work.
    Plug the device in to power and let it charge for up to 30 minutes. If you don't have an Apple USB power adapter, try connecting to a computer's high-power USB 2.0 port (not a keyboard). The computer must be on.
    If the device still exhibits an issue, try turning your device off and then on again while connected to power.
    If the issue is persists, please contact Apple Support.
    Regards,
    Jeff D.

  • Custom Events and Scheduling more than once

    Hi,
    in BO 4.1, I successfully triggered WebI Report instance generation by a "Custom Event" through scheduling.
    Now, we have the requirement that the report should not be triggered only once but always when the event is triggered.
    At first glance, this looks tricky bc. in order that the report "reacts" to the event, the report itself must be scheduled with the event (it gets an instance "pending" that "wait + reacts" to the event). So it looks like we need schedule the report always manually with "event" before it is ready to react to the event specified in the scheduling.
    Is there any user-friendly trick to make the report react upon every fired event without having to "schedule" the report manually with the event?
    (Similar to schedule daily, just that the event is the trigger, note a daytime...)
    Best Regards

    Hi Florian,
    What is the frequency set under Recurrence option for the report instance?
    Can you give an idea like after how much time the event can be triggered?
    For example, if you are expecting the event to change in an hour, you can schedule the recurrence as hourly or you can specify something like 0 hours and 15 minutes or something like that.
    In that case, once the event is fired, your report instance will be ready to trigger after 15 minutes for the next run.
    Would suggest you to sync with the BO administrator as concurrent triggering of large number of instances can give load on Job Servers.
    Hope it will help in some way.
    Regards,
    Yuvraj

  • Can you send custom events from one form to another?

    I have a compli
    cated application, where I about hundred inp
    uts organized in several input forms. Some of the forms
    require data which has been input in other forms. I have tried to
    dispatch custom events from one form to another, but it dispatches the
    whole form and I only need one or two items.
    Ha anybody else come across such a problem?
    Svend

    One way is to share data in a static singleton

  • Custom Events and Listeners between classes

    I've got a project I've been working on for weeks that I'm
    having yet another problem with. I'm trying to learn AS3 which is
    why it's taking so long but that's not important for this post.
    I wanted to create a custom event class so that I could make
    sure the event does not interfere with other "COMPLETE" events that
    are being passed between classes. In other words, I have a few
    things that need to complete prior to a function being called...
    one is some XML being loaded and another is a font loaded. So, I
    thought I would create a custom FontLoaded class that extends Event
    and make the type something like "FontLoadedEvent.LOADED". That way
    I could listen for the XML "Event.COMPLETE" and this font event
    also.
    Please tell me if I'm going down the wrong path here but I
    don't seem to be getting the dispatched event for my new custom
    event. Also, how does one detect if it's being dispatched other
    than if the eventListener is fired? Any other ways to test
    this?

    You can trace the event to see if it dispatched.
    Also, this is not a good case to create a new event. Custom
    events are used to store additional information. MouseEvent exists
    because Event doesn't have localX, localY, etc. properties. Since
    you don't seem to be throwing additional properties, you can use a
    regular event.
    trace(dispatchEvent(new Event("panelFontsLoaded"));
    addEventListener("panelFontsLoaded", onFontsLoaded);
    Static consts are used to help debug typos. The event type is
    just a string, often stored in a const.

Maybe you are looking for