Get custom component name

Hi all,
I have a canvas with few custom components like:
<mx:Canvas id="test" width="100%" height="100%">
     <custom:Form01 id="Form01_mxml" visible="false" x="0" y="0"/>
     <custom:Form02 id="Form02_mxml" visible="false" x="0" y="0"/>
     <custom:Form03 id="Form03_mxml" visible="false" x="0" y="0"/>
     <custom:Form04 id="Form04_mxml" visible="false" x="0" y="0"/>
</mx:canvas>
From a menu I setup the visibility to true to show the component that I want.
I would like to know what custom component is visible after a result of an event. Is this posible?
I know I can do multiple if statements to see what component is visible or not like:
if (Form01_mxml.visible ==  true) do something
But I have many components and I would like to find the name dynamic.
Thanks
Johnny

Hi Johnny,
Try this it will work I have tested it...
var myComp:String = VS.selectedChild.id
var selChild:* = myViewStack.getChildByName(myComp) as DisplayObject;
if(selChild.hasOwnProperty("init"))
     selChild.init();
Try this and let me know..
Thanks,
Bhasker 

Similar Messages

  • How to get the component name in webdynpro

    Hi all,
            how can i get the name of the webdynpro component. The component is being displayed in the portal. Now i need the component name for this.Can any one suggest of how to get this.
    Regards,
    Kalyan Chakravarthi.M

    Hi ,
    get the object of  IF_WD_COMPONENT , by calling the method wd_get_api( ) of wd_component attribute , then call the method GET_COMPONENT_INFO( ) ,it will return the object of IF_WD_RR_COMPONENT in that call the method GET_NAME( ) .
    Regards
    Yash

  • How to get WD component name or application name

    Hi ,
    Is there any sap standard variable where webdynpro component name or application name get store like SY-CPORG.
    Thanks And Regards,
    Rohit

    Hi,
    You can get the application name using below code:
    DATA : lr_api      TYPE REF TO if_wd_component,
              lr_app      TYPE REF TO if_wd_application,
              lr_app_info TYPE REF TO if_wd_rr_application,
              lv_app_name TYPE string.
       lr_api = wd_comp_controller->wd_get_api( ).
       CALL METHOD lr_api->get_application
         RECEIVING
           result = lr_app.
       CALL METHOD lr_app->get_application_info
         RECEIVING
           result = lr_app_info.
       CALL METHOD lr_app_info->get_name
         RECEIVING
           result = lv_app_name.
    Now pass the lv_app_name to the FM.
    hope this helps u,
    Regards,
    Kiran

  • How to get custom file name in manually generated SSRS report

    Hi,
    I am creating a SSRS report which would be executed by User manually through ReportServer URL.User would be generating the SSRS report for different Customer ID based on ad-hoc basis.
    I am passing CustomerID as input parameter to the report. Is there any way to get the manually generated SSRS report name as 'Report_CustomerID_TodayDate.xls'. Please let me know.
    E.g.If User is generating report for Customer ID 123 today then report name should be 'Report_123_07092013.xls'
    Thanks for your help in advance.
    Thanks,
    Abhiyanta

    Hi Amar,
    If possible Can you please provide the custom code to rename the exported file in SSRS.
    Thanks in advance,
    Regards,
    Jagan

  • How to get custom field name and value in data table using csom

    i am using using this code but iam not getting FieldValues property..
     internal void ReadProjectCustomFields(string strProjectName)
                string url = "https://techwhizepm.sharepoint.com/sites/rnd/";
                using (ProjectContext projContext = new ProjectContext(url))
                    SecureString passWord = new SecureString();
                    foreach (char c in "Pass@word123".ToCharArray()) passWord.AppendChar(c);
                    projContext.Credentials = new SharePointOnlineCredentials("[email protected]", passWord);
                    projContext.Load(projContext.Projects, o => o.Where(i => i.Name == strProjectName));
                    projContext.ExecuteQuery();
                    foreach (PublishedProject _t in projContext.Projects)
                        DraftProject dftproj = _t.Draft;
                        //CustomFieldCollection custs = dftproj.CustomFields;
                        CustomFieldCollection custfs = dftproj.CustomFields;
                        projContext.Load(dftproj);
                        projContext.Load(custfs);
                        projContext.ExecuteQuery();
                        ddlcfields.Items.Clear();
                        if (!custfs.Count().Equals(0))
                            ddlcfields.DataSource = custfs.AsEnumerable().Select(o=>o.Name);
                            ddlcfields.DataBind();
                        DataTable dt = new DataTable();
                        dt.Columns.Add("Name", typeof(string));
                        dt.Columns.Add("InternalName", typeof(string));
                        dt.Columns.Add("FieldType", typeof(string));
                        //dt.Columns.Add("FinishDate", typeof(string));
                        DataRow dr = null;
                        foreach (CustomField _cust in dftproj.CustomFields)
                            dr = dt.NewRow();
                            dr["Name"] = _cust.Name;
                            string intername = _cust.InternalName;
                            dr["FieldValue"] = dftproj[intername].ToString();
                            //dr["FinishDate"] = _task.Finish;
                            dt.Rows.Add(dr);
                        GridView1.DataSource = dt;
                        GridView1.DataBind();

    I am looking through the API calls in FDM Workbench, but cannot see the table (tPOVPartitions) you mentioned listed. Is this the correct name? And do I just use the function listed in the object browser to run the query?
    Furthermore (going back to my initial thoughts of using strFile), it appears that although the variable contains the .Dat filename and path, the actual file is non-existent when "BefExportToDat" is executed:
    Error:
    Error: Export failed.
    Detail: File not found.
    This would make sense, but it does make the variable "strFile" a little pointless since one cannot make use of the file in this particular event script. Do you please have any thoughts on this?

  • How to get the name of a (custom) component

    Hi,
    I would like to know whether there is a way to get the name Xcelsius uses for instance in the Object Browser. Getting the components "name" property doesnt return this information.
    Thanks in advance.

    String myFileName = request.getRequestURL().substring(request.getRequestURL().lastIndexOf("/")+1);
    or with javascript
    <H1><script>document.write(document.location.href.substring(document.location.href.lastIndexOf("/")+1))</script></H1>
    bye! :)

  • How do I get the file names on a customized proof sheet?

    How do I get the file names on a customized proof sheet?

    Actually, I really don't know what you say.
    But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
    Therefore, I would like to know the size on disk but not just the size.

  • A Custom Component and the JSP source that get's generated

    I'm writing a Custom Component library and I'm at a point where I need to understand how the JSP source that gets generate when my component is dragged from the palete is created and how it relates to the properties I define in the Metadata files.
    In particular I have a component that is an extension of the DataTable component and I'd like to control what get's dropped onto the page when the user drags over my component.
    Don

    See the "Building and Customizing JavaServer Faces Technology Components" technology theme page at http://developers.sun.com/prodtech/javatools/jscreator/reference/themes/buildingjsf/index.html. The Hands-On Examples and "Design-Time API User Guide (pdf)" linked from that page should help.

  • How to get Name 2 also when we search for a customer using 'Name' as search

    In XD03, when I am searching for Customer using ‘Name’ as Search term I am getting postal code, Name1, City, Customer no. I want Name2 also to be displayed. Can somebody please suggest.
    Thank you.

    hi,
        for this you will have to change the search term involved during the master data creation.
    now during the creation of customer master data , enter the name as the search term in the data base.
    if possible change the database of customers and insert the name in the search term.
    without it, it will be really difficult to locate the customers with the search term as their name
    regards,
    Siddharth.

  • How to get customer number and name from the SD document

    Hi All,
    Can you please let me know how to get Customer Number and Name from the SD Document?
    Thanks a lot....
    Anil

    Hi,
    It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
    regards,
    radhika
    Edited by: kolipara radhika on Jul 10, 2009 5:32 AM

  • Getting component name

    Guys,
    I want to find the component names of my dynamic table
    ASSIGN COMPONENT  sy-index
             OF STRUCTURE <wa_table> TO <dyn_field>.
    I know there are couple of threads but they are confusing, I tried using one of the method
    ref_table_des ?=
    cl_abap_typedescr=>describe_by_name( p_data = <t_dyn_table> ).
    idetails[] = ref_table_des->components[].
    but then I get an error as formal parameter p_data  does not exist.

    Check this Example.
    DATA : sflighttype type ref to cl_abap_structdescr,
          comp_tab    type cl_abap_structdescr=>component_table.
    field-symbols: <wa_comp> like line of comp_tab.
    sflighttype ?= cl_abap_typedescr=>describe_by_name('SFLIGHT').
    comp_tab = sflighttype->get_components( ).
    LOOP AT comp_tab ASSIGNING <wa_comp>.
      write : / <wa_comp>-name.
    ENDLOOP.
    In your case.
    it should be
    ref_table_des ?=
    cl_abap_typedescr=>describe_by_name( <t_dyn_table> ).

  • 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 ?
    Thanks

    tonnot 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();
    }

  • Navigating from Custom Component to Standard Compoent(IUICCON). Getting Exception "Define Component Usage 'Random Component Usage of Standard component'"

    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.

  • Getting port no of UCM server in which custom component is installed

    Hi All,
    I have an requirement to get an port no of UCM server in which custom component is installed.
    Is there any way to get the port information using intradocBinder ?

    Try the following:
    SharedObjects.getEnvironmentValue("IntradocServerPort");
    http://jonathanhult.com/intradoc-api/intradoc/shared/SharedObjects.html
    Jonathan
    http://jonathanhult.com

  • Pass a parameter to custom component -  get null

    Main MXML (part of code):
    <s:Application
    xmlns:ns1="*"
    creationComplete="init();>
    import MyComponent;
    private function init():void {
    var myArray:Array=["FFF","TTT","RRR"];
    myComp.width=200;
    myComp.height=200;
    myComp.getArray = myArray;
    myContainer.rawChildren.addChild(myComp);
    <fx:Declarations>
    <ns1:MyComponent id="myComp" x="0" y="0" />
    </fx:Declarations>
    custom component:
    package
              public var getArray:Array;
    public class MyComponent extends Sprite { trace (getArray);//trace null

    What is myContainer?
    I have a working version with my container as UICOmponent inside main.
    public class MyComp extends Sprite
            private var _getArray:Array;
            public function MyComp()
            public function get getArray():Array
                return _getArray;
            public function set getArray(value:Array):void
                trace("setter ", value);
                _getArray = value;
    <?xml version="1.0" encoding="utf-8"?>
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:ns1="*"
                   minWidth="955" minHeight="600"
                   creationComplete="init();">
        <fx:Script>
            <![CDATA[
                private function init():void {
                    var myArray:Array=["FFF","TTT","RRR"];
                    myComp.width=200;
                    myComp.height=200;
                    myComp.getArray = myArray;
                    myContainer.addChild(myComp);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <ns1:MyComp id="myComp"/>
        </fx:Declarations>
        <mx:UIComponent id="myContainer"/>
    </s:Application>
    Not sure this is what you after though but it traces:
    setter  FFF,TTT,RRR
    Why do you add to rawChildren?
    C

Maybe you are looking for

  • RECALL- iPhone 3g adaptor

    Apple announced the Apple Ultracompact USB Power Adapter Exchange program because of the following: "Apple has determined that under certain conditions the new ultracompact Apple USB power adapter's metal prongs can break off and remain in a power ou

  • ORA-01843 when db nls_date_format=MM/DD/YYYY

    RMAN> backup recovery files; Generates errors: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ===============================================

  • Alternate Boot Environment disaster

    Hi - hoping someone can help me with a small disaster I've just had in trying to patch one of my SPARC T4-1 servers running zones using the patch ABE method. The patching appeared to work perfectly well, I ran the following commands: sudo su - zlogin

  • Time machine is a disaster

    Time machine is a disaster ! Every hour it completely duplicates my entire hard drive, not just the changes. To make matters worse, it doesn't let me delete the duplicate copy on the external hard drive. I had to turn Time Machine off or my external

  • SGP521 won't Update.

    Hi Guy's, I just got the Z2 LTE version and i'm stuck on the 17.1.A.2.36 build. Companion says it's up to date but sony australia site says .55 is the newest. How does one force update?