How to get reference of application component in anothor component?

Hello Friends
I have one problem so plz help me.
Thanks in advance.
I have two file one is application and other is component. I have created Dividedbox in application and i put two buttons in component and used component in application. Now i want to change the direction of dividedbox when i click on button. I have written code but not working. Following is my code.
Application file:  test.mxml
<?xml version="1.0" encoding="utf-8"?>
<s: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:ns1="*">
    <fx:Script>
        <![CDATA[
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:DividedBox id="plistdvidebox" direction="vertical" width="100%" >
        <s:Group id="grp_rlpart" width="100%" height="100%">
            <s:layout>
                <s:HorizontalLayout paddingTop="10" paddingLeft="10"> 
                </s:HorizontalLayout> 
            </s:layout> 
            <s:Label text="Left ot top part"></s:Label> 
        </s:Group> 
        <s:Group id="grp_rrpart" width="100%" > 
            <s:layout> 
                <s:HorizontalLayout paddingTop="10" paddingLeft="10"> 
                </s:HorizontalLayout> 
            </s:layout> 
            <s:Label text="right or bottom part" /> 
        </s:Group> 
    </mx:DividedBox> 
    <ns1:tc x="90" y="156"> 
    </ns1:tc> 
</s:Application> 
Component File : tc.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" width="400" height="300">
        <fx:Script>
            <![CDATA[
                import mx.containers.BoxDirection;
                protected function btnhr_clickHandler(event:MouseEvent):void
                    var t:test=new test();
                    t.plistdvidebox.direction=BoxDirection.HORIZONTAL;
                protected function btnvr_clickHandler(event:MouseEvent):void
                    var t:test=new test();
                    t.plistdvidebox.direction=BoxDirection.VERTICAL;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
    <mx:HBox>
        <s:Button id="btnhr" content="HR" click="btnhr_clickHandler(event)" />
            <s:Button id="btnvr" content="VR" click="btnvr_clickHandler(event)" />   
    </mx:HBox>
</s:Group>
Plz tell me how to do this?
plz reply me fast.
Thanks
Manjurhusen

Check this:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7e3a.html

Similar Messages

  • Can we get  reference of WD component in custom class of enhanced View cont

    Dear Member,
    We are enhancing WD component. We need to get a reference of WD component in custom class of enhanced View controller (post exit) so that popups can be triggered or URLs can be called?. How should we get reference of WD component? I need to know cons of our approach.
    ...Naddy

    Hi,
    Create one static attribute in your custom class with type ref to of your component and populate this attribute in webdynpro enhancement and then use this reference in your custom class.
    Regards,
    Pon Murugesh

  • How to get the list of component?

        How to get the list of component through java API in Adobe CQ5?

    There are probably more than a few ways, but here is a little component .jsp code that uses the jcr query api to pull out all the components and list them on a page.  If I know CQ, there might be a way to ask for a list of components another way though, maybe through another API, or possibly a .json url, I might remember reading something about that, somewhere, lol, but this at least gets you the list in a somewhat simple way.
    Code Example:
    <%@include file="/apps/psul/components/global.jsp"%>
    <%@ page import="javax.jcr.*,
                       javax.jcr.query.*"
    %>
    <%
       // Login to create an anonymous session on the default workspace
       Session session = resourceResolver.adaptTo(Session.class);
           //Declare a query for all the components in the system
           String SQL = "select * from cq:Component";
    //side note: if you want just the components in your site area, then make the query more like below...
    //  SQL = "select * from cq:Component where jcr:path like '/apps/yoursitename/%'";
           QueryManager qm = session.getWorkspace().getQueryManager();
           Query query = qm.createQuery(SQL, Query.SQL);
           QueryResult result = query.execute();
           NodeIterator nodes = result.getNodes();
           while (nodes.hasNext()) {
               Node node = (Node)nodes.next();
               %>
                    <p><%=node.getName() %> (<b><%=node.getPath() %></b>)</p>
    <%     } %>

  • How to get reference of a SessionBean From RemoteClient

    How to get reference of a SessionBean in a ApplicationServer from another SessionBean running in Another ApplicationServer

    Hi
    There is a method, getHandle() on the EJBObject interface that your remote interfaces extend. This handle can be used to pass a reference to an EJB to someone else (possibly running in another JVM). You can then call getEJBObject() on the Handle instance and get your remote interface on which you can call methods. Should be able to cast it to your specific bean.
    I haven't done this, so definitly test it out, but I think this is what you want to do.
    check it:
    http://mail-archive.objectweb.org/jonas/2000-12/msg00064.html
    I suggest u not to go for more complex code, make it simpler, or if its really required use it as a webservice
    Regards
    Abhijith YS

  • How to get Reference on files of my ADF Shared Library

    Dear All,
    Use case:
    I have compiled one project into a shared ADF library. This project has a ViewController.
    In it are some common css files that I would like to reuse.
    Now, I have a new project and have linked to that ADF library using Resource Palette.
    In my JSFF file, I tried to link to the CSS in my shared library
    <af:resource type="css" source="/com/test/common.css"/>But I cant seem to get the styleclasses in that shared library.
    I have checked at Firebug console and I notice that I am getting a 404 when I am requesting for the said file.
    What should be the correct path for me to get a reference to the CSS Files?
    Thanks
    JDEV 11G PS3

    Duplicate of How to get Reference on files of my ADF Shared Library
    Edited by: Bijesh Krishnadas on Aug 17, 2011 9:13 PM

  • How to get back deleted software component along with underlaying objects.

    Dear Experts,
    By mistake i deleted my software component. When i deleted it even doesn't ask for activate. When i check in change list there is no change list for that deleted software component. So request you please let me how to get back my software component with all the namespaces and objects.
    Please treat this as high priority and revert me back ASAP.
    Thanks in advance.
    HAri.

    I don't know if is possible to restore a deleted SoftComp and all dependent object in repository... You can try to renew the SoftComp import from SLD....

  • How to get the active application users IP address in R12 by sql command

    Hi ,
    I need to know how to get the active application users IP in R12 by sql command
    in order to kill any session by the IP address ?
    Am working on 12.1.3 Application
    And 11.2.0.3 Oracle Database
    Thanks

    936921 wrote:
    Am still couldn't found the IP address for the connected Application users.
    If there any select statement can help me with that?
    Really? Then how do you explain me finding the following docs from the links I referenced above?
    How To Find The IP Address Of The Client Machine From Where A Particular Forms User Is Connected ? (Doc ID 879092.1)
    How to Track IP Address of the Form Session in Oracle application 11i (Doc ID 878931.1)
    Where to find the Client IP Address for a Client in E-Business Suite? (Doc ID 1258415.1)
    How To Get The terminal ID For The Machine From Which A User Is Logged To E-Business Suite Applications (Doc ID 751658.1)
    Thanks,
    Hussein

  • Can I know how to get App Store applications get DRM removed for enterprise testing?

    Can I know how to get App Store applications get DRM removed for enterprise testing?

    http://www.apple.com/business/vpp/

  • How to get bounds of a component in FreeDesign layout

    When I try to get bounds of a component that is inside JPanel with FreeDesign layout, I get (0,0,0,0)!
    How can I find out current bounds of those components?

    When I add a component on JPanel with FreeDesign layout (I use NetBeans GUI editor to do it), in generated code I find org.jdesktop.layout.GroupLayout with some HorizontalGroup and VerticalGroup components, and no bounds are ever set!!! When I start the application, a component is shown on JPanel, and definitely bounds are not 0,0,0,0! The components are stretched over window, and everything looks just as I set in GUI editor. A problem is that in runtime I need to know bounds of a component that is showed on screen. A method getBounds() returns (0,0,0,0), so I think that it is not appropriate for this layout.
    So, my question remains: How to find out bounds of a component in FreeDesign layout!
    Thanks!
    Message was edited by:
    mmilic

  • How to get change a GUI component from another class?

    Hi there,
    I'm currently trying to change a GUI component in my 'Application' class from my 'Dice' class.
    So the Application class sets up some GUI including a JLabel that initially displays "Change".
    The 'Dice' class contains the ActionPerformed() method for when the 'Change' button (made from Application class) is clicked.
    And it returns an 'int' between 1 and 6.
    Now I want to set this number back int he JLabel from the Application class.
    APPLICATION CLASS
    import javax.swing.*;
    import java.awt.*;
    import java.util.Random;
    import java.awt.event.*;
    public class Application extends JFrame implements ActionListener{
         public JPanel rollDicePanel = new JPanel();
         public JLabel dice = new JLabel("Loser");
         public Container contentPane = getContentPane();
         public JButton button = new JButton("Change");
         public Dice diceClass = new Dice();
         public Application() {}
         public static void main(String[] args)
              Application application = new Application();
              application.addGUIComponents();
         public void addGUIComponents()
              contentPane.setLayout(new BorderLayout());
              rollDicePanel.add(dice);
            button.addActionListener(diceClass);
            contentPane.add(rollDicePanel, BorderLayout.SOUTH);
            contentPane.add(button,BorderLayout.NORTH);
              this.setSize(460, 655);
              this.setVisible(true);
              this.setResizable(false);
         public void changeDice()
              dice.setText("Hello");
         public void actionPerformed(ActionEvent e) {}
    }DICE
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Dice implements ActionListener
         public Dice() {}
         public void actionPerformed(ActionEvent e)
              //super.actionPerformed(e);
              String event = e.getActionCommand();
              if(event.equals("Change"))
                   System.out.println("Will be about to change the 'dice' label");
                   Application application = new Application();
                   application.dice.setText("Hello");
    }

    It's all about references, baby. The Dice object needs a way to communicate with the Application object, and so Dice needs a reference to Application. There are many ways to pass this. In my example I pass the application object directly to Dice, but a better way would use interfaces and some indirection. Look up the Observer pattern for a better way to do this that scales much better than my brute-force approach.
    import javax.swing.*;
    import java.awt.*;
    public class Application extends JFrame // *** implements ActionListener
        // *** make all of these fields private ***
        private JPanel rollDicePanel = new JPanel();
        private JLabel dice = new JLabel("Loser");
        private Container contentPane = getContentPane();
        private JButton button = new JButton("Change");
        // *** pass a reference to your application ("this")
        // *** to your Dice object:
        private Dice diceClass = new Dice(this);
        public Application()
        public static void main(String[] args)
            Application application = new Application();
            application.addGUIComponents();
        public void addGUIComponents()
            contentPane.setLayout(new BorderLayout());
            rollDicePanel.add(dice);
            button.addActionListener(diceClass);
            contentPane.add(rollDicePanel, BorderLayout.SOUTH);
            contentPane.add(button, BorderLayout.NORTH);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setPreferredSize(new Dimension(460, 655));
            pack();
            setLocationRelativeTo(null);
            setVisible(true);
            setResizable(false);
        // *** I'm not sure what this is supposed to be doing, so I commented it out.
        //public void changeDice()
            //dice.setText("Hello");
        // *** ditto.  I strongly dislike making a GUI class implement ActionListeenr
        //public void actionPerformed(ActionEvent e)
        // *** here's the public method that the Dice object calls
        public void setTextDiceLabel(String text)
            dice.setText(text);
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Dice implements ActionListener
        // *** have a variable that holds a reference to your application object
        private Application application;
        private boolean hello = true;
        public Dice(Application application)
            // *** get that reference via a constructor parameter (one way to do this)
            this.application = application;
        public void actionPerformed(ActionEvent e)
            String event = e.getActionCommand();
            if (event.equals("Change"))
                System.out.println("Will be about to change the 'dice' label");
                if (hello)
                    // *** call the application's public method
                    application.setTextDiceLabel("Hello");
                else
                    application.setTextDiceLabel("Goodbye");
                hello = !hello;
                //Application application = new Application();
                //application.dice.setText("Hello");
    }

  • CS3 VB how to get reference to a text frame?

    Hi there,
    I got a text frame in a document with a table inside. In first cell of the table there is another text frame with table. How to get a reference to the first text frame from the frame inside of the cell?
    text frame in a cell has a character as parent, character has a cell as parent, cell has table as a parent - in this place there should be the right text frame as a parent of a table, but unfortunatly there is a story! so any idea how to get the text frame from there?
    regards

    thx again Harbs,
    believe me - I am watching all stuff at the watch window of VB6 - there is not even one insertion point which has a ParentTextFrames - if I try to adres it I get an error. VisualBasic do not allow syntax like InsertionPoints[1] - it allows something like this:
    InsertionPoints(1) but it is the same like InsertionPoints.Item(1). In both cases it doesn't works - all object has ParentTextFrames.Count = 0.
    Anyway I found a solution for my problem:
    innerFrame.Parent.ParentStory.TextContainers.Item(1) is the right text frame - don't ask me why....
    regards

  • How to get the current application root directory

    Hi Experts,
    I am deploying an ADF Application to a Standalone WLS 10.3. During development I am using Integrated WLS (which comes with JDeveloper 11.1.1.5.0). During development, I configured my application to create log files in my local machine (where Integrated WLS is running) by using absolute path for my log file. Now, I am moving to a standalone instance of WLS for testing (before moving to production).
    Now I need to keep my log files under my application root directory. Please let me know how to get the absolute path of the deployed application root directory from WLS ENV/System property into my application's Java Code.
    I tried the below java code,
    Current weblogic server name is: " + System.getProperty("weblogic.Name") --> This gives me the name of the server where my application is running.
    Current weblogic server name is: " + System.getProperty("weblogic.Root") --> This returns NULL. How to get the Root directory of my application using some system property inside my application at runtime??
    Thanks
    Rathnam

    One method is to create a File(""); and do getPath() on it.
    At least it's worked for me.

  • How to get the Dynamic UI component value from JSFF page to any managedbean

    HI ,
    We have list of bean objects in jSF page we are iterating the list of bean using the forEach loop and displaying the value into Input type text (UI component) value filed .
    If we try to get the UI component value in Managed bean we are not getting the dynamic values .
    The below piece of code used to retrieve the dynamic values from the JSF page doesn't have any form :
    UIComponent component = null;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
    UIComponent root = facesContext.getViewRoot();
    component = findComponent(root, componentId);
    then component type casting to the based on UI component which we trying to access and getting the value as " NULL " ..Please let me know how to get the dynamic values form the JSF ?
    Please let me know if any other approach or any changes required on above ?
    Thanks

    Hi,
    the root problem is this
    <h:inputText id="it3" value="#{familyList.ctn}" />
    <tr:commandButton text="Save" id="cb3"Note how each row writes to the same managed bean property, thus showing the same data. Instead your managed bean should expose a HashMap property that you then apply values to using a key/value pair. The key could be the ID of the field, which then you also should dynamically define e.g. cb<rowIndx>. The command button could then have a f:attribute assigned that has the row HahMap key as a value. This way you truly create value instances for the object
    Frank

  • How to get back sample application after deletion

    Hi All,
    I have deleted Sample Application provided in HTMLDB 1.6 by default.So how can i get back those application.I have neither exported the application before.So is there any way to recover that?
    Thanks in Advance,
    Cheers,

    Hi Joel,
    The way u r directing me is quite ambigous........I have neither getting any options of Demostration nor the sample application...Can u be plz little more clear.
    I have register my name in the HTMLDB workspace & after exporting the application from there when i trying to import it in my application it gives version mismatch error.I m using 1.5 wheras the exported application user 1.6.Any way to avoid this problem?Otherwise i have to reinstall HTMLDB.
    Cheers,

  • How to get references to project´s entities?

    Hi there,
    is there any straightforward way of getting reference to project´s entities? The idea is get a collection/array of all the entities enumerated at the persistence.xml via some JPA class. Is this possible?
    Thanks for any hint!

    Hi
       You should not set the attributes at the DOINIT, as the view will not be created that time.So what i suggest is , create it DOMODIFY .
    As i said in my previous post , create five attributes in the component controller.
    like l_view1,l_view2,l_view3...etc. of type if_wd_view_controller.
      And now go to each view's modify method. And write the following code.
    Data: lo_api               TYPE REF TO if_wd_view_controller.
    If first_time = 'X'.
      lo_api = wd_this->wd_get_api( ).
      wd_Comp_Controller->l_view1 = lo_api.
    endif
    And you could access this view controller , anywhere u want by using  wd_Comp_Controller->l_view1
    Thanks
    Anzy
    Award points if this solves your issue.
    Message was edited by:
            Mohammed Anzy S

Maybe you are looking for