Accessing non visual obejcts declared in mxml

I have some custom actionscript support classes that I wish
to declare in mxml. Some have direct impact on the UI others are
worker classes that are indirectly related.
I have tried populating the classes in mxml and the code
runs, however it seems that the objects are only accessible if I
derive from UIComponent (they appear as children and can be looked
up like other UI objects). I really do not want to do that as I am
using a sledge hammer for a toothpics job.
I can see the objects in the debugger with values paramatized
but I cannot see how I can access them. Can someone advise me how
to access these objects please.

I can do that from within the class.
Sorry I should have been more precise, I need to access these
objects from other objects dynamically. I want to be able to do a
search on whatever container holds these generic objects (say based
on thier type or some property value) and get references to them.
In some ways it is similar to populating data structures
which I have been doing in AS in script blocks. The difference is
that it is in MXML and populates a class which has methods
naturally.

Similar Messages

  • How to access the component id from another mxml?

    I tried to set the data to a DataGrid in another mxml, but the complier said there's 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 compiling error is :
    Multiple markers at this line:
    -1120: Access of undefined property dgFile.
    -arrFile
    Anybody can tell me, how to achieve it?
    Thanks a lot!

    Hi, You cant access it like this. To access, first give some id to the custom component you have added.
    i.e
    <custom:FileDataGrid id="custFDG"/>
    Then you can acces it from script,
    custFDG.dgFile.dataProvider = arrFile;
    Hope this shud work fine.
    Thanks.
    Abhinav

  • Use J2EE CAS COM Bridge locally for non visual components

    if you only have non visual java-classes which you want to access locally through COM, you should use J2EE CAS COM Bridge. this is a very powerfull component, that makes it very easy to use about ANY java-class in VC++, VB, ASP and VBScripts. Some people said earlier in this forum, that you can only use EJBs which must also have been deployed in a J2EE EJB server. well that's not true!! if you need only local access to java-components, you can use J2EE CAS COM Bridge as well. All you need is just a JRE, actually you can have multiple JREs installed and choose among them, even dynamiclly in runtime. No JDKs and no additional J2EE components are required.
    J2EE CAS COM Bridge comes with very usefull tools and lots of examples that show, how you can access java-classes in VC++, VB, ASP, etc.
    So TRY THIS!!

    unfortunately, it's outdated! The last example (6) doesn't work. The batch file cloudUtil.bat has to be adjusted to use the current cloudscape JAR files. And even then, the Visual Basic Programm terminates with an Exception at line:
    Set AcctHome = J2eeRi.LookupEjbHome("MyAccount", "account.AccountHome")
    Exception:
    Run-time error '-2147467259 (80004005)':
    JavaException: java.lang.Exception: Could not call javax.naming.InitialContext.lookup because:
    javax.naming.CommunicationException: Can't find SerialContextProvider
    :-(

  • [svn] 4735: Fixing id selectors for non-visual components.

    Revision: 4735
    Author: [email protected]
    Date: 2009-01-29 10:53:55 -0800 (Thu, 29 Jan 2009)
    Log Message:
    Fixing id selectors for non-visual components. This required a special modification to the compiler to include id properties in generated code if a component was guaranteed to have an id property. A new mx.core.IID interface was introduced to opt in to the id property to be included. This change also required TextGraphicElement based components to implement IAdvancedStyleClient instead of just IStyleClient (though note that pseudo-selectors have no meaning for these components as they do not possess states).
    QE: Yes
    Doc: It's reasonably advanced, but we may want to document mx.core.IID for the case where a custom component exists that needs to be styled but is not based on UIComponent or GraphicElement.
    Checkintests: Pass
    Reviewers: Glenn, Paul R
    Bugs:
    SDK-18651 - Advanced CSS not setting styles on FXG elements correctly when styling using IDs
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18651
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.a s
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicEleme nt.as
    flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
    Added Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IID.as

    Anyone able to help?

  • Can you access non-Oracle database with HTML DB?

    Can you access non-Oracle database with HTML DB? If not, will this be possible in the future?
    I realize HTML DB is not an open-source product. However, it is necessary sometimes to get non-Oracle database info. JDeveloper supports this. It does not appear to me that HTML DB does. This is a major drawback to it being a product for more potential applications that rely on other database technology such as MySQL, etc.
    If it is possible, is this brain surgery to do it. HTML DB offers fast simplified development and it would be good if it was built in. Does anyone know of an example of accessing non-Oracle database that is available?

    12282,
    In general, HTML DB gives you access to Oracle database facilities. These include heterogeneous services. Please search this forum for keyword "heterogeneous" and you can follow the threads that interest you.
    As for the comparison with brain surgery, I'd rank them about the same in terms of raw thrill.
    Scott

  • [Solved] Cannot access non-executable directories

    After I copied some folders and files from CD I had permission denied trying to access as a normal user.
    So I did
    sudo chown -R doctor:users folder
    sudo chmod -R 777 folder
    After that, the folder and files became executable.
    So, in directory Music/ I had some executable folders and files.
    I thought I can make it all non-executable recursively...
    sudo chmod -R -x Music/
    And now it's non-executable.
    But wait
    [doctor@doctor ~]$ cd Music/
    bash: cd: Music/: Permission denied
    I cannot access non executable folders?!
    After I make them executable again, I can access.
    [doctor@doctor ~]$ chmod -R +x Music/
    [doctor@doctor ~]$ cd Music/
    [doctor@doctor Music]$
    wtf?
    Last edited by Doctor Drive (2010-09-15 12:55:44)

    Didn't get how it works though..
    But a way to solve is
    chmod -R 775 Music
    And for files...
    find ./Music/ -type f -exec chmod 664 {} \;
    Though still didn't get why must folders have different permissions...
    Too much to study that chmod thing...
    Last edited by Doctor Drive (2010-09-15 12:55:18)

  • Non-visual bean container

    How to create non-visual bean container, which will have a children non-visual beans? Is this supported by Netbeans IDE?

    Hi Geoff3c,
    As you know SQL Server Analysis Services (SSAS) Tabular only supports visual totals. This is a differences between Analysis Services OLAP and Tabular that SSAS OLAP provides one feature that SSAS Tabular does not: non-Visual Totals. It was considered that
    non-visual totals are not terribly common, but some developers have worked for clients where non-visual totals were required.
    If you have any concern about this feature, you can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback and hope it is released in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature
    in the following release after official confirmation.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • I can not access my visual voicemail since the last iphone update?

    I do not have access to visual voice mail since completeing the last IOS update. Can anyone help? I already tried re-setting my
    network settings.

    The first thing to try is to open Phone, and simply dial "1" -- hold the "1" key down for 2 or 3 seconds.  That should send you to your cellular carrier's voicemail box.  You may be asked for a password.  Type it in if you ever had one, if not, try your telephone number as the password.  If that does not set up visual voicemail, contact your cellular carrier.

  • Non visual totals in Analysis Services Tabular

    Are there any work-a-rounds to achieve non-visual totals in Analysis Services tabular? This is a crucial feature for some of our clients and is preventing them from adopting this technology due to this feature not being available out of the box
    as with Multidimensional OLAP.  If not, are there any plans to introduce this feature for Analysis Services tabular models?

    Hi Geoff3c,
    As you know SQL Server Analysis Services (SSAS) Tabular only supports visual totals. This is a differences between Analysis Services OLAP and Tabular that SSAS OLAP provides one feature that SSAS Tabular does not: non-Visual Totals. It was considered that
    non-visual totals are not terribly common, but some developers have worked for clients where non-visual totals were required.
    If you have any concern about this feature, you can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback and hope it is released in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature
    in the following release after official confirmation.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Main accessing non static members

    How can main access non static members itself being static?

    Why would you want to?
    Main has one purpose and one purpose only, it is there for kicking off a program and ensuring it closes cleanly. I know they generally don't teach this early on in programming classes, but in my opinion they should.
    You should never ever be doing any data processing in main. In some cases you may need to set data in main, like for example if the class the main is in is part of a larger project but you want to be able to test the class stand-alone without having to run the rest of the project. But in most cases main should do nothing with any data save the args, which should usually just be passed along.
    The reason behind this is simple, soon enough you will be writing programmes that span multiple class objects, only the main of the class you use to kick it off ever gets touched, so any data processing that is in the other classes main methods, never happens.
    Why you should learn how to get out of main now is, you may want to use the class you are writting now as part of a future project. But again you have the problem of unless this class is the one that kicks that project off, any processing in main does not happen. Plus what happens if you want to process the data in you are processing in main somewhere else? Code re-use of code in main is a no go.
    Plus, by getting out of main you no longer have to worry about that whole static/ non-static issue.
    JSG
    Sorry, this is just one of my pet-peeves

  • Access non-DC project from a DC Web Dynpro project

    Hi,
    I have a DC Web Dynpro project that needs to access a non-DC Java project. As I cannot create a public part of the non-DC Java project then add that public part to the used DC list of the DC Web Dynpro project, I add the non-DC Java project to the build path of the DC Web Dynpro project. That way I can do the coding without any issue, but when I build the Web Dynpro DC, I keep getting building error saying that the Web Dynpro DC doesn't see the classes in the non-DC Java project.
    How can I resolve this issue without switching the non-DC Java project to a DC?
    I am on NW04s.
    Thanks and Best Regards,
    Viet

    Hi Viet,
    There is a way to achieve your purpose, but at the same time, Iu2019m not sure that it will be exactly your requirement.  Anyways, herein, Iu2019m providing you a concept which we had used in our earlier project.
    You need to create a java file with the communication parameters for DC and non DC and after that create a jar file. Now, you create an external library DC of this jar file and publish it as public part with complication and assembly.
    Now, use this external library DC in your DC.
    Thanks
    Gautam Singh

  • Error in accessing attributes of a declarative component in BackinBeanScope

    Hello,
    I'm using JDeveloper 11.1.1.4.0.
    For pagination we have created a declarative component. It's bean when in request scope works fine when the dec.comp. is used in page only once.
    In order to use it multiple times in the same page, I changed the scope to BackingBeanScope. It works fine the first time bean's method gets called. However on the next request, I'm getting NullPointerException when it tries to access the dec. comp's attribute.
    Why am I getting this error and how to correct it?
    As an alternative, we can store the attribute value received first time in a hidden form field and retrieve it every subsequent time. But this would be my last alternative.
    Appreciate a reason and a better way to resolve this.
    Regards,
    Amar

    Hi,
    Yes. The bean is declared in the dec. comp.
    Following is the code in my bean's c'tor:
    FacesContext fc                    = FacesContext.getCurrentInstance();
    ELContext elctx                    = fc.getELContext();
    ExpressionFactory elFactory    = fc.getApplication().getExpressionFactory();
    ValueExpression valueExpr      = elFactory.createValueExpression(elctx, "#{component}", UIXDeclarativeComponent.class);
    UIXDeclarativeComponent currDeclarativeComp            = (UIXDeclarativeComponent)   valueExpr.getValue(elctx);
    String currVOObjectName                                         = currDeclarativeComp.getAttributes().get("VOObject").toString();"VOObject" is the attribute name for the dec. comp. It's getting correct value the first time. Every subsequent time,the last line throws null pointer exception.
    Regards,
    Amar

  • Access InputText Value in Declarative Component

    Hi,
    I have created a declarative component that contains an inputText component:
    <af:inputText label="#{attrs.ucitLabelText}" id="dc_it1" contentStyle="text-transform:uppercase;" converter="StringAsUppercase"/>
    When I use the declarative component on a page, is there any way to easily access the value of its inputText through the page backing bean? The declarative component is bound to the page, but what method can I use to access the inputText value?
    Thanks,
    Brad

    Thanks.
    I also figured out that I can simply do the following:
    When creating the declarative component...
    - Add an attribute to the declarative component (let's call it "inputValue")
    - Assign the inputValue attribute to the inputText value.
    When using the declarative component on a page...
    - Create a String property in the page's backing bean
    - Assign that property to the declarative component's inputValue attribute
    Then I can access the backing bean property to get the inputText value.
    Brad

  • Trying to choose a method for wireless access (non-Safari question)

    This isn't a Safari question, but I think plenty of Safari users would hopefully know an answer to it....and I'm not sure where else to ask:
    I'd like to be able to access Wi-Fi when I'm travelling-- which isn't very often, so I'm not keen on spending $1000+ on a laptop if all I'm using it for is to surf the net and check email.
    I'm thinking a PSP or similar gaming device would be a solution.....and entertain me as well. What other non-laptop products would give me Wi-Fi access?
    Thanks for any help!
      Mac OS X (10.3.9)  

    I'm thinking a PSP or similar gaming device would be
    a solution.....and entertain me as well. What other
    non-laptop products would give me Wi-Fi access?
    You want a PDA or perhaps a cellphone. I don't see any Apple connection. You'd probably be better off searching Google.

  • Can't access non ejb classes from JSP - NoClassDefFound error

              Hi,
              I have one session ejb which has a method returning a collection of non ejb class objects (say of Class 'Foo').
              The method signature is like :
              "Collection getFinacialData() throws RemoteException"
              It is working fine with normal java clients. Now when I run this from a JSP it gives a "NoClassDefFoundError". I kept class 'Foo' and the remote interface of the session bean in the same package and also in the same ejb jar file. Also I am running JSP and ejb in same WL server(ver 5.1, SP8 on solaris). What I have done is only deployed the bean jar file. Do I need to do anything more?
              thanks in advance.
              

    I ran into a similar problem. I solved it by putting the client classes for
              accessing my EJB in the WebLogic POST_CLASSPATH in the startWebLogic script
              file:
              set POST_CLASSPATH=d:\weblogic\myserver\myClient.jar
              For more information on class visibility between the JSP and EJB class
              loaders, check out
              http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_deployover.html#1056256
              Rick
              "niroja" <[email protected]> wrote in message
              news:3a6ed903$[email protected]..
              >
              > Hi,
              >
              > I have one session ejb which has a method returning a collection of non
              ejb class objects (say of Class 'Foo').
              > The method signature is like :
              > "Collection getFinacialData() throws RemoteException"
              > It is working fine with normal java clients. Now when I run this from a
              JSP it gives a "NoClassDefFoundError". I kept class 'Foo' and the remote
              interface of the session bean in the same package and also in the same ejb
              jar file. Also I am running JSP and ejb in same WL server(ver 5.1, SP8 on
              solaris). What I have done is only deployed the bean jar file. Do I need to
              do anything more?
              >
              > thanks in advance.
              >
              

Maybe you are looking for

  • Correção NFe de ajuste/estorno RS

    Boa tarde a todos, Estamos atuando em um processo onde de acordo com a Instrução Normativa 98, de 28-12-2011, publicada no DO-RS de 29-12-2011, a Subsecretaria da Receita Estadual do Rio Grande do Sul esclarece sobre a possibilidade de estorno da NF-

  • RemoveAtt by column in Tabular Form

    Hi guys. This is my problem: I have a tabular with "select list" fields. I disable this fields on Load Page if pk is not null, so user can't modify value of this fields. But when I insert new row in tabular form i have an error from MRU (because sele

  • Total Quantity in BOM

    I am creating new BOM like F1 as finished Goods(Parent Item) C1 as Child Item(Raw Materials) C2 as child Item(Raw Materials) then I want to sum all Raw materials without save the BOM document.means how many raw materials using ? before adding the doc

  • I need to reinstall Mail 5.0 where do I find the software?

    I need to reinstall Mail 5.0 for Lion.  Where can I find the software?

  • Wireless connection lost after macbook pro sleeps for more than 15 minutes

    It's annoying. I have a brand new macbookpro 3.06Ghz 17" hi-res screen running OS-X 10.6.3 and the wireless connection keeps dropping after the computer is either turned off or sleeping for more than 15 minutes. My router is a linksys wireless G, has