Creation of Flex Components Listening to a Custom Flex Event
Hi,
I would like to create a component in Flex which will always listen to a Cutom Event.
Say, I create an event named "MyEvent" in Flex. I associate this event toa custom component, say MyComponent (extends Button). When ever this even is triggered , I should have a set of Components listening and tracking this event using an event listener in their definition.This should be in a framework level. That is, even if we add more components in our application, they should be able to listen to the Custom Event.
Or in short, is it possible to make all the components in an application listen to a custom event triggered?
Thanks for your answer.Can u please give an example so that I can understand it.Excuse me,I am a beginner in flex.
Similar Messages
-
Listening in main application for event coming from custom component
I have a custom component that im using for a login. i watch videos and tutorials on how to pass variables between custom components and application. the problem im having is that must tutorials or explanation have you put the event on the custom component and then it refers to some function within the main app.
Is there a way to just listen on the main app when that event kicks off? ive been trying for hours and i know there has to be something im missing it cant be that hard. any help i would really appreciate.
Thanks
MiguelSounds like you're asking about addEventListener():
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
comp.addEventListener("test", testHandler);
private function testHandler(e:Event):void {
trace(e);
]]>
</fx:Script>
<local:TestComponent id="comp"/>
Add an event listener on your custom component (first string is the 'type' of the event). -
10.1.3, Session Edior, Specifying custom session event listener
When in 9.0.4.4, we can specify custom sesson event listener in session editor.
Using 10.1.3 mapping workbench/session editor, I haven't found a way of doing it. Is this supported?
Thanks.
HaiweiNever mind. After adding jar to the classpath, I now can specify custom sesson event listener in the session editor. Thanks.
-
How to include multiple image components into a single custom component???
How to include multiple image components into a single custom component???
Hi Marcel,
an ABAP transaction can only run or at least be started on one single system. A portal transaction can be assigned using a URL. This doesn't need any logical component.
Regards
Andreas -
When to use Custom Adapter, Event Beans and Spring beans
Hi,
I have basic question on when or on what basis/scenario the Custom Adapter, Event Beans or Spring beans should be used.
All three has same implementation methods.
Please help me in understanding when to use Custom Adapters, Event Beans or Spring beans.
Thanks,
Sri
Edited by: 897694 on Mar 7, 2012 8:12 AMcustom adapters:
you have to use a custom adapter when you don't find any adapter in ocep which will serve your purpose.
Most of the times you use an adapter to connect the application with external things like http server, etc It can be both to listen the events or to send the events outside.
Event Beans:
This type of beans does most of the work that an adapter code does but in convention beans are not used to connect the application with external stuff
You can use Beans as event sink etc In this case using an using an adapter is not suggestable.
If you implement Interfaces like Initializing Bean for an adapter code it won't work properly, you have to use an event Bean in that case.
Spring beans:
Spring beans are used when the bean code doesn't implement EventSink or EventSender.
These beans are used to enable something (eg: make ${wlevs_dev_home}/abc/a/b.java this path is not understandable by java code unless you override the path using a spring bean)
Most of the things which doesn't need a connection between components in the application (eg cache loader: you can do this using spring beans and event beans both but spring beans doesn't need a connection with cache)
Hope this small writeup helps you :)
Edited by: Patha on Mar 8, 2012 9:10 AM -
Htp.p doesn't work from the custom button event handler ...
Hi,
I am trying to pop up an alert from the custom button event handler. I created a button and put the following code.
htp.p('<script language='JavaScript1.3">
alert ("Test Message");
</script>;
But alter doesn't show up after clicking the button.
ThanksOK i've attached them and copy/pasted the relevent parts. The parent window is the SFLB file.
-----------------------------------------here's the code in the parent window
private function editServerPool():
void
serverPoolPUW = PopUpManager.createPopUp(
this,popups.ServerPoolPopup,true);PopUpManager.centerPopUp(serverPoolPUW
as IFlexDisplayObject);
if (newServerPool.SecondarySPAlgorithm != null){
serverPoolPUW.enableSSCheckBox.selected =true;serverPoolPUW.DisplaySecondaryServerPool();
serverPoolPUW.bigResize.play();// serverPoolPUW.height = 602; //yes...i know i need to move thisserverPoolPUW.switchoverPolicyCB.selectedItem = newServerPool.SwitchOverPolicy;
serverPoolPUW.switchoverThresholdTI.text = newServerPool.SwitchOverThreshold;
----------------------here's the code in teh popup window (popups.ServerPoolPopup.mxml)
<mx:Resize id = "bigResize" heightFrom="506" heightTo="602" target="{this}" />
<mx:Resize id = "littleResize" heightFrom="602" heightTo="506" target="{this}"/>
public function DisplaySecondaryServerPool():void{
//make the screen large if the secondary server checkbox is selected; otherwise small.
if (enableSSCheckBox.selected){
//display secondary server pool tab, expand the screen
//note that we cannot attach a data provider to the data grid until the grid creation is
//completed. This is done in an event handler.secondaryPanel.enabled =
true; switchoverPolicyCB.visible =
true;switchoverThresholdTI.visible =
true;thresholdFI.visible =
true;policyFI.visible =
true;bigResize.play();
else
<mx:CheckBox label="Enable a Secondary Server Pool" width="264" fontWeight="bold" click="DisplaySecondaryServerPool()" id="
enableSSCheckBox" fontSize="12" x="83" y="40"/> -
Handling Custom JavaScript Events from HtmlLoader Class
Hey guys, just a quick question, Is it possible to handle custom javascript events just the way standard events like locationchange and DOMInitialized are handled. Say for example a HTML5 slide application that dispatches custom events when the user moves from one slide to another. I know there is an option to use ExternalInterface to talk to AS3 but for this project of mine, this is not an oiption as this HTML5 Presentation doesnt have any swf content to bridge with.
Its just a thought since the HTMLloader has access to the javascript window object(or am i wrong). Would it be possible to access a custom function as a prototyped property of the window Object.
Any form of tip/clarification will be appreciated.
thanks!Use the HTMLHost class. You create a subclass of HTMLHost and override certain methods that are called in response to certain JavaScript behaviors. Then you assign an instance of your HTMLHost to the HTMLLoader's htmlHost property. (Since you're using the Flex HTML component, you would assign your HTMLHost subclass instance to the HTML control's htmlHost property.)
-
What is custom raised event?
Hi,
What is custom raised event in OPA.
I heard that at the time of OPA online training in last week.The built in Error and Warning events allow you to do things imperatively at run-time. E.g. validate that certain data pre-conditions are not violated with data being passed from an external system.
For example:
Error(“age must be a whole number of years”, age) if
round(the person’s age, 0) <> the person’s age
The custom event mechanism provides an extensible way of flagging other things imperatively if certain conditions are met.
For example:
raiseevent LogExternalAccess( "External access by user:", the user's id, CurrentDateTime() ) if
the user's category is external
Where "LogExternalAccess" in this case is the name of an event for which an inferencing listener has been created in Java or C# to look for, and perform some action, such as writing the information provided to the event to a log file.
Davin. -
FRM-40735 WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-065
Please help....This error is comming when opening the form. The form is running on oracle 11g 64bits web logic.
"FRM-40735 WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-065"Welcome to OTN
Before posting on this forum please read
FRM-40735: WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06502.
you'll get some hint here
Oracle/PLSQL: ORA-06502 Error -
How to enqueue custom AWT event?
hi,
in my applet I need to use custom AWT events. I subclass them from java.awt.AWTEvent and set their id to higher as AWTEvent.RESERVED_ID_MAX - as recomended in documentation.
But how to enqueue such event? A tried to use following approach:
getToolkit().getSystemEventQueue().postEvent( myEvent );
and it works fine - but only in browsers usings Sun's VM implementation. In browsers using Microsoft's VM I'm getting following exception:
com.ms.security.SecurityExceptionEx[matlu/client/ClientConnection.enQueue]: Event queue access denied.
So the question is: is there any other way to enqueue custom event, which will keep Microsoft's security manager happy?
thak you very much
Lubo MateckaI know it must be visible... (But it doesnt have to be bigger than 1 pixel...)
The code I posted is just to illustrate the idea.
If you need to post multiple events you just replace the AWTEvent member with a LinkedList (or some similar FIFO).
Then in postEvent you do theLinkedList.addFirst(yourEvent)
And in paint() you do AWTEvent ev = (AWTEvent)theLinkedList.removeLast();
process ev.
if(theLinkedList.size() > 0)
repaint();Yes. I have run into the same problem, and I did not use the repaint- trick...
My applet communicates with the server in a separate thread. When a response receives the communication thread should post an event to the AWT- thread to get the response processed.
My solution here is to process the thread in the communicator- thread. This is a bad solution because it might create multithreading bugs.... but it has proven to work ok in practice.
Another example is like this. The use presses the mouse at Component B so that:
1 Component A gets a focusLost event.
2 Component B gets a mousePressed.
3 I want to do something in component A that should be done after component B has processed the mousePressed event. This can be solved without using events. You just have to write some more code (You are already in the right thread). -
Hello!
I have problem with webutil.pll in runtime.
When i run my form i get the next exception:
"when-custom-item-event trigger raised unhandled exception ORA-06508".
When i moved webutil_core and delimstr to program units the forms run fine.
What can be a problem?
Thanks.Webutil was compiled in my database schema.
I see that if i move my forms in same directory with webutil.pll and then re-attache the pll - no exception in runtime.
When i can remove pll from this directory and my form contunue to work fine.
Do you have any explanation?
Message was edited by:
Aver -
WebUtil gives FRM-40735 When-Custom-Item-Event ORA-06508 when starting form
I have downloaded and installed/configured webutil on RH Linux AS2.1 per the manual and readme file.
( jacob.jar and webutil.jar signed on NT machine per instruction then loaded on LINUX server webutil/lib )
I have incorporated webutil with an existing form as follows:
1. linked webutil.pll
2. subclassed webutil from webutil.olb
3. compiled all
4. compiled module
Form was deployed on 9iAS.
When the applet loads the following is displayed in the java console:
Downloading http://myserver.mydomain.com:7779/forms90/webutil/webutil.jar to JAR cache
Loading http://myserver.mydomain.com:7779/forms90/java/f90all_jinit.jar from JAR cache
Loading http://myserver.mydomain.com:7779/forms90/java/pfs.jar from JAR cache
Downloading http://myserver.mydomain.com:7779/forms90/webutil/jacob.jar to JAR cache
Loading http://myserver.mydomain.com:7779/forms90/java/f90all_jinit.jar from JAR cache
Loading http://myserver.mydomain.com:7779/forms90/java/pfs.jar from JAR cache
RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
connectMode=HTTP, native.
Forms Applet version is : 90270
When the form containing webutil is called, the following is displayed in the java console and the error mentioned in this topic's subject is given:
2003-Jul-10 16:53:32.607 WUI[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
2003-Jul-10 16:53:32.707 WUF[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
2003-Jul-10 16:53:32.738 WUH[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
2003-Jul-10 16:53:32.758 WUS[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
2003-Jul-10 16:53:32.798 WUT[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
2003-Jul-10 16:53:32.998 WUO[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
2003-Jul-10 16:53:33.38 WUL[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
2003-Jul-10 16:53:33.58 WUB[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
Why can't webutil find the bean method/function?Per a previous suggestion, I have created a simple form module with one block containing a single push_button.
The when-button-pressed trigger contains a simple call to client_get_file_name.
I then:
1. Attached the webutil.pll
2. subclassed webutil from webutil.olb
3. compiled all plsql
4. created then deployed fmx
The same errors are generated when this simple form loads without any calls to webtuil.
I added the following debug code to the when-custom-item-event triggers of each bean area item in the webutil block:
declare
dataType pls_integer;
dataPayload varchar2(32000 char);
begin
WEBUTIL_CORE.CustomEventHandler(:SYSTEM.CUSTOM_ITEM_EVENT,:SYSTEM.CUSTOM_ITEM_EVENT_PARAMETERS);
exception
when others then
get_parameter_attr(:system.custom_item_event_parameters,'WUC_DATA',dataType, dataPayload);
pfsutil.dbug(get_application_property(current_form_name)||'-WebUtil: '||'Item: '||:system.trigger_item||' Event: '||:system.custom_item_event||' :'
||'Data: '||dataPayload||' Error: '||sqlerrm);
end;
The following information is captured in the log:
17:07:59 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_CLIENTINFO_FUNCTIONS Event: WUC_REGISTER :Data: WUI|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
17:08:55 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_FILE_FUNCTIONS Event: WUC_REGISTER :Data: WUF|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
17:08:58 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_HOST_FUNCTIONS Event: WUC_REGISTER :Data: WUH|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
17:08:59 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_SESSION_FUNCTIONS Event: WUC_REGISTER :Data: WUS|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
17:09:00 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_FILETRANSFER_FUNCTIONS Event: WUC_REGISTER :Data: WUT|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
17:09:01 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_OLE_FUNCTIONS Event: WUC_REGISTER :Data: WUO|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
17:09:03 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_C_API_FUNCTIONS Event: WUC_REGISTER :Data: WUL|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
17:09:04 WEBUTILTEST-WebUtil: Item: WEBUTIL.WEBUTIL_BROWSER_FUNCTIONS Event: WUC_REGISTER :Data: WUB|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
This may be initiated by Webutil_core.initWebUtil and the result of Webutil_core.registerBean?
This following error information is captured when the push button is pressed:
17:09:08 WEBUTILTEST-WebUtil: Item: MAIN_BLK.TEST_BUT Event: WUC_REGISTER :Data: WUB|192.168.111.2|Windows NT|Administrator|;|\|en Error: ORA-06508: PL/SQL: could not find program unit being called
Hope this helps.
Thank you for the quick responses. -
FRM-40735- when-custom-item-event trigger raised.
hi all
while logging in i am getting the following error.
FRM-40735- when-custom-item-event trigger raised unhandled exception ORA-06508.
and when i press the button then getting the following error.
FRM-40735-when-button-pressed trigger raised unhandled exception ORA-06508.
plz help me out.thanks in advance.
sarahSarahSarahSarah wrote:
Yes i am keeping the path but i checked without path too.I want to regenerate webutil.plx.i tried by using ctrl+t ,shift+ctrl+k and ctrl+k but it did not generat plx.what should i do to regenerat plx?is it giving any error when you try to generate it using ctrl + t .?
Also try closing the builder
set FORMS_PATH with your working directory (do also keep webutil.pll and webutil.olb) in that.
Open the builder again and try generating -
Frm-40735 when-custom-item-event trigger raised unhandled exceptionora06508
frm-40735 when-custom-item-event trigger raised unhandled exception ora-06508.
While logging in, I am getting the above message,
If I click on ok i am able to proceed and do the task.
My problem here is to remove this error.
Any one plz help out?Welcome to OTN
Before posting on this forum please read
931068 wrote:
frm-40735 when-custom-item-event trigger raised unhandled exception ora-06508.So
ORA-06508: PL/SQL: could not find program unit being called
Cause: An attempt was made to call a stored program that could not be found. The program may have been dropped or incompatibly modified, or have compiled with errors.
Action: Check that all referenced programs, including their package bodies, exist and are compatible. Hope this helps
If someone's response is helpful or correct, please mark it accordingly. -
FRM-40735: WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06502.
Hi Expert,
Forms Version : 11.1.2.1.0
Client JRE : 1.6.0_45-b06 Java HotSpot(TM) Client VM
Run webutil_demo form, http://host:9001/forms/frmservlet?form=webutil_demo.fmx&config=webutil
it appears following error.
FRM-40735: WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06502.
No error logged in java console client side.
I've try to re-compile webutil_demo.fmb
Unattaching and then re-attaching the plsql library webutil.pll to forms using a 11g Forms Builder (instead of earlier version) and then loading the form to the server and compiling form but error still exist.
Will you please help to give any suggestion?
Is there any trace can be enabled to find some more details?Welcome to OTN
Before posting on this forum please read
FRM-40735: WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06502.
you'll get some hint here
Oracle/PLSQL: ORA-06502 Error
Maybe you are looking for
-
Toshiba Lax blinking yellow LED
After witnessing a short 110V power failure while my 42HL67US T/V was in operation, power was restored and the yellow LED is blinking on a three blink/pause pattern. I have tried the unplug/replug attempt and the reset T/V by pressing and hold the co
-
I cannot seem to migrate the full time machine backup from an external hard drive back to the new hard drive. Finder sees the drive and files. When I use Migration managers, it only sees the computer hard drive after I select the time machine optio
-
Restore from Time Machine & OS X install not working
Mid 2009 Macbook Pro Installed new hard drive, reformatted to GUID, hard drive is verified. Booted from USB Recovery HD Selected Restore from TIme Machine Plugged in external, it shows up, click on it, back up from this morning is there, pick new for
-
Auto start GPRS connexion in PPC
Hello I have a Java Application running under Pocket PC and Jeode. If GPRS connexion isn't active in PPC, i need to start manually this connexion in my pda. Internet Explorer is able to start automatically a GPRS connexion without start manually this
-
Hello, board. I wanted to make more space on my small SDD so I followed the Lenovo guide on backing up the recovery to an external drive. Once I was done I formatted the drive and installed Windows 8 fresh and continued to install all the drivers fro