How to call method of parent in popup window

i hav one.mxml file which consist of getData() method
and two.mxml which is popup window having one button i want to call getData() method on button click.
waiting for reply.

Usually you would dispatch an event and parents will listen for certain events.
If you are dispatching an event yourself, you can set it to bubble up all the way so whoever is interested will act upon.
In your case, the button click will generate MouseEvent with type of MouseEvent.CLICK.
All you need to do is listen for it.
private function showPanel():void {
     var dlg:Panel = new Panel();
     var btn:Button = new Button();
     dlg.addChild(btn);
     dlg.width = 300;
     dlg.height = 200;
     dlg.addEventListener(MouseEvent.CLICK, sayHello, true);
     PopUpManager.addPopUp(dlg, this, true);
     PopUpManager.centerPopUp(dlg);
private function sayHello(event:MouseEvent):void
     trace("button in panel clicked");

Similar Messages

  • How to Call Methods in Ecatt?

    Hello Gurus,
    I dont find CALLMETHOD or CALLSTATIC commands in Ecatt. I am using R/3 4.7 version of SAP.
    My question also is how to call methods. I have a scenario where my test script execution depends on the return type of method. Say if the return type of method is A only then I should run the script else the script should not be executed.
    Your help in this regard is highly appreciated.
    Regards,
    GS.

    >
    Get Started wrote:
    > Hello Gurus,
    >
    > I dont find CALLMETHOD or CALLSTATIC commands in Ecatt. I am using R/3 4.7 version of SAP.
    >
    > My question also is how to call methods. I have a scenario where my test script execution depends on the return type of method. Say if the return type of method is A only then I should run the script else the script should not be executed.
    >
    > Your help in this regard is highly appreciated.
    >
    > Regards,
    > GS.
    Hi GS,
    Please use the command "CallMethod" and it is available with latest SAP version.
    You have to provide the Object Instance Parameter and Instance Method.
    Regards,
    SSN.

  • How to call method of Component A in Component B

    Hi Friends,
    I want to use Method A of Component A in Component B. Can some one tell me how to call method A on action of a button in component B.
    Regards
    Sankar

    Hi,
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_method( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    DATA lo_interfacecontroller TYPE REF TO yiwci_sg_method .
    lo_interfacecontroller =   wd_this->wd_cpifc_method( ).
      lo_interfacecontroller->execute_method(
           i was able to do the above process successfully but how to bind data to the node of component 2.
    In the component 1 : method A i defiend to get records upto 25 rows. now i tried using same method . but how to bind data using this method
    Regards
    sankar

  • How to call methode on remot computer

    I have 2 Applcations on 2 computers in Network
    App 1 on PC1 send xml file to App2 on PC2
    how to call Methods in App2 on PC2 to read the file
    // clss A on PC1
    class A
    sendFile(){
    // clss B on PC2
    class A
    readFile(){
    how to cal method readFile from Class A on PC1

    By using Remote Method Invocation, the topic of this forum.
    See the Javadoc and the RMI tutorials.

  • Calling Transaction Launcher in custom popup window

    Hello Experts,
    I am facing a issue. I have to call transaction launcher in custom popup window.
    It is working when i am calling transaction launcher in main window. but it is not working when i am trying to call transation launcher in popup window.
    I have written the code to call the transaction launcher in DO_PREPARE_OUTPUT method of popup view.
    Please let me know do i need to do anything extra? I am using CRM 6.0.
    Thanks in Advance
    Rajeev Singh.
    Edited by: Rajeev Singh on Feb 9, 2012 1:08 PM

    Hi Manas,
    I implemented a PopUp component some time ago for this task. There was a tutorial written for something similar here on SDN the link is: https://wiki.sdn.sap.com/wiki/display/CRM/OpeninganURLthroughpop-upfromWEBUIofCRM2007
    In the PopUp you do a followup navigation to the transaction you would like to call:
    data: lr_navigation       TYPE REF TO         if_crm_ui_navigation_service.
    lr_navigation = cl_crm_ui_navigation_service=>get_instance( me ).
      lr_navigation->navigate( iv_link_id         = 'your_logical_link'
                               iv_data_collection = lr_col ).
    lr_col is a BOL collection of any kind of navigational data you need, can be kept empty as well.

  • I want to know  how to call navigate to page in new window.

    Hi,
    I want to know  how to call navigate to page in new window.
    Following is the code which i am using on Event OnInputProcessing.
    navigation->goto_page( 'index.htm' ).
    From the above code i am able to open the index.htm in the same window.
    but I need the index.htm in the new window.
    Please suggest
    Thanks in advance,
    Nilesh Labde

    Thanks ,
    I was able to find the navigatiion tab, But after entering the The Form name in that TAB, Still the New Page opens in ths SAME window.
    Following is the Code written on the Eevent--> OnInputProcessing
    navigation->next_page( 'NEXT' ).
    In the Navigation TAB
    Start                             Navigation Request                Target
    Sales_Person.htm                   NEXT                            index.htm
    Please suggest.
    Thanks in advance,
    Nilesh Labde

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • How to call method in web dynpro for ABAP

    Hi All,
    I created a z class and two methods to get the data.
    I created a WE4A application. Now i want to call these methods from my Z calss in the web dynpro ,but i am getting  amessage saying 'type zclass is unknown".
    when i am trying to declare
    data: cl_class type ref to zclass . i am getting above message.
    can anyone explain how to call zcalss methods in my application.

    Hi,
    You can call any global class method in WDA via. Wizard.
    Even more you can make your class as assistance class and call their methods by wd_assist.
    Thanks
    Pradeep

  • How to call methods at selection screen?

    Hi all,
    I am developing a program in object oriented abap.
    i have defined a class and implementated, and we have to instantiate the class in start of selection.
    now the problem is how to call a method at selection screen event.
    i want to validate the inputs entered by users. so can i create a static method which can be called without instantiating a class?
    please guide me
    thanks

    Hello Mr A,
    Define the method as a Static Method and that will solve your problem. Static methods can be called directly and does not need the class to be instantiated before it can be called.
    Data: my_class type ref to zcl_report_utilities.
    At Selection-Screen.
    Call Method zcl_report_utilities=>check_selections
           exporting
              iv_repnm    = sy-cprog
            importing
              et_messages = lt_msgs.
    Start-Of-Selection.
      Create Object my_class
             exporting
                im_pernr  = ls_e1plogi-objid
                im_begda = c_lowdate
                im_endda = c_hidate.
       Call Method my_class->read_infotypes
              exporting
                 im_infty = c_org_assn
              changing
                 et_infty  = it_infty.
    Here you can see how the method check_selections is called before the class zcl_report_utilities is instantiated. The best part about the Static Methods is if you are writing the class in the Class Library (SE24), any other programs can call them directly (if they need to) without needing to instantiating the entire class before the call.
    Also note the difference in syntax when calling the static method check_selections to when calling the Instance method read_infotypes.
    Hope this solves your issue and please do not forget to reward points.
    Cheers,
    Sougata.
    p.s. if you are defining your class locally (program specific) then use Class-Methods to define a static method.
    Edited by: Sougata Chatterjee on May 1, 2008 9:53 AM

  • How to call methods from string names?

    On my java project i have a front controller. All the requests will first go to controller and i will make parameter validation on the controller level. If validation is completely ok, page will be dispatched to real servlet with validated parameters.
    If the request pattern is "photos" for example i will call static function and send referance of request object Validation.Photos(request); or if the pattern is "albums" function will be Validation.Albums(request).
    everything is ready on my codes except how to call a Validation function with a string name. Need a clear and a fast way because on every request i will do this.
    Thank you

    ahh life is problem;) another one i couldnt understand.
    import javax.servlet.http.HttpServletRequest;
    interface Validasyon {
            boolean invoke(HttpServletRequest request,String param);
         class IntIsNumeric implements Validasyon {
           public boolean invoke(HttpServletRequest request,String param) {
                param=request.getParameter(param);
                System.out.println("param="+param);
                try
                     Integer.parseInt(param);
                catch(NumberFormatException e)
                     return false;
                catch(NullPointerException e)
                     return false;
                int gelen1=Integer.parseInt(param);
                if(gelen1<1 || gelen1>Integer.MAX_VALUE)
                     return false;
                return true;
         }i am sending parameter to IntIsNumeric classes's invoke method like below
    Validasyon c=new IntIsNumeric();
    boolean a=c.invoke(request,"photo_id");but IntIsNumeric method does not recognize my input parameters "request" and "param" always return null. Why?

  • How to call method add_column in cl_salv_columns

    Hi ,
            I am devloping one salv report. I am try to call the add_column method , its showing "Access to protected method "ADD_COLUMN" is not allowed".
    But public methods are working fine.
    Please tell me how to call he Protected method .
    Thanks and Regards,
    Vaigunda Raja.

    Hi Giri,
    Thanks for your response.
    Please give the suggestion to me...
    This is my code.
    data: it_vbak type standard table of zfinal with header line,
            obj_alv type ref to cl_salv_table,
            obj_cols type ref to cl_salv_columns,
           a type sap_bool ,
            FNAME TYPE LVC_FNAME .
      select * from vbak into corresponding fields of table it_vbak up to 10 rows .
    call method cl_salv_table=>factory
       importing
         r_salv_table = obj_alv
       changing
         t_table      = it_vbak[].
      perform column_alv.
    perform display.
    form column_alv .
       obj_cols = obj_alv->get_columns( ) .
       call method obj_cols->apply_ddic_structure
         exporting
           name = 'ZFINAL'.
       call method obj_cols->is_optimized
         receiving
           value = a.
       if a ne 'X'.
         call method obj_cols->set_optimize
           exporting
             value = 'X'.
       endif.
    FNAME = 'CHECK'.
      call method obj_cols->add_column
        exporting
          columnname = FNAME
          position   = 1  .
    endform.                    " COLUMN_ALV
    form display.
       call method obj_alv->display .
    endform .                    "display
    "Error Message: Access to protected method "ADD_COLUMN" is not allowed."

  • How to call method in JCD - which will execute prepared statement

    Hi All,
    I have a scenari where I have to call method in JCD, where in this method I have to execute prepared statement and return value.
    Please suggest me how to do this.
    Thanks & Regards,
    Anitha.B

    hi bolla,
    this is 100% java code. can you elaborate a little more what is your exact problem?
    i think your scenario is easy to accomlish.
    regards chris

  • How to call the grand parent constructor from the child ??

    Hi All,
    I am having 3 classes.
    Class A.
    Class B extends Class A.
    Class C extends Class A
    i need to call the constructor of ClassA from Class C. how to call ??
    Thanks,
    J.Kathir

    Each class will implicitly call the parent default constructor if you do not call it in the code ie
    super();However you can call any of the parent constructors ie
    class Parent {
        int value;
        Parent(int v) {
            value = v;
        public void display() {
            System.out.println(value);
    class Child extends Parent {
        Child(int v) {
            super(v);
        public static void main(String[] args) {
            Child c = new Child(10);
            c.display();
    }

  • Syntax for how to call method of one comp in other comp     wd java.

    Let us assume,
    there is method1 in view1 comp1.
    tell me syntax for calling method 1 in view2 comp2
    thanks in advance.
    Edited by: madhu1011 on Nov 9, 2011 11:31 AM

    Hi Madhu,
    This is the situation:
    comp1-> method 1 , view1
    comp2-> view2
    You need to access method1  in view2 of comp2.
    For that, do the following steps:
    1.) First create a method (for eg: method1) in comp1 (under implementation of view1).
            eg: public void method1(){
                    <......some logic...>
    2.)Save the meta data.
    3.) In comp2, you will find an option called used components. In that right click and add the component comp2. (Carefully select comp1 itslef).
    4.)Save the meta data.
    5.) Then go to view2 of comp2 and take implementaion part and right the following logic in wddoinit() (or any other standard or custom method).
    wdThis.wdGetComp2Interface().getMethod("method1"); 
    By this way, we can access the method1 of comp1 in comp2.
    Regards,
    Jithin

  • How to Call Methods of one component into another Component

    Hi Experts,
    I have one requirement...
    I have 2 components A and B, i used A comp in B, i need to call Comp A methods in Component B, can anybody give me the syntax?? please...
    Thanks and Regards,
    Kissna.

    Hi Manas Thanks for your fast reply,
    My question is, for example we have wd_comp_controller or wd_this objects to call methods of view from view and comp controller right.. like this we have any methods to call used component methods? if yes can u please give me the objects syntax?...
    Thanks and regards,
    Kissna.

Maybe you are looking for

  • Install XI 3.0 on Windows Xp

    Hi, I want to install XI3.0 on my laptop, can I install in my laptop which has Windows XP? else which Windows platform is required, any inputs pls Prahllad

  • Issues Upload Excels: FM 'HR_KR_XSTRING_TO_STRING' don't exits

    Hi all, I'm trying to upload an excel sheet using WDA, I find a lot of  links like [this|http://wiki.sdn.sap.com/wiki/display/WDABAP/ExcelFileUploadAndDisplayDataUsingWebDynPro+ABAP] for do it. But in almost all use the FM HR_KR_XSTRING_TO_STRING. In

  • Axis Type Mapping problem,please help!!!

    i want to try out the encoding subsystem of axis,so i write an interface like this: public interface BookStore {     public Book[] getAllBooks(); }I use the Java2WSDL to generate the wsdl file and WSDL2Java to generate the client/server side bindings

  • Problems selecting object to align to

    I'd love to understand how Illustrator decides which object is the key object when using the "Align to Key Object" function. For me, it decides on the wrong object an uncanny percentage of the time. You'd think it would do as well as random chance, b

  • Cancel button help

    hi im still fairly new to java and i was just wondering how i would go about making a cancel button for my JOptionPane boxes also i have an array that when its searched it displays the result in JOptionPane windows, but if there are more than one res