Flex mxml components should be private by default

Flex mxml components should be private by default. Does adobe
plan to fix this in future versions?

Just noticed this and I think he may have a valid point here.
But as well as reducing coupling the term I'd use to make this
argument is
encapsulation.
There's no way AFAIK to make MXML sub components invisible to
higher level components. This can sometimes reveal things
internally that you don't want messed with, within a custom
component. If you have a custom component that only requires
one property be set to configure it properly, you don't want
to be revealing all these extra sub-components just because they
had to have ids assigned to them inside the custom component.
This may be a headache for backwards compatibility, for
anyone who has assumed these components would be public by default,
but a simple "scope='public'" attribute should fix that. But even
having them public by default, and allowing us to set their scope
to private would be helpful at times.

Similar Messages

  • Resource Module Help for localization in custom mxml components

    HI again,
    Ok I have my resource set up to load at run time, working
    great.
    But I have mxml components should they not use the same
    loaded bundle, or should I make smaller component bundles and load
    them as well.
    Best Practice etc...
    Thanks in advance.

    If you want the components to be decoupled and reusable with
    ease, I vote for separate bundles.

  • SVN subclipse Plugin should be integrated by default in FLEX 3

    Hi,
    SVN is now the standard Versioning system.
    SVN subclipse Plugin should be integrated by default in FLEX
    3
    http://subclipse.tigris.org/install.html

    Absolutely!

  • Converting MXML Components to ActionScript Classes

    I'm in the process of converting most (if not all) of my MXML
    components to Action Script classes. I've found this is easy, and
    doesn't require a lot of extra code when extending a simple
    container or control. However, several of my MXML components have
    several nested containers and controls - i.e. a component that
    contains several Labels, a ComboBox, a TextInput, a Button, and a
    DataGrid, plus several other containers needed for layout. To code
    the layout of all these containers and controls using MXML, it uses
    about 16 lines of code. To code the layout in ActionScript, it
    takes about 50+ lines of code (see attached).
    I'm just wondering if there are any best practices for
    creating ActionScript classes that include several (or even A LOT
    OF) containers and controls. It's very easy to layout in MXML, and
    is more visibly pleasing to look at and understand, but I feel it
    is best practice to code components as ActionScript classes. I know
    I should be using MVC, but it's a little late to rewrite the entire
    application now.
    Any thoughts?

    I can't specifically speak to how to write layout code in
    ActionScript, but you can look at the generated code that Flex
    creates to get an idea of how Flex does it. When you compile an
    app, the Flex compiler takes your MXML input and converts it to
    ActionScript classes before compiling the entire set of classes
    into a SWF. Because of this, you can look at the interim
    ActionScript code.
    You do this by setting the keep-generated-actionscript
    compiler option to true and looking in the /generated directory.
    hth,
    matt horn
    flex docs

  • [svn:fx-4.x] 14772: The check mark in the CheckBox components should never be mirrored, even if the label in the CheckBox is mirrored.

    Revision: 14772
    Revision: 14772
    Author:   [email protected]
    Date:     2010-03-16 07:14:46 -0700 (Tue, 16 Mar 2010)
    Log Message:
    The check mark in the CheckBox components should never be mirrored, even if the label in the CheckBox is mirrored.
    QE notes:
    Doc notes: None
    Bugs: SDK-25817
    Reviewed By: Kevin, Jason
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-25817
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml
        flex/sdk/branches/4.x/frameworks/projects/sparkskins/src/mx/skins/spark/CheckBoxSkin.mxml

    What are you supposed to cast it to? I might have tried to cast it to something wrong.
    I tried
    TableCellRenderer tcr = table.getDefaultRenderer(Boolean.class);
    ((DefaultTableCellRenderer)tcr).setHorizontalAlignment(SwingConstants.LEFT);and that gave me a ClassCastException. But I might have been trying to cast it to the wrong thing.

  • Architecting an Application With MXML Components

    I have an application that has gotten lengthy and I want to
    simplify it by architecting the Main Application with custom MXML
    Components. The application as it is currently architected works
    perfectly.
    Currently, the application consists of "Canvas" containers
    along Top and Left Side holding Navigation Buttons. The main
    (changing) sections of the application will consist of a
    "ViewStack" container holding a number of "Canvas" containers
    stacked on top of one another. The navigation buttons along the top
    and left side, when clicked, display in turn the content of each of
    the several stacked "Canvas" containers. Because of the number of
    stacked "Canvas" containers within the "ViewStack" and the content
    of each, the main Application source code has become very long and
    unwieldy, thus the need to use custom components for each of the
    "Canvas" containers in the "Stack" and referencing them in the main
    Application page.
    I have tried several times to get this to work and I need to
    clarify a couple of things.
    1) After setting up custom components for the several
    "Canvas" containers that are now in the "ViewStack" container, do I
    first need to set up a custom component for the "ViewStack"
    container with its own name space?
    2) If the answer to 1) above is Yes then do I then reference
    each of the custom components for the "Canvas" container with their
    own name space designation within the "ViewStack" reference within
    the main Application?
    In the event I am completely off base then I would appreciate
    any suggestions. If you wish I would be happy to email you the
    current application page.
    Thanks,
    Joe
    joe k

    Here is some code for an app built with components. You can
    see how the pieces talk to each other a bit.
    ------------------------- ViewStack1.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:comp="components.*"
    layout="vertical" width="100%" height="100%" >
    <comp:TopBar />
    <mx:HBox width="100%" height="100%">
    <comp:LeftBar />
    <mx:VBox width="100%" height="100%">
    <mx:ViewStack id="myViewStack" borderStyle="none"
    width="100%" height="100%">
    <mx:VBox id="home" width="100%">
    <comp:MainIntroText />
    <mx:HRule width="50%" height="3"
    strokeColor="0xCC3333"/>
    <comp:MainSecondaryText />
    <mx:HRule width="50%" height="3"
    strokeColor="0xCC3333"/>
    <comp:MainFinalText />
    </mx:VBox>
    <mx:VBox id="about" width="100%">
    <comp:About />
    </mx:VBox>
    <mx:VBox id="contact" width="100%">
    <comp:Contact />
    </mx:VBox>
    </mx:ViewStack>
    </mx:VBox>
    </mx:HBox>
    </mx:Application>
    ------------------------------- About.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%">
    <mx:VBox width="65%">
    <mx:Text fontSize="14" width="100%" text="This page tells
    you about us." />
    </mx:VBox>
    </mx:HBox>
    ----------------------------------- Contact.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%">
    <mx:VBox width="65%">
    <mx:Text fontSize="14" width="100%" text="This page tells
    you how to contact us." />
    </mx:VBox>
    </mx:HBox>
    ------------------- LeftBar.mxml -------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="200" height="100%">
    <mx:LinkButton label="Adobe Labs - Flex"
    click="navigateToURL(new URLRequest('
    http://labs.adobe.com/technologies/flex'),
    '_blank');"/>
    <mx:Spacer height="20"/>
    <mx:Label fontSize="16" text="Flex Blogs"/>
    <mx:LinkBar direction="vertical" width="90%"
    itemClick="navigateToURL(new URLRequest(event.item.data),
    '_blank');">
    <mx:Object label="Adobe Flex Team Blog" data="
    http://weblogs.macromedia.com/flexteam/"/>
    <mx:Object label="Flex Blog Aggregator" data="
    http://www.allyourflexarebelongtous.com/"/>
    <mx:Object label="Adobe Flex Blog Aggregator" data="
    http://weblogs.macromedia.com/mxna/index.cfm?query=byCategory&#38;categoryId=5&#38;categor yName=Flex"/>
    </mx:LinkBar>
    <mx:Spacer height="20"/>
    <mx:Label fontSize="16" text="Example Flex Apps"/>
    <mx:LinkBar direction="vertical" id="addlRscList"
    width="90%" itemClick="navigateToURL(new
    URLRequest(event.item.data), '_blank');">
    <mx:Object label="Adobe Flex Store" data="
    http://www.adobe.com/devnet/flex/samples/flex_store_v2/"/>
    <mx:Object label="Adobe Dashboard Example" data="
    http://examples.adobe.com/flex2/inproduct/sdk/dashboard/dashboard.html"/>
    <mx:Object label="Buzzword Word Processor" data="
    http://preview.getbuzzword.com/?s=true"/>
    <mx:Object label="Adobe Style Explorer" data="
    http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html"/>
    <mx:Object label="Adobe Component Explorer" data="
    http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html"/>
    </mx:LinkBar>
    </mx:VBox>
    ----------------------- MainFinalText.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%">
    <mx:Text width="100%" fontSize="12"
    text="Here is the final text I want to show you." />
    </mx:VBox>
    --------------------------- MainIntroText.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%">
    <mx:Text width="100%" fontSize="12"
    text="Here is the main text I want to show you." />
    </mx:VBox>
    ----------------------- MainSecondaryText.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%">
    <mx:Text width="100%" fontSize="12"
    text="Here is the secondary text I want to show you." />
    </mx:VBox>
    --------------- TopBar.mxml --------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%">
    <mx:Script>
    <![CDATA[
    private function goToViews(view:String):void {
    if(view == "home"){
    this.parentApplication.myViewStack.selectedChild=this.parentApplication.home;
    if(view == "about"){
    this.parentApplication.myViewStack.selectedChild=this.parentApplication.about;
    if(view == "contact"){
    this.parentApplication.myViewStack.selectedChild=this.parentApplication.contact;
    ]]>
    </mx:Script>
    <mx:LinkButton label="MySnazzyLogo" fontSize="20"
    click="goToViews('home');" />
    <mx:VBox width="100%">
    <mx:HBox width="100%">
    <mx:Spacer width="100%" />
    <mx:LinkBar fontSize="14"
    itemClick="goToViews(String(event.item.data));">
    <mx:Array>
    <mx:Object label="About Us" data="about"/>
    <mx:Object label="Contact Us" data="contact"/>
    </mx:Array>
    </mx:LinkBar>
    </mx:HBox>
    <mx:HBox width="100%">
    <mx:Spacer width="150" />
    <mx:Label fontSize="25" text="Here is Some Additional
    Text" />
    </mx:HBox>
    </mx:VBox>
    </mx:HBox>

  • Using salesforce connector in multiple mxml components

    I am using Flex 2.0.1 and Salesforce as Database. My question
    is i am creating login method in each component and application. I
    want to use/pass salesforce connection from main application to all
    sub component, how can i achieve this to avoid login for each
    application/ component.
    example: In my project i created main.mxml application and 3
    mxml components in each component i am logining into the salesforce
    database to retrieve data from the database. i want to avoid
    creating multiple logins for the components instead of writing
    login for each mxml component i want login for the first time in
    main.mxml application and want to use the same connection in mxml
    components. Can anyone tell me how can i achieve this
    If you feel this is not sufficient information to solve this
    problem then let me know i will post another message with sample
    code.
    Thanks in advance.

    The solution I ended up using was just to reference the CSS file at the root MXML application. Then I could just use .styleName on the Menu component and voila, it worked.

  • Anyway to make MXML components static?

    This isn't too important because I know how to do it well enough in ActionScript.  But I like the readability and convenience of MXML components, so if anyone knows if there is a way to make them static, please let me know.

    As best I understand it, there is no way to creation Static Classes in ActionScript 3 or MXML:
    Class Modifier keywords are dynamic, final, internal, and public.
    http://livedocs.adobe.com/flex/3/html/help.html?content=04_OO_Programming_06.html
    The Static keyword is only for variables, constants, or methods:
    http://livedocs.adobe.com/flex/3/langref/statements.html#static
    If you want to create static variables, constants, or methods inside an MXML File do it in a script block, which is the same way you do it in an ActionScript 3 file.

  • Mxml components not compiled into swc?

    Hi, I am using Flash Builder(Flex 4) and i am having issues compiling mxml components into swc.
    My scenario:
    I created Flex Library project, added some mxml components and actionsript classes.
    I created separate Flex project and added swc file to project's library path.
    I can only import actionscript classes from my library.
    ActionScript classes are compiled and bundled in the swc as expected, but all mxml components are not compiled into the swc.
    Do you have the same issues compiling mxml components?
    I am using Flash Builder Version 4.0 (build 253292).

    My team occasionally sees issues with missing classes in a similar setup, although I can't confirm that it has been limited to MXML (and no one has been able to reliably reproduce).
    I suspect our problem is the "includeAllClasses" property in .flexLibProperties (Project->Properties->Flex Library Build Path->Classes->Include all classes from all source paths)--it seems to not reliably compile in newly added classes.  Our workaround right now is to instead click "Select classes to include in the library" and toggle our source directory every time classes are added, at least until we script our own build tasks.  Looking through Jira I see this is a common issue: https://bugs.adobe.com/jira/browse/FB-23514 (and a few others).
    Hope this helps,

  • Dynamically add custom MXML components in Actionscript

    As there's no constructor for custom MXML components, how to
    dynamically add it as a child using ActionScript?
    I'm looking for some alternative to avoid the need to rewrite
    the entire existent component in ActionScript just to add it this
    feature (a constructor). PopManager is not an alternative...
    Is there any way?
    The case/situation:
    I have a custom MXML component that needs to be dinamically
    added to a NativeWindow created using ActionScript.
    Thanks a lot!
    Vicente Junior
    Independent Web Developer
    http://teclandoalto.blogspot.com

    mxml classes get generated into AS classes with a default
    constructor.
    In fact, there is essentially no difference between an AS
    component and an mxml component, they can be used exactly the same
    way.
    Tracy

  • Data between mxml components

    I have a question about data between mxml components.
    Product.mxml is the overview screen for the products and ProductDetail.mxml (it is a TitleWindow) the detail screen.
    In the Product I define a value object ProductVo with all the data. When I click a record in the overview and click the button 'change' (changeProduct function) then a popup window appears with all the data in it.
    Code in Product.mxml:
    [Bindable]
    public var myWin:ProductDatail;
    private function changeProduct():void {
      myWin = PopUpManager.createPopUp(this, ProductDetail, true) as ProductDetail;
      myWin["btnSave"].addEventListener("click", save);
    private function save(event:Event):void {
      productVo.productId = myWin.ti_productnr.text;
      productVo.name = myWin.ti_name.text;
      productVo.ean = myWin.ti_ean.text;
      ...some code to save the data in the db...
    Code in ProductDetail.mxml:
    [Bindable]
    public var productDetailVo:ProductVo;
        <mx:Form>
            <mx:FormItem label="Productnr" required="true">
                <mx:TextInput id="ti_productnr" text="{productDetailVo.productId}" width="60"/>
            </mx:FormItem>
            <mx:FormItem label="Naam" required="true">
                <mx:TextInput id="ti_name" text="{productDetailVo.name}" width="200"/>
            </mx:FormItem>
            <mx:FormItem label="Ean">
                <mx:TextInput id="ti_ean" text="{productDetailVo.ean}" width="100"/>
            </mx:FormItem>
            <mx:FormItem direction="horizontal">
                <mx:Button id="btnSave" label="Save"/>
            </mx:FormItem>
        </mx:Form>
    So my question: the save function in Product.mxml, is it possible to do this in a easier way instead of linking all the data from the form into the value object? Something like productVo = myWin.productDetailVo, but that does not work.

    I just looked at the parsley framework and saw this code:
    private function save():void
    contact.firstName = firstName.text;
    contact.lastName = lastName.text;
    contact.email = email.text;
    service.save(contact);
    So, it is doing the same thing I'm doing.
    I'm using Spring and hibernate on the server level, it is my own framework.

  • FREE check box in PO should be selected by default for specific material

    Hi All,
    We have a check box  FREE in PO creation - ME21N in the item row  which is selected when ever we want the vendor to supply those items as free.
    - I have a list ot items which are supplied freely by the vendor which I have to mention in the PO. My requirment is when ever the specific material is in the PO the FREE check box should be selected by default. Is it possible?
    Please advice.
    Thanks ,
    Vengal Rao.

    Hi Vengal Rao,
    I don't think there's such flag in the material master. As far as I know any material can be supplied either free or chargeable - the buyer has to choose the applicable option it in each specific PO.
    If however in your business case certain materials shall always be supplied as free, then you can use the BAdI that I mentioned above to analyse which material is being procured and set the FREE flag in the PO accordingly.
    BR
    Raf

  • Where should i put the DEFAULT&SMARTBAR

    Hello,
    where should i put the DEFAULT&SMARTBAR ? and the main Menu ?
    in order to be shown in each form..
    in using Forms 6i.
    Regards,
    Abdetu..

    Hello Gerd,
    Thanks for reply..
    put such things into *a reference form* what is meant by a reference form do u mean the main form?
    Create a property class (PC) for your FORM-MODULE-properties,
    put this PC into the reference form.
    Create there an object group (OG), put the PC into the OG and the inherit the OG to your local form.
    Automatically you have then the PC inherited too.i did all what u mentioned..
    Bbut the problem is that the DEFAULT&SMARTBAR
    can't be seen in allllllllllll my forms in the main menu inspite of i put it into the form module property ->in the intial menu property.
    Regards,
    Abdetu..

  • If I create an security scope for a group of SCCM-admins should i remove the "Default Scope"?

    Hi,
    If I create an security scope for a group of SCCM-admins  should i remove the "Default Scope”?
    /PS
    /SaiTech

    Yes, it's OK to not add the Default security scope to an administrative user. You can add any custom security scope to an administrative user and it does
    not has to include the Default
    security scope.
    Just keep in mind that you keep at least an administrative user that contains the
    All and/or the Default security scope to not lock yourself out of the console. 
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Effective Date should appear Blank by default on SSHR Separation process

    Navigation : Manager Self Service - Separation - Action Page - Termination Effective Date Options.
    On this page the there is an option button "Change should take effect on the effective date as mentioned below".
    Here by default the effective date appears as SYSDATE.
    The requirement is that the effective date should appear blank by default. We tried using personalization, but its not possible.

    By Separation I'm guessing you're referring to the 'Termination' MSS page where it defaults the Effective Date.
    On this page the controller sets the Effective Date to sysdate - I don't know of any way you can blank this out without extending the delivered controller:
    oracle.apps.pqh.selfservice.common.webui.EffectiveDateCO.class

Maybe you are looking for

  • Moving iTunes library from a hard disk with bad sectors to new hard drive

    I have tried to move my itunes library using the method proposed by Apple in the support section but it does not work because of a bad hard drive. I change the itunes folder in preferences. I let itunes organize my music. However, when I select conso

  • How to rollback batch input process?

    For example:  I wanna post 10 documents, and all the posting should happen as a logical unit of work, i,e. either everything should be posted successfully or nothing should be posted. If error occured in the 7th record, i should rollback the posted 6

  • Where is the lock sign for trusted connections?

    We are building websites for customers. For several customers we build a webshop with iDeal support. iDeal is a payment implementation which is supported by the main banks in The Netherlands. These banks provide a secure connection. But since FF 4, t

  • How to view history of data after enableing the Change Tracking

    Hi All, I have enabled the track changes using MDM Console. But now I unabled to view the last values of the fields which were updated. I also could not find any option in MDM Data Manager to view the last values of the fields. Please help me to view

  • MX710 - I can print but I cannot scan

    I just got a new Mac and cannot figure out how to set up scanning.  I am using MP Navigator EX to scan and it does not recognize the scanner.  Wireless printing is working just fine though.   In the Printers/Scanners tab, it shows the Canon MX710, bu