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
Miguel
Sounds 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).
Similar Messages
-
Flex mobile:how can view listen to main application events?
I used to use "this.parentApplication.addEventListener" to listen to main application's events in AIR for desktop. But this seems not working in AIR for Android.
What is the trick? Or what's the new event mechanism?It's now FlexGlobals.topLevelApplication. parentApplication may or may not point to the same thing depending on it's context.
-
ASA5500: TCP state bypass for traffic, coming from IPsec tunnel
Hello!
We have problems on central firewall with restricting traffic coming from remote office from IPsec. (The network sheme is attached)
All branch offices are connected to central asa though IPsec.
The main aim is to rule access from branch offices only on the central firewall, NOT on each IPsec tunnel
According to the sheme:
172.16.1.0/24 is on of the branch office LANs
10.1.1.0/24 and 10.2.2.0/24 are central office LAN
The crypto ACL looks like permit ip 172.16.1.0/24 10.0.0.0/8
The aim is to
restrict access from 172.16.1.0/24 to 10.1.1.0/24
When packets are generated from host 10.1.1.10 to 172.16.1.0/24 all is ok - they are dropped by acl2
When packets are generated from 172.16.1.0/24 to 10.1.1.10 they are not dropped by any ACL - the reason is stateful firewall - traffic bypasses all access lists on a back path
I thought that TCP State Bypass feature can solve this problem and disable stateful firewall inspection for traffic coming from 172.16.1.0/24 to 10.1.1.0/24, but it didn't help.
The central asa 5500 is configured according to cisco doc http://www.cisco.com/en/US/docs/security/asa/asa82/configuration/guide/conns_tcpstatebypass.html
access-list tcp_bypass_acl extended permit tcp 172.16.1.0 255.255.255.0 10.1.1.0 255.255.255.0
class-map tcp_bypass_map
description "TCP traffic that bypasses stateful firewall"
match access-list tcp_bypass_acl
policy-map tcp_bypass_policy
class tcp_bypass_map
set connection advanced-options tcp-state-bypass
service-policy tcp_bypass_policy interface outside
service-policy tcp_bypass_policy interface inside
Does anyone know, how to make TCP State Bypass works properly?I understand the pain of creating diffrent crypto for diffrent tunnels but i never come across better solution. However TCP state bypass is not going to help in regards to restrict access. TCP state bypass is a way to for FW to act like router which does not do statefull and I dont think that fits in your scenario.
You can still control access on center site by using vpn-filters.
http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a00808c9a87.shtml
Thanks
Ajay -
I don't want Adobe to open up and be selected immediately. I work with iPhoto and Ipages etc and preview which needs to be my main application for my work , but need adobe reader for other files... how can I do this please?
loopiloo1 wrote:
I don't want Adobe to open up and be selected immediately.
Sorry, I don't understand this - you don't want Adobe [Reader] not to open when doing what? On what operating system? -
How To Download Free Games & Application For IPhone 4 From Itunes & Store !
Hi guys iam amrit from Nepal I have IPhone 4, I want to download free games & application for iPhone 4 from itunes or application store.Guys please tell me how to download free games & application for iPhone 4 without credit card or debit card.
Log out of any iTunes account on iPhone then go to the app store. Find a free app and purchase it. Create a new account and select none for payment. Pretty simple
http://support.apple.com/kb/ht2534 -
Hi Everyone,
We have a requirement to
Navigate from Custom Component to the Standard Component(IUICCON – Contract
management) on the basis of some conditions.
We tried navigating with Manual
as well Dynamic Navigation. The Navigation is happening properly and the Navigation is completed and we are on the Contract
Management Screen(Standard component View).
On the Contract Management
screen (standard Component view), when we click on New Contract Button; it throws dump stating “Define
Component Usage IUICOBJ”. After debugging we identified that the issue was with the Parent class/ component is getting changed, because of which the usage was not found.
Appreciate your help.
Thanks in Advance.
Regards,
Bhavikjp.Hi Bhavik,
Check which is the active enhancement set at the runtime in the component_loading BADI.
If it is anything other than your enhancement set,Set it to your enhancement set .
Check if the parameter WCF_IGNORE_ENHANCEMT in Tcode SU01 is set to 'A' for the User.
Regards JP. -
Dispatching & listening for custom events from custom component [Flex 4.1]
I'm giving this a try for the first time and I'm not sure I have the recipe correct!
I have a custom component - it contains a data grid where I want to double click a row and dispatch an event that a row has been chosen.
I created a custom event
package oss
import flash.events.Event;
public class PersonChosenEvent extends Event
public function PersonChosenEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
super(type, bubbles, cancelable);
// Define static constant.
public static const PERSON_CHOSEN:String = "personChosen";
// Define a public variable to hold the state of the enable property.
public var isEnabled:Boolean;
// Override the inherited clone() method.
override public function clone():Event {
return new PersonChosenEvent(type);
Then I try to dispatch the event within the component when the datagrid is doubleclicked:
import oss.PersonChosenEvent
dispatchEvent(new PersonChosenEvent(PersonChosenEvent.PERSON_CHOSEN, true, false));
And in the parent application containing the component I do on creationComplete
addEventListener(PersonChosenEvent.PERSON_CHOSEN,addPersonToList);
The event does not seem to fire though. And if I try to evaluate the "new PersonChosenEvent(..." code it tells me "no such variable".
What am I doing wrong?
(It was so easy in VisualAge for Java, what have we done in the last 10 years?? )
MartinI've done this kind of thing routinely, when I want to add information to the event. I never code the "clone" method at all.
Be sure that you are listening to the event on a parent of the dispatching component.
You can also have the dispatching component listen for the event too, and use trace() to get a debug message.
I doubt if it has anything to to with "bubbles" since the default is true.
Sample code
In a child (BorderContainer)
dispatchEvent(new ActivationEvent(ActivationEvent.CREATION_COMPLETE,null,window));
In the container parent (BorderContainer)
activation.addEventListener(ActivationEvent.CREATION_COMPLETE,activationEvent);
package components.events
import components.containers.SemanticWindow;
import components.triples.SemanticActivation;
import flash.events.Event;
public class ActivationEvent extends Event
public static const LOADED:String = "ActivationEvent: loaded";
public static const CREATION_COMPLETE:String = "ActivationEvent: creation complete";
public static const RELOADED:String = "ActivationEvent: reloaded";
public static const LEFT_SIDE:String = "ActivationEvent: left side";
public static const RIGHT_SIDE:String = "ActivationEvent: right side";
private var _activation:SemanticActivation;
private var _window:SemanticWindow;
public function ActivationEvent(type:String, activation:SemanticActivation, window:SemanticWindow)
super(type);
_activation = activation;
_window = window
public function get activation():SemanticActivation {
return _activation;
public function get window():SemanticWindow{
return _window; -
Calendar display issues for "All Day Events" coming from Exchange Server
My problem is with the display of All Day events. I'm running a 3gs, Outlook 2007 on winxp, connected to a Exchange 2007 server. When an all day event is put in for multiple days the phone calendar displays it as starting at midnight going to midnight, and sometimes wont display the event on the list view on the phone. I can correct the display by editing it on the phone and making it all day there, but then the category I assigned the event in outlook goes away in outlook. All day single day events work just fine. Any suggestions?
Sort of same issue:
All day events scheduled from Entourage display incorrectly on iPhone/iPad as non-all-day events (which block out entire day/multiple days)
All day events scheduled from iPhone/iPad show up correctly in Entourage as all-day events, but incorrectly with an *extra day* added. -
Application for importing videos from a digital camera
I have a Canon PowerShot SD100 that I got a year and a half ago. It came with a CD that included software that could be used to import both the pictures and videos it took. However, after installing it, the CD got lost, probably ended up in the trash, and now I have no way to import the videos onto my new computer. (I use iPhoto for the pictures.)
Canon doesn't have a version of that same software, called ImageBrowser, available for download, and I've looked on my computer, but I can't seem to find any application that I could use to import the videos.
If anyone knows of a free application that would let me import my videos, I'd greatly appreciate it.
Thanks a ton!
JillI don't use any software for importing videos from my camera I take the memory card out the camera. I insert it into my card reader. The memory card mounts on my desktop I can then drag and drop the movies from the card into my movies folder.
-
Value Help for a field from custom table in BSP
Please let me know, the procedure to create value help for a field from a custom table in BSP using HTMLB.
Thankshi prodigy,
check this code using drop down list.
<b>layout for first page</b>
<htmlb:dropdownListBox id = "ddlist"
table = "<%=t_mara%>"
nameOfKeyColumn = "matnr"
nameOfValueColumn = "matnr"></htmlb:dropdownListBox>
<b>event Oninitialization event of first page</b>
SELECT MATNR UP TO 10 ROWS
INTO TABLE T_MARA
FROM MARA.
<b> event Oninputprocessing event</b>
**Load the manager class
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
DATA: V_EVENT TYPE REF TO CL_HTMLB_EVENT.
DATA: DATA TYPE REF TO OBJECT.
DATA: V_DATA TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
CALL METHOD CL_HTMLB_MANAGER=>GET_EVENT
EXPORTING
REQUEST = RUNTIME->SERVER->REQUEST
RECEIVING
EVENT = V_EVENT
IF V_EVENT->NAME = 'button' AND
V_EVENT->EVENT_TYPE = 'click'.
DATA ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST =
RUNTIME->SERVER->REQUEST
NAME = 'inputField'
ID = 'matnr'
V_DATA ?= DATA.
IF V_DATA IS NOT INITIAL.
V_MATNR = V_DATA->SELECTION.
ENDIF.
NAVIGATION->SET_PARAMETER( NAME = 'v_matnr' VALUE = V_MATNR ).
NAVIGATION->GOTO_PAGE( 'detail.htm' ).
ENDIF.
<b>in the onInitialization event for detail page</b>SELECT MATNR
ERSDA
ERNAM
LAEDA
AENAM
VPSTA
PSTAT
LVORM
MTART
FROM MARA
INTO TABLE T_MARA
WHERE MATNR = V_MATNR. -
Ageing analysis for advances received from customer
Hello All,
Please can anyone provide inputs on whether there are any standard reports in SAP that can provide ageing analysis of advances received from customer (posted using special GL indicators).
Thnx in advance.
Regards,
SudeepHi,
In Report S_ALR_87012168 you get which are due and which are not due (you can see per Special GL Indicator wise also)
If you think this will not suffice your requirement (like you would like to see 1-30 days, 31-60 days and so on)
I would suggest
You create a form in FDI4 - refer FDI5 and FDI6 for standard forms (you can even write own formulas)
Assign the form to report in FDI1 - refer FDI2 and FDI3 for standard reports.
Hope this will help you.
Regards,
Ravi -
Inspection lot with stock tab for sale return from customer.
Dear,
In our organization there are two scenarios,
1) Make to order- Strategy group -20
2) Make to stock- Strategy group -10
I have maintained 05 inspection types in QM view for sale return inspection from customer.
1) In make to order scenario Inspection lot created with inspection stock tab which is OK.
2) But in make stock scenario no inspection lot is generated.
Remember I donu2019t want inspection lot without inspection stock tab as per insp. type-06
So please suggest me, what can I do for getting inspection lot with stock tab for make to stock scenario.
Regards
Shabbir KureshiHi
QCC0>Quality inspection>Inspection lot creation>Inspection for shipping>Assign Inspection Lot Origin to Delivery Type-->aganist delivery type Enter 05 inspection lot origine
Also in OMJJ check whether QM in active for mnt type 651
Regards
Sujit -
Can't receive events with a custom component
I am using the MDIPanel created by Christophe Coenraets in
the Sales Builder demo code in Flex 2. However, this custom
component (MDIPanel) doesn't seem to receive regular events other
than the custom events. The MDI Panel source code is included as
entails. Since it extends Panel, I assume that it would get all
regular events coming in but it is not. For example, I can't use
resource bundle to change the label text or I can't seem to get
dataprovider to work within a datagrid inside the MDIPanel. Any
ideas on what's happening here?
package
import mx.core.UIComponent;
import flash.events.MouseEvent;
import flash.events.Event;
import mx.controls.Button;
import mx.events.ResizeEvent;
import flash.display.Graphics;
import mx.managers.CursorManager;
import mx.containers.Panel;
import mx.controls.Image;
import mx.controls.Label;
import mx.states.SetStyle;
public class MDIPanel extends Panel
// Constants for MDI panel event names
public static var MINIMIZE:String = "minimize";
public static var MAXIMIZE:String = "maximize";
public static var CLOSE:String = "close";
public static var RESTORE:String = "restore";I'm curious to know if this is possible as well (or really the question should be, is there a non-hackish way to get a reference to the skin instance)?
When I've needed to do something like this, I've always just dispatched an event off a skin part from within my skin. IE.
this.contentGroup.dispatchEvent(...)
Then I would just listen for the event on the skin part.
This is a bit hackish, so it would be nice if someone could share a better solution. I've been meaning to look into it, just never have been able to justify the time looking for a better solution. -
Error when calling bpm service from custom component
Hi all,
I have built a custom component in order to fetch task related data by calling a bpm service inside the method of my custom service.
This is the error trace i got in audit info.
"not loading page MSG_PAGE because it is up to date with timestamp 1324331008000
Script stack dump (user: abc, request: IdcService=CUSTOM_SERVICE&dDocName=ABC018005)
No resource include or function stack for error. "
What does this error signify?
In the service definition of my custom service, I am using MSG_PAGE as my template. Is it related to this why i am facing the error? how do i get to know for a particular functionality i should use a particular template?
Please provide your inputs asap.
Thanks in advance.HI jiri,
Please have a look at the stacktrace and provide me a solution as in how to overcome the error.
I had included Report.trace in order to check the flow of the program and found that the problem arises when i establish the connection.
Caused by: java.lang.IllegalArgumentException: interface bpmpackage.TaskQueryService is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
at weblogic.wsee.jaxws.spi.ClientInstance.createProxyInstance(ClientInstance.java:143)
at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:855)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:344)
at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:792)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
at javax.xml.ws.Service.getPort(Service.java:92)
at bpmpackage.TaskQueryService_Service.getTaskQueryServicePort(TaskQueryService_Service.java:97)
at package.BPMConnection.getService(BPMConnection.java:58)
at package.classname.fetchTasks(classname.java:239)
at package.classname.InboundServiceMethod(classname.java:311)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:324)
at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
Thanks in advance. -
How to get an event both in custom component and into its instance
I have a custom component that extends a Jtree
I want to know when a node is clicked both , into my component and after into the component sited into Jpanel
now, I can only detect it into the component, but I dont know how to detect it at the component I have in my Jpanel
I have 'addTreeSelectionListener' in both places ...
xxxxx.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
public void valueChanged(javax.swing.event.TreeSelectionEvent e) { .....
Any help ?
Thankstonnot wrote:
Thank you.
I think that a good answer can be ' Revise your code, because there must be a problem' Well, that's the life of a programmer. If you want to post an SSCCE, I'm sure somebody can help if you get stuck.
And ...
Why are you extending JTree? I'd bet you shouldn't be.Why not ? ....
Why SUN develop the 'extends' functionality ? You should use extends if you're changing the behavior of an existing class. An example of this is extending JPanel and overriding the paintComponent() method to do some custom painting.
You should not use extends if you just need an instance of an existing class. An example of this is extending JFrame instead of simply creating a JFrame instance.
Without seeing your code, I can't be sure you're misusing extends. But many people do.
Here's an example.
Bad:
public class MyProgram extends JFrame{
public MyProgram(){
setSize(200, 200);
setVisible(true);
public static void main(String [] args){
new MyProgram();
}Better:
public class MyProgram{
public MyProgram(){
JFrame frame = new JFrame();
frame.setSize(200, 200);
frame.setVisible(true);
public static void main(String [] args){
new MyProgram();
}
Maybe you are looking for
-
Purchase Requisitions created instead of Schedule lines
Hi Experts, When I run MRP for materials with mrp type as PD, MRP creates Purchase Requisitions instead of Schedule lines I have Scheduling agreement in place. Kindly let me know what could be the possible reasons for this Thanks & regards, Shashidha
-
Java 1.4.2_04 seriosuly hanging IE6 SP1 in WinXP SP-1
It's best if I repeat what I have sent to SunSolve and what I've placed in the plug-in feedback form. I am at my wits-end. Over several days I have tried as much as I can without any success. I may perform an in-place upgrade, but only after the rele
-
SDM not working after upgrade to SP12
I have just upgraded my Netweaver from SP9 to SP12. After doing the upgrade, SDM no longer runs and attempting to manually start it also fails. A colleague of mine who also installed SP12 has the same problem. Any suggestions? Walter
-
Convert BW3.x Start routine coding into BW 7.0
The reversal load Update Rules (ICS IC_TR) Start Routine PROGRAM UPDATE_ROUTINE. $$ begin of global - insert your declaration only below this line - TABLES: ZCHAR_SUBST. DATA: sy_tabix like sy-tabix . $$ end of global - insert your declaration onl
-
Hi how can I move the main text in the "San Fransisco CV" up. The name thats in the "box" as the "adress" ect, is easy to move up... But the main text please... BR, D