Navigating through objects in flex and refreshing them

In an mxml file called Rate,
I have a vertical box called stepsVB and an array called steps.
This stepsVB is activated in a state called "states"
when currentState = "" i see something else.
steps contain objects of mxml files. step1.mxml, step2.mxml, step3.mxml and step4.mxml
when i click on the next button, I navigate from step1 to step2 and so on using
stepsVB.removeChildAt(0);
stepsVB.addChildAt(steps[2], 0);
when i move from step1 to step2 and step2 to step3 and change my currentState to "", if I press my next button, i see step3 instead of step1.
How do I move to step1 instead of step3. Also, I need to execute my creation complete method for each step as I move.
In other words, I need to set it up in such a way that the whole flex file refreshes. How do I accomplish this?
Your help is greatly appreciated.
Thank you very much
Nikhil

Hi,
If you want to map your actionscript class to your server's
Java class. You can run a util function
registerClassAlias("dev.echoservice.Book",Book);
where "dev.echoservice.Book" is the fully qualify name of
your java class. Book is your actionscript class.
Calling this util before you make your remoteobject call. You
can put this in your actionscript class constructor, it makes this
call whenever you create your class. However, it seems to be better
to call it when the class is loaded. To do so you can declare it as
static
public static var a:* =
registerClassAlias("dev.echoservice.Book",Book);
OR
You can also declare it as metaData in your class as:
[RemoteClass(alias="dev.echoservice.Book")]
However, I found someone saying that it didn't work in sdk
compilation, but webtier compilation. It might be some
configuration issue. I haven't tried it yet.
To display the properties in the dataGrid, you just have to
either use Array or ArrayCollection. If databinding is involved,
the datagrid need to know the Collection.Change event. It is better
to use ArrayCollection, therefore, adding new item to
arrayCollection the datagrid get repopulate.
hope it helps!
William Chan

