How element access or a main mxml module method?

Hello

In my application, I created a module within which I said a button and the method. I can access these objects/menthods of main mxml?

There was this doc for flex 3 very useful, not sure that if there is a version update for flex4, however the basic principles are still standing.

http://blogs.Adobe.com/FLEXdoc/files/FLEXdoc/PDFs/modular.PDF

Tags: Flex

Similar Questions

  • How to access the elements in main.mxml file ActionScript?

    I'm having problems creating a panel using the Extension Builder SDK. It seems that all the examples explain how a CS5 document using a control panel, but I found no examples of how to control the items in the Panel via ActionScript code.   Furthermore, we use CS Extension Builder SDK with Flash Builder 4.  Here's a simple example of were I'm stuck.

    I create a project Extension generator for a panel of PS named: 'CSExtensionTest '.  In the main.mxml file create a button with id = "btnPSCode".

    ****************************************************************************************** *****************************************

    File:

    hand. MXML

    ****************************************************************************************** *****************************************

    <? XML version = "1.0" encoding = "utf-8"? >

    < mx:Application

    ' xmlns:mx = ' http://www.Adobe.com/2006/MXML " " layout ="absolute" historyManagementEnabled = "false""">

    < mx:Script >

    <! [CDATA]

    [

    Bindable ]

    private var hostName:String = HostObject.mainExtension;

    []] >

    < / mx:Script >

    "" < mx:VBox height = "100%" width ="100%" verticalAlign = "middle" horizontalAlign ="center">

    " < mx:Button id ="btnPSCode"label ="PS code run"click ="CSExtensionTestPhotoshop.run ()"enabled =" hostName.indexOf{('photoshop') >-1}"/ >

    " < mx:Button id ="btnJSXCode"label ="code JSX run"click ="CSExtensionTestJSX.run ()"/ > "

    < / mx:VBox >

    < / mx:Application >

    ****************************************************************************************** *****************************************

    How can I access the properties of this element in the CSExtensionTesJSX.as file?

    ****************************************************************************************** *****************************************

    File:

    CSExtensionTesJSX.as

    ****************************************************************************************** *****************************************

    package

    {

    Import com.adobe.csxs.core.CSXSInterface;

    Import com.adobe.csxs.core.csxs_internal;

    Import com.adobe.csxs.types.SyncRequestResult;

    Import mx.binding.utils.BindingUtils;

    Import mx.core.ButtonAsset;

    Import mx.core.mx_internal;

    Import MX.utils.object_proxy;

    public class CSExtensionTestJSX

    {

    public static function run():Sub

    {

    var myCSXS:CSXSInterface = CSXSInterface.getInstance ();

    var result: SyncRequestResult = CSXSInterface.instance.evalScript ('jsxFunction');

    btnPSCode.enabled = false;

    }

    }

    }

    ****************************************************************************************** *****************************************

    I get this error:

    image001.png

    I had initially written a panel using a Flex project and was able to access the properties of the items in the file main.mxml directly.  It seems that I can't do that.  Did I miss something in the code?  Am I missing some kind of library?  I'm sorry, I'm not very experienced in the development of Adobe, but we are trying to become more involved in the development of plugins and extensions for CS5.  Any help will be greatly appreciated.

    You must pass a reference to your object main mxml in the run method. For example:

    hand. MXML:


    http://www.Adobe.com/2006/mxml"layout ="absolute"historyManagementEnabled ="false">
       
           

    [Bindable]
    private var hostName:String = HostObject.mainExtension;
               
    ]]>
       
       
           
       

    testJSX.as:

    package
    {
    import com.adobe.csxs.core.CSXSInterface;
    import com.adobe.csxs.types.SyncRequestResult;
       
    Import mx.controls.Button;

    public class testJSX
    {
    public static void run(m:main):void
    {
    var result: SyncRequestResult = CSXSInterface.instance.evalScript ("jsxFunction");
    var b:Button = m.myButton;
    }
    }
    }

    HTH.

  • How to access the main .mxml file component control?

    I have a .mxml main while in which I imported custom "popUpWindow" component using the statement "import components.popUpWindow". In main .mxml file, I show more later this component in the form of pop-up window using the Popup Manager class:

    var popUpWin:IFlexDisplayObject;
    popUpWin = PopUpManager.createPopUp (Thi, popUpWindow, true);

    Once the component is displayed, how can I access using the actionscript component TextInput control (specifically the .text property) my main .mxml file?

    Thank you

    bdeen I think you have it bad: P I think he wants to access a property in the main application window.

    Give the textInput id and then on your main application you can do this for example:

    var test: String = popUpWin.textInputName.text;

    Please note that it is recommended to do a casting for the popup window:
    popUpWin = popUpWindow (PopUpManager.createPopUp (Thi, popUpWindow, true));

  • How to access the id of the component from a different mxml?

    I tried to put the data in a DataGrid control to a different mxml, but the compiler said that there is a problem, like this:

    the components/FileDataGrid.mxml:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
         xmlns:s="library://ns.adobe.com/flex/spark" 
         xmlns:mx="library://ns.adobe.com/flex/mx" >
    
        <mx:DataGrid x="150" y="50" id="dgFile">       <mx:columns>
             <mx:DataGridColumn headerText="COL"/>
           </mx:columns>
        </mx:DataGrid>
     
    </s:Group>
    
    

    the main mxml:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
              xmlns:s="library://ns.adobe.com/flex/spark" 
              xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
              xmlns:custom="components.*" layout="absolute">
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         
         <fx:Script>
              <![CDATA[
                   
                   private function loadDG():void
                   {
                        var arrFile:Array= new Array("abc","123");
                        
                        dgFile.dataProvider = arrFile;
                        
                        trace( "The data has successfully loaded" );
                   }
    
              ]]>
         </fx:Script>
         
         <s:Button  x="300" y="50" label="Load"  click="loadDG()" />
    
         <custom:FileDataGrid/>
    
    </mx:Application>
    

    The compile error is:

    Several markers to this line:
    -1120: access of undefined property dgFile.
    -arrFile

    Can someone tell me, how?

    Thank you very much!

    Hi, you cannot access it. To access, first give the id for the custom component that you have added.

    That is to say

    
    

    Then you can view this script,

    custFDG.dgFile.dataProvider = arrFile;
    

    Hope this work shud very well.

    Thank you.

    -

    Afonso

  • How to access page aplication module of dynamic region?

    Hello

    I have a main app with the shared library. Page.JSFF (from the main application) contains dynamicRegion. Task flow for this dynamicRegion I defined in library shared sessionBean. I need call commit action in the main application for the data in a dynamic region.

    How to access the application module or binding operation for page of workflow dynamic region?

    I try to do this:

    BindingContainer bc is BindingContext.getCurrent () .getCurrentBindingsEntry ();.

    DCTaskFlowBinding dtb = (DCTaskFlowBinding) (bc) .findExecutableBinding ("dynamicRegion1") (DCBindingContainer);

    System.out.Print ("" + dtb.getViewPort().getViewId()+"\n"); -return id correct view

    Form JUFormBinding = dtb.findExecutableBinding ("test5PageDef") (JUFormBinding);

    DCBindingContainer dcRegion = form;

    OperationBinding o = dcRegion.getOperationBinding ("Commit");

    o.Execute ();

    but the result is NullPointerException

    Jdev 11.1.2.4

    Thank you

    Hello

    Try this:

    BindingContext bindingContext = BindingContext.getCurrent ();

    DCBindingContainer dcBindingContainer = bindingContext.findBindingContainer("myPageDef");

    OperationBinding operationBinding = dcBindingContainer.getOperationBinding ("Commit");

    operationBinding.execute ();

    Kind regards

    Ruben

  • I've added two elements (accessibility and analyze) in the Tools menu of right hand.  How to remove or hide?  Or at least rearrange the elements of the toolbar. I want to Sign &amp; certify be the last element/section.  Thank you.

    I've added two elements (accessibility and analyze) in the Tools menu of right hand.  How to remove or hide?  Or at least rearrange the elements of the toolbar. I want to Sign & certify be the last element/section.  Thank you.

    Hi Stacey Nathan,

    To remove the items from right toolbar, click Tools at the top.

    Then open the fall down to the accessibility or analyze and select 'delete the shortcut '.

    In a similar way, select "Add a shortcut" in the Tools drop-down menu to add to the tool on the right pane.

    Let us know if you need help.

    Kind regards

    Meenakshi

  • How to access the tool feather in 13 elements Adobe? All I can find is the pencil.

    How to access the tool feather in 13 elements Adobe? All I can find is the pencil.

    Unfortunately, the pen tool is only in full Photoshop, not in any version of the EP. The closest is the text on the custom path tool, which has a kind of rudimentary pen tool to create the path where you want to place the text.

  • How to access files with Elements 9 RW2

    How to access files Panasonic RW2 on Elements 9.

    I downloaded different converters without success.

    Charles.

    You need to PSE11, 12 or 13 for this camera. Otherwise, download and install the free Adobe DNG converter to convert your raw files to the universal Raw format files and Adobe will open in all versions of PSE (keep your originals as backups and for uses in the software of the camera factory)

    Download Windows (.exe file) click here DNG Converter 8.6

    Download Mac (.dmg file) click here DNG Converter 8.6

    You can convert an entire folder of images raw with a single click. See this quick video tutorial:

    You Tube click here for the DNG Converter tutorial

  • How to access the chassis lable on the main stage of a nested symbol

    All-

    I have two buttons

    btnA on the main stage

    btnB is nested inside btnA

    How to access a lable of frame on the main stage of btnB

    Hi, zontaluma-

    This should work:

    sym.getComposition () .getStage () .play ("label");

    -Elaine

  • How to access the functions on my main SWF of my external SWF?

    Hello someone can help me how to access the functions on my main SWF file of a loaded SWF file?

    Forget using parent. Send an event to the place.

    btn3.addEventListener(MouseEvent.CLICK, btnClickHandler);
    function btnClickHandler(e:MouseEvent):void {
         dispatchEvent(new Event("categoryClick");
    }
    

    In your main swf file, listen for the complete event on the Loader.contentLoaderInfo.

    In the complete event handler, add an event listener for the categoryClick (or you have chosen to call it) on the loaded swf file.

    // event handler triggered when external swf is loaded
    function loaderCompleteHandler(event:Event) {
        (event.currentTarget.content as MovieClip).addEventListener("categoryClick", categoryClickHandler);
    }
    
    function categoryClickHandler(event:Event):void {
        trace("category button clicked in loaded swf");
    }
    

    And remember, whenever you use root or parent, God kills a kitten.

  • HP laptop - 15-ac121dx: how to access the ram on a 15-ac121dx modules

    I want to upgrade the ram in my HP laptop - 15-ac121dx and maybe the hard drive, but I can't understand how to access the ram. There is no access panel, and unlike some other models, it doesn't have a single lever in the battery bay to remove the cover.

    OK, I realized how down low on the laptop.  After watching some youtube videos I came across another HP laptop computer who had screws under the rubber feet and of course there are also screws under the back of two rubber feet, can't believe I didn't think to look under them.

    To get the background you need to:

    1. Remove all the screws on the bottom.  (Must be 12 total)
    2. Remove the drive from DVD (Yes it does not).
    3. Finally, carefully separate the case around the side.

    After that, you should have full access to the slots of RAM and hard drive.

  • Change a State of main.mxml from a script in a different mxml

    Hello

    I am having trouble with my application, let's say I have the main application file called HAND. MXML

    in which I have defined different States and have different shapes.

    now, I have a form called loginForm that contains the element textInput Login and a password, I also have a link to register

    What onClick will change the State to display in the Panel even a registerForm of different shape (with items relevant textInput)

    now the HAND. MXML includes a custom component called < comp: NetworkManager / > which includes all the scripts of logic and MXML

    Tags for creating and managing a HTTPService request on a PHP server.

    When the user clicks on the "connect" button, it calls a function included in the main.as script (imported in HAND. MXML) which

    calls a function in the script within the NetworkManager.MXML passing all form data.

    NetworkManager.MXML the script will create an XML message, will be send to the PHP server, and wait for the response... If it comes

    Of course, the user is authenticated, is no different.

    well, I get the message, the back of the right answer. Now, I want to hide the MAIN form. MXML and put something like

    Welcome firstName lastName. instead. But I don't know how to do it. If I try to access States in HAND. MXML, of the NetworkManager.MXML

    I will get all sorts of errors that I have here with me.

    I know it sounds like a newbie question, and it's really... all licensee?

    your help is very appreciated.

    Thank you

    T.

    Hello

    Usually, the best way to do this sort of thing is to work with events. Defining a custom event is necessary which will store different types so that you will always know the nature of the event currently a reshipment. In your main application, simply add an event listener that subscribes to these events (example: this.addEventListener (ChangeEvent.LOGIN_FINISH, onLoginFinish), where "onLoginFinish" will be responsible for changing the status of the main application, and since this event listener is used in the main application, you don't have to worry about scope) and reacted accordingly.

    Thus, completion of the registration process you, you could simply send an event (example: dispatchEvent (new ChangeEvent (ChangeEvent.LOGIN_FINISH)) ;) spreads until the event listener that waits for it (since your NetworkManager is a part of the application main mxml, send your event will surely reach the listener), signaling this way a change in the application.)

    In case you're new on events then read on Adobe LiveDocs.

    Best regards

    Barna Biro

    PS: subedimadhav would be correct as just that events are much more elegant.

  • How to access the attributes of VO through binding...

    I have a lookup table that has 2 columns namely encode and attrib.

    I created a ViewObject with SQL like:

    SELECT THE CODE, REFER TO THE STUDY_TYPE_CODES

    And he stated in an Application Module.

    Now I want to post it to the end-user as part of a selection
    that should show REFER to but returns the value CODE.

    I want to iterate the elements and generating the choices myself.
    So I tried this on my page:

    < af:selectOneChoice label = "Test" required = "true" >

    < af:forEach elements = "#{bindings." Var StudyTypeCodesVVO1.allRowsInRange}"="row">

    "< af:selectItem value =" #{row.code} "label =" #{row.describ} "id ="si3"/ >

    < / af:forEach >

    < / af:selectOneChoice >

    It gives an error. Looks like how I use
    "#{row.code}" or "#{row.describ} ' is false.  If I ' # {line} "then
    It's OK, and I could see that the line is a

    ViewRow [oracle.job.Key []]

    But I do not know how to access attributes by name 'Code' and ' means ".". " I also tried
    "#{rank." Code}"with the capital and it does not work.

    How to access the attributes 'code' and 'describe' of each line?

    Kindly help.

    Thank you.

    Check the RangeSize property on the iterator to pageDef.

    Dario

  • How to access method Interface Client of App Mod from an another App Mod?

    Hello

    I have an application with a model project. It contains a module of application (say 'SharedAppMod') kept at the level of the session. There a few objects in view.
    A customer util Interface method is added to this SharedAppMod that is filtering for the object of said view with the said values and returns the result set. Structure is presented below.

    By SharedAppModImpl,

    lines filterUsingSecondaryRowSet (card) {} public
    Rowset resultRowSet = null;
    String [] attrNames = (String []) map.get('zoom') ("AttributeNames");
    Object [] attrValues = (Object []) map.get('zoom') ("AttributeValues");
    String viewObjectName = (String) map.get('zoom') ("ViewObjectName");
    ......
    ......
    }

    This project has been set in the jar to lib adf file to rest projects available in the rest of the applications. In so doing, given that this method of client interface is exposed under the control of data across applications, we are able to add an entry of the method described in our def file and run it to bean managed by discover the operation binding.

    But when you want to access the same method of AppModImpl or viewObjImpl from the rest of the applications, we do not know how to access.

    Can ppl give you an idea on how this can be done?

    Thanks in advance.

    Kind regards
    Julien V

    You can add the other module of the (shared) application to your application root module (main). Double-click the application root module and select the tab "DataModel" develop research of node n 'ApplicationModuleInstances' of the other module of application on the left side of the random. Select it and it shuffle to the right. This makes it accessible from the application module root (e.g. findApplicationModule or by the method that is created by the frame).

    Timo

  • I installed LeechBlock and now I can not find! Can someone tell me where and how to access it?

    Hello

    I'm new to using addons, so please forgive my ignorance. I installed LeechBlock and now I don't see where to find it. Can someone tell me where and how to access it? I looked under Addons on the Tools menu, but this is just options to install addons more.

    I thought there would be a button on the toolbar, or even a new toolbar, but I don't see anything...

    Thanks in advance!

    Hi, you are almost there! When you look at the Add - ons you must select the Extensions on the left side, and you should see and your AdBlock plus. It can also be a button on the bar of 3 menu - but I'm not familiar with that particular module so cannot be sure about that.

    Hope that helps.

Maybe you are looking for