How do I call a state change from within a view

Hey guys,
I think I might understand how to do this, but I wanted to run it by the forums to see if I understand it correctly..
So I have a base view (base.mxml) which contains 3 separate 'state' view components - like thus...
<s:states>
        <s:State name="MinimisedState" />
        <s:State name="MaximisedState" />
        <s:State name="LoginState" />
    </s:states>
<view:MinimisedView includeIn="MinimisedState" width="100%" height="100%" />
<view:MaximisedView includeIn="MaximisedState" width="100%" height="100%" />
<view:LoginPane includeIn="LoginState" width="100%" height="100%" />
Apologies if this sounds like a gumby question, but how do I get the LoginPane state/view (to dispatch an event) to tell the base view (container) to change states? Say to MinimisedState or MaxmisedState.
I'm sure this is something really simple, and I don't have a problem doing this when all the states are registered/contained within the same base MXML file - but when it comes to passing events up to the parent (from seperate external mxml views/components) i'm a little confused.
Any help appreciated

If I understood your question correctly, there is a tutorial on that in 'Flex in a Week' :
http://www.adobe.com/devnet/flex/videotraining/flex4beta/index.html
It covers dispatching events from custom component to main application.
HTH
FTQuest

Similar Messages

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How can I call a LabVIEW executable from within another LabVIEW executable?

    I have a customer requirement for two LabVIEW executables. Based on their current setup, they need to run executable "A" or "B", both of which are under independent revision control. I have created a third "selection" executable that allows the operator to choose between one of the two, but I am receiving errors when I attempt to call a LabVIEW executable from within a LabVIEW executable using either the "System exec" VI or the "Run Application" VI. If I call a non-LabVIEW executable (such as Windows Explorer) everything works fine.

    > I have a customer requirement for two LabVIEW executables. Based on
    > their current setup, they need to run executable "A" or "B", both of
    > which are under independent revision control. I have created a third
    > "selection" executable that allows the operator to choose between one
    > of the two, but I am receiving errors when I attempt to call a LabVIEW
    > executable from within a LabVIEW executable using either the "System
    > exec" VI or the "Run Application" VI. If I call a non-LabVIEW
    > executable (such as Windows Explorer) everything works fine.
    As with the other poster, I suspect a path problem. You might try the
    path out in a shell window, and if it works, copy the complete absolute
    path to LV to see if that works. LV is basically passing the comma
    nd to
    the OS and doesn't even know what is in it, so you should be able to get
    it to work.
    The other poster commented on subpanels, which is a good suggestion, but
    without going to LV7, an EXE can have open more than one VI. You can
    use the VI Server and the Run method to fire up another top-level VI.
    The decision is whether you want both to be in unique processes.
    Greg McKaskle

  • How can i call mouse click event from keypress event???

    How can i call mouse click event from keypress event???
    I want same GUI changes to be occured at key press.....i.e . button going down & comming up.....
    for calculator

    Put all the code that happens on those events into a method. Then call that method from both events.

  • How can i call forpro prg file from java

    Hai friends,
    I have a doubt,clear it.
    how can i call forpro prg file from java file
    by,
    N.Vijay

    Thanks to your reply,
    I have some print statements in my foxpro program file.
    Then i like to invoke that foxpro file from my java file
    This want i want..,
    by,
    N.Vijay

  • How to Extract Customized Financial Statement Version from R/3 to BW

    Hi Gurus,
    Could anybody tell me how to Extract Customized Financial Statement Version from R/3 to BW. Also send me docs on FICO and COPA extraction from R/3 to BW.
    Thanks in advance...
    Regards
    Rafi

    Sayed
    Please see this BW Best Practice link
    http://help.sap.com/bp_biv133/
    http://help.sap.com/bp_biv235/BI_EN/html/BW/COPABaselineAnal.htm
    http://help.sap.com/bp_biv235/BI_EN/html/BW/ControllingAnalysis.htm
    COPA Business content
    http://help.sap.com/saphelp_nw04/helpdata/en/28/3dc7393b26da1de10000000a114084/content.htm
    Hope this helps
    Thnaks
    Sat

  • How can I call a plsql function from an attribute?

    I have an attribute defined in an element. I want execute a PLSQL function from the attribute, and display the returne value with an HTML template.
    I've defined the attribute's type like PLSQL, and I've put the called of the function in the value of the attribute, but it doesn't work. The only value I obtain is an URL (I think that is the URL of the function or someting like this).
    How can I call to my function from the attribute and display the returnes value in the page?
    Thanks.

    Thanks, but it doesn't work. I have an attribute called ID_BOL and I want to associate a sequence to that attribute. I've created a function, with the sequence. This function return de value of the sequence. I want taht the attribute takes the value of the sequenece dinamically.
    I've tried it, creating the type attribute like PLSQL, and calling the function from the attribute, but it doesn't work.
    How can I return the sequence value to my attribute?
    Thanks.

  • Can any one tell me how can i call a shell script from pl/sql

    i like to call shell script from pl/sql procedure.
    can any one suggest how can i do this

    Have you not mastered in asking the same kind of question ?
    First do write a script...
    no one will spoon feed you.
    How can i call a shell script from procedure
    How to call Shell Script from pl/sql block
    -Sk

  • How can i call a shell script from procedure

    I have a shell script.now i am i a situation to call that shell script from one of my procedures and need to get a value from that script.
    can u suggest me that how can a call the shell script from pl/sql?

    Is the same question you asked here
    How to call Shell Script from pl/sql block
    -SK

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • How can i call Apple in usa from Egypt to buy an iPhone from Apple store please who khnow the contacting number answer me :)

    how can i call Apple in usa from Egypt to buy an iPhone from Apple store please who khnow the contacting number answer me

    http://www.apple.com/eg/buy/
    There are three companies linked to towards the bottom right to purchase an iPhone from. Above those three is Arab Business Machine. Choose one, or check each one out.

  • How to call a set method from within a constructor

    Hello,
    I want to be able to call a set method from within a Scanner, to be used as the argument to pass to the Scanner (from a source file). Here's what i tried:
    private void openFiles()
            input = new Scanner( setSource );              
        and here is the set method:
    public String setSource( String in )
            source = in;
            return source;
        }obviously there will be more code in this method but i'm trying to tackle one problem at a time. Thanks in advance..

    The "String in" declaration says: "Nobody may ever invoke setSource() without specifying a certain String. The content of the String is known at run-time only."
    In no place in your code you say the compiler: "I want the 'in' variable (actually, parameter) of method setSource() to contain the first arg which is passed to the application".
    This is exactly the same mechanism allowing you to write "new Scanner" with something inside the two parentheses.

  • How to call a Oracle Form from within the APEX

    Hi,
    I have a requirment where need to call a oracle form from within the Oracle APEX application?
    I will appriciate if can someone help me out.
    Thanks

    Hi,
    are you working with Forms 6i or 10g?
    If you want to call a forms 10g page. Just use a button with javascript:
    - Target type: URL
    - URL Target: javascript:window.open ('http://<server>:<port>/forms/frmservlet?config=<conf>','Forms window');
    With Forms 6i you can open the directory where your forms file is inside (works just with IE):
    <script type="text/javascript">
    function fnc_window()  {w = open('C:\\FormsFiles', "winLov","scrollbars=yes,resizable=no,width=600,height=400");
    if (w.opener == null)
    w.opener = self;
    </script>Or execute the forms file with vbscript (IE only):
    <script language = "vbscript">
    sub fnc_forms()
    dim progName
    progName = "c:\FormsFiles\myForm.exe"
    set oShell = createobject("wscript.shell") 'create a shell
    '***use the line below to call your app, defined above with the "progName" variable:
    oShell.run(progName)
    end sub
    </script>

  • Call a Web Service from within an e-Sourcing script

    Hi Guys
    I would like to know wether anyone has successfully been able to call a Web Service from within an
    e-Sourcing script? If you have, can you please share your experience and code?
    Thank You

    Hi Faaiez -
    As with any use of Web Services, however, you should carefully consider the security issues that may come up. How, for example, will the Web Service server validate that the Web Service client (E-Sourcing) is properly authenticated? Will password information be included in the web service call? You will find that it is very easy to make a web service call, but I would encourage you to carefully consider security before implementing a productive solution.
    Web service calls can be made using raw Java web service APIs from the open source Axis library which is included with E-Sourcing; this approach is slightly more difficult to code, but very dynamic. Web service calls can also be made using proxies. In one solution that I worked on, we generated java proxies for the web service, compiled those proxies into a Jar file, and included that jar file as a custom jar in E-Sourcing. Let me provide a few more details on each of these approaches.
    Using raw java web service APIs that are part of the Service and Call classes, I prototyped a web service call to Googles sample spell checker web service. Here is the code:
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    String endpoint = "http://api.google.com/search/beta2";
    Service  service = new Service();       
    Call call = (Call) service.createCall();       
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );       
    call.setOperationName( "doSpellingSuggestion" );       
    call.setOperationName(new QName("urn:GoogleSearch", "doSpellingSuggestion"));       
    call.addParameter("key", XMLType.XSD_STRING, ParameterMode.IN);       
    call.addParameter("phrase", XMLType.XSD_STRING, ParameterMode.IN);       
    call.setReturnType( XMLType.XSD_STRING );       
    String ret = (String) call.invoke( new Object[] { "googlekey", doc.getDocumentDescription()} );       
    doc.setDocumentDescription(ret);
    This block of code does a very simple thing...it calls the Google "doSpellingSuggestions" web service with two parameters: a key provided by Google, and a string for which the spelling suggestions should be generated. I used the current document description as my sample string for the web service and I put the results back into the document description - remember, this is just showing how you can call the web service, not doing anything really intelligent or useful from a business perspective
    There is nothing special to E-Sourcing about the above code...this is really just using the Axis java classes to call a web service.
    The second approach that can be used is to generate Java proxies for the web service calls. The open source Axis library includes a tool called "wsdl2java". Using the WSDL for the web service, you can generate Java proxies. Java classes will be generated by the tool; these Java classes will then need to be compiled and included in E-Sourcing as a custom jar. Once they are part of the E-Sourcing deployment, they can be called like any Java API. If you were to examine the generated code, you would notice that it looks a lot like the raw web service code shown above...the generated classes really just provide a simpler interface to the same functionality.
    You can see this information and other E-Sourcing information at my blog at: http://www.sunshinesys.com/
    Rob

  • Calling a concurrent request from within the trigger

    Oracle apps r12.
    Calling a concurrent request from within the trigger.
    Does it requre apps initilization.
    Thanks,
    Lavan

    Hi,
    Whether apps initialization needed or not will depend on followings
    1. Trigger is written on which table seeded or custom. In case of seeded tables, there is no need for apps initialization (although oracle does not recommend writing trigger on seeded tables).
    2. Triggering Table Update/Insert/Delete event processing is done from apps front end or Backend. In case of front end apps initialization is not required.
    Regards,
    Saurabh

Maybe you are looking for

  • Help with quicksort

    Hey Guys could anyone help me out? I have this selection sort but i'm struggling to get a quick sort... class sort // method to display the contents of an array      static void displayData(int[] data)           for (int index=0; index != data.length

  • Can't figure out why FPGA code won't compile, says files are missing

    Hey guys, I get the following error, sorry for the big vomit of error code. As near as I can tell from reading that, it thinks a number of the files it requires to run some of the subvi's I'm calling are missing. I don't understand how to fix this wh

  • Central person

    Hi Gurus, Hi All, I would really appreciate if any one can help me out in this issue error "No central person is assigned to Business partner you get it when you are trying to put the person in the tree(ORG model). Role is employee which is coming fr

  • Putting an image in a scroll pane

    This is probably a simple question for most of you, but I need a little bit of help. How do I put a picture in a scroll pane? The problem I have is that I can load an image and display it, that works fine. However, let's say I am making a new frame (

  • Multiple Portlets problem for sessionBean

    Hi all, I created a Master-Detail two page database portlet using sun creator 2 update 1. The portlet was running fine both in test server and my actual portal server. But when i placed it on the same page as another portlet created by me. The portle