Similar Messages

  • I have purchased books through my kindle subscription and downloaded them to my ipad2. how do i get those books into itunes?

    i have purchased books through my kindle subscription and downloaded them to my ipad2. how do i get those books into itunes?

    You can't. Kindle is a different ecosystem than iTunes. Generally, you choose your book ecosystem and you stick with it or you have books in both (or in several).
    There is a Kindle app for the iPad and iPhone that is just as good (and in my opinion substantially better) than the Apple iBook app.
    Most purchased books (but not all) have Digital Rights Management that prevent them from being shared or moved easily. Books purchased on iTunes are meant to be used on your iPad with iBooks. Books purchased on Amazon Kindle are meant to be used on your Kindle apps.

  • HT4534 i installed facetime for my mac and now when i make a call it goes through i can see and hear them perfectly but they cannot, i am "frozen" so how do i fix this?

    i installed facetime for my mac and now when i make a call it goes through i can see and hear them perfectly but they cannot, i am "frozen" so how do i fix this?

    When I try to make a call it will go through and I can hear the other person but they cannot hear me, is there a setting that disables the speaker when using the headphones to try to make a call, also speakerphone automatically goes on when I start a call which I do not like, any suggestions how to fix this?
    I also have this problem...........

  • How to loop through many XML messages and parse them ?

    Hi All
    I have been trying very hard to loop through many XML messages and process each of them. Let me first explain the problem -
    Suppose I have the following String -
    <xyz>
    <abc>happy</abc>
    </xyz>
    <xyz>
    <abc>new</abc>
    <xyz>
    <xyz>
    <abc>year</abc>
    </xyz>
    I have to process each message within the <xyz></xyz> tag and find the falue of <abc> element (happy, new and year).
    The extraction of <abc> value is very simple, I am using SAX parser's startElement() method to check every element's name and if the element's name is <abc> pick up the value. But I am not able to loop through the different messages within the <xyz></xyz> tag.
    I am thinking of using another DOM parser -
    DOMParser domParser = new DOMParser();
    StringReader rdr = new StringReader(inputXML);
    InputSource src = new InputSource(rdr);
    domParser.parse(src);
    Document doc = domParser.getDocument();
    NodeList nodeList = doc.getElementsByTagName("xyz");
    Now I can loop through this nodeList, but not able to. Is using the DOM parser and NodeList the preferable way of lopping through the messages, then how I can loop through ? Or is there any other way ?
    I have been trying on this for quite a few days, but not able to. Can you please help me out ?
    Thanking you in advance ....
    Nirmalya Sinha

    Hi,
    Try using the SAX reader from the dom4j package. The document object that you receive contains methods for getting the root elements and with that you can traverse down to the sub elements of it.
    Hope this was of some help.

  • Dynamic value objects in flex and coldfusion 9

    I'm writing a program for a company that does registrations for conventions and trade-shows.  The problem I'm having is that each different client wants to store different data for each show.  Most of the data is the same (attendee's name, address, etc...), but each show has some customizations that it wants to have...  So each database for each show is going to be different...
    Right now, the only way I know how to transfer data from Flex to ColdFusion is via a Value Object.  (Well, the only good way to do it, that is.)  My problem comes when a client wants a particular database customized.  I have MANY questions about this...
    1) How do I tell my Value Object what fields we've added to or changed in the database without re-writing the entire VO (in both the .AS and .CFC files) and re-compiling my program?  In other words, I need a dynamic VO that changes automatcially with the database.
    2) If there is a way to dynamically create a VO in Flex (and from a few blog posts I've seen, it seems there is a way), how do I tell CF9 what the structure of that dynamically-created VO is?  Without re-writing a bunch of .CFC files every time I add or change a field in the database, that is...
    3) How do I reference the dynamically-created fields in my Flex program?  Right now, for example, I can define a variable called attendeeInfo as type attendeeInfoVO, and then reference things like attendeeInfo.first_name, attendeeInfo.last_name, etc...  How do I reference a field programmatcially when I don't know what it's going to be called beforehand?
    4) How do I make my program display/modify those dynamically-created fields?  Right now, using the attendeeInfo example above, I can create a TextInput with an id="firstNameInput" and just say firstNameInput.text = "{attendeeInfo.first_name}".  That won't work when I have no clue how many dynamically-created fields there are, or even what kind of data they're going to store...  How do I deal with this?
    5) Is there something other than VOs that would fit this situation better?  Am I limiting myself by using VOs in the first place?  Is it just plain impossible to do this with VOs?  And if so, what are my alternatives?  I need a structured object that can be passed around with a single reference -- I absolutely DO NOT want to pass a bunch of references to a bunch of different variables -- that's why I used VOs from the very beginning.
    6) Can I simply PAY someone at Adobe for one-on-one help here?  Do they have experts that you can "buy" for a few hours?  What's the charge for that, if such a thing is available?  Or, is this problem well-explained somewhere on the Web, and I just haven't found it yet?
    I'm very confused here, and it seems like I might have to re-write a ton of code, which I'm not looking forward to...  Ugh...  I appreciate any help you can give me...
    Thanks,
    Laurence MacNeill
    Mableton, Georgia, USA

    This blog post is pretty close to what I want:
    http://justinjmoses.wordpress.com/2008/10/10/flex-dynamic-bindable-value-objects/
    So there are the dynamic value objects I was looking for.  But the blog-poster is using LINQ and .Net 3.5.  I'm using ColdFusion9.
    So, how do I get ColdFusion9 to deal with that?  How do you get CF9 to recognize the fact that you've changed the VO, and deal with it appropriately?
    Thanks,
    L.

  • Navigation through a new role and persistence of user properties

    Hi there,
    I have a question related to roles and user-experience in the SAP Enterprise Portal.
    Depending on the preference of the portal user I would like to offer a different navigation by assiging a new role to the user.
    For example initially a role offers the navigation show below:
    Role 1:
    Toplevel navigation:     Entry A        Entry B     Entry C
    After a user request for a different navigation the order of the toplevel navigation changes.
    Role 2:
    Toplevel navigation:    Entry B     Entry C    Entry A     
    In order to realize this, I created two worksets for Entry A. By using merge-ids and a difference in sorting I managed to move the Entry A to the end of the toplevel navigation bar after assiging role 2.
    However I noticed that iView properties set by the portal users under role1 are lost after assigning the role2. Is there any way a user can keep the properties set under a previous role when getting assigned to a new role that has the same page?
    Thanks in advance,
    Arko

    FacesContext context = FacesContext.getCurrentInstance();
    context.getApplication().getNavigationHandler().handleNavigation(context,
    null,
    "<<NAVIGATION STRING>>");
    Thanks,
    Navaneeth

  • How to loop through Multiple Excel sheets and load them into a SQL Table?

    Hi ,
    I am having 1 excel sheet with 3 worksheet.
    I have configured using For each loop container and ADO.net rowset enumerator.
    Every thing is fine, but after running my package I am getting below error
    [Excel Source [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may
    be error messages posted before this with more information on why the AcquireConnection method call failed.
    Warning: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified
    in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    [Connection manager "Excel Connection Manager"] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by
    another user, or you need permission to view and write its data.".
    Pleas suggest me the correct way of solving above issues.
    Thanks in advance :)
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

    Hi ,
    Please refer the below link for Looping multiple worksheet in a single SQL Table.
    http://www.singhvikash.in/2012/11/ssis-how-to-loop-through-multiple-excel.html
    Note:-If you using excel 2010 then you have to use EXCEL 12.0 .
    Above link explaining  step by step of Looping multiple worksheet in a single SQL Table.
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

  • HELP:script that iterates through all opened documents and rezise them to match the biggest one.

    Hi,
    I'm making a batch processing action and I really need a script that iterates through all open documents, finds the one with the biggest image size and then iterates one more time to change the rest of the documents to the same image size dimensions. At the end all documents must share identical image size.  I'll really  appreciate if someone can put a quick script for doing this. Thank you !

    I think should do…
    #target photoshop
    if (documents.length > 1) {
         var smallest = 1000000; // Set beyond any size you may be expecting this should do?
         for (var a = 0; a < documents.length; a++) {
              smallest = Math.min(smallest,documents[a].width.as('px'));
         for (var b = 0; b < documents.length; b++) {
              if (documents[b].width.as('px') != smallest) {
                   app.activeDocument = documents[b];
                   var newWidth = new UnitValue(smallest, 'px');
                   documents[b].resizeImage(newWidth,undefined,undefined,ResampleMethod.BICUBICSMOOTHER);
    }else{
         alert("NOT enough docs to resize?");

  • I have subscribed to several podcasts, but they have recently stopped updating when I try and refresh them.  How do i fix this?

    Updating Podcasts

    Well, in the end I contacted Apple and it was rather hit and miss but the problem was solved by deleteing the com.apple.mail.savedState file.  It took them a bit of time to sort it out and I had to be promoted up the chain of support but it worked.  Hope this is of use to others with the same problem,

  • HT201281 I just ordered some letterpress cards through My iPhoto application and received them.. Now I want to order more and cannot find where to go to reorder them.

    Where do you go for a reorder of the letterpress cards?  Need more and can't seem to find the card I created anywhere.

    You order more by using iPhoto just like you did for the first order.  Go to the card and click on the Buy Card button and order the quantity that you need.
    OT

  • How to dynamically add an object into flex and animate it.

    im planning to implement a dynamic animation which can be used to show some trend of a variable
    this is my case..
    suppose i have data in a table
    Y      |      X
    12       |     3
    32       |     5
    34       |      10
    what i want to do is i want to insert a circle to (3,12) i.e. the first point.. then animate it with the time to next points
    (3,12) --> (5,32) --> (10,34)
    this process hv to be totally dynamic.. becos im planning to fetch data from a table.. so the no of rows also can be any amount.
    is thr a method to do those stuff in flex. ?
    thanks in advance

    Anyone got any suggestions?

  • Spawning Objects to Stage and making them move a certain distance in a given direction.

    Here is my code:
    function createEnemy(event:TimerEvent):void
                    var enemyAppear = new MovieClip;
                    enemyAppear = new Enemy();
                    enemyAppear.x = Math.random()*stage.stageWidth;
                    enemyAppear.y = 285;
                    enemyStorage.addChild(enemyAppear);
                    //Removes Enemy From Stage and adds a point to scoreboard
                    stage.addEventListener(MouseEvent.CLICK, clickEnemy);
                    function clickEnemy(event:MouseEvent):void
                    if(cursor.hitTestObject(enemyAppear))
                            enemyAppear.parent.removeChild(enemyAppear);
                            stage.removeEventListener(MouseEvent.CLICK, clickEnemy);
                            score++
                            messageDisplay.text = String(score);
    What I am trying to do is spawn a enemy to stage and when it appears on the stage I would like it to move across the stage a certain distance.
    Visual Example:
    O = enemy,   X = original position, Y = new position
    O (Spawns @ Location X)   X ---------------------------------------------------------> Y ( Moved from location X to Location Y)
    Any help would be appreciated.
    Thanks Casey

    You can start by trying the built-in Tween class, and if you're happy with getting that working the way you want, you can consider moving on to a third party tweening class such as TweenLite...
    import fl.transitions.Tween;
    var certainDistance:Number = 200;
    var moveTime:Number = 2; // seconds
    function createEnemy(event:TimerEvent):void
                    var enemyAppear = new Enemy();
                    enemyAppear.x = Math.random()*stage.stageWidth;
                    enemyAppear.y = 285;
                    enemyStorage.addChild(enemyAppear);
                    //Removes Enemy From Stage and adds a point to scoreboard
                    stage.addEventListener(MouseEvent.CLICK, clickEnemy);
                     var tweenX:Tween = new Tween(enemyAppear, "x", null, enemyAppear.x, enemyAppear.x+certainDistance, moveTime, true);// tween out
                    function clickEnemy(event:MouseEvent):void
                    if(cursor.hitTestObject(enemyAppear))
                            enemyAppear.parent.removeChild(enemyAppear);
                            stage.removeEventListener(MouseEvent.CLICK, clickEnemy);
                            score++
                            //messageDisplay.text = String(score);

  • My songs skip when i have other programs running and am navigating through them, how do I fix this?

    My songs skip when I have multiple windows running and am navigating through them, it is quite irratating!

    First try deleting the songs and redownloading them
    Downloading past purchases from the App Store, iBookstore, and iTunes Store         
    Next
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync/delete all music and resync
    To delete all music go to Settings>General>Usage>Storage>Music>Tap edit in upper right and then tap the minus sign by All Music
    - Reset all settings                 
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       

  • HT4972 i am not getting notification on most of my apps, e.g twitter and facebook...except i go to the app and refreshed manually. its an iphone 4 and running on ios5...i have gone through everything and its still the same..help please........I seem to be

    i am not getting notification on most of my apps, e.g twitter and facebook...except i go to the app and refreshed manually. its an iphone 4 and running on ios5...i have gone through everything and its still the same..help please........
    I seem to be having the same problem on my brand new iPhone 4S. Everything was working fine on the phone until I updated to iOS 5.1.1, but now I no longer receive push notifications for the native Mail app, Instagram, or the Facebook app. I still seem to be receiving SMS texts and iMessages via push, but the aforementioned apps need to be opened before I can receive missed notifications (having them open in the background seems to make no difference).
    Thanks for any help that you may provide!

    did you try notifications under settings? You can customize it as per your requirement, for each application.
    check this out: http://www.gottabemobile.com/2011/10/12/ios-5-how-to-use-notification-center/ or http://reviews.cnet.com/8301-19512_7-20120625-233/ios-5-notifications-a-deeper-l ook/

  • I lost my HOME and REFRESH buttons and don't know why. Since I can't have them anymore please tell me in detail how I get rid of Mozilla Foxfire and let me know what all I'm going to lose in the process. Thanks, Neil

    I have used Mozilla Firefox for almost a year and it was good. Now I make on stupid mistake by upgrading to the new version and I lose my Home button, Refresh button and I don't know how many other buttons.
    Since I can't have WHAT I USED TO HAVE please explain in detail how I rid of Mozilla Firefox and what I'm all going to lose in the process.

    The home icon by default has moved to the right hand side of the navigation toolbar.
    In Firefox 4 by default the Stop, Go and Reload (Refresh) buttons are combined and attached to the right hand edge of the location bar.
    When you are typing in the location bar it will show the Go button. When a site is loading it shows the Stop button. At other times it shows the Reload button.
    If you want separate buttons stop/go/reload buttons, or want to move the home button, right-click on a toolbar and choose Customize, you can then drag and drop the buttons and place them elsewhere. If you place them in the order "Reload-Stop" on the right hand edge of the location bar they will be combined again. For more details on customizing the toolbar see https://support.mozilla.com/kb/How+to+customize+the+toolbar

Maybe you are looking for