Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Flex Mobile - update/refresh current view

Posted on 2013-05-13
7
Medium Priority
?
1,389 Views
Last Modified: 2013-05-19
Hello

I am in this simple position where I wan't a button to refresh the current view, how can this be done?
0
Comment
Question by:JoachimPetersen
  • 3
  • 2
  • 2
7 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 39163145
0
 

Author Comment

by:JoachimPetersen
ID: 39163774
I am in a Flex Mobile project, the code in the article will reload current webpage in the current browser, if your in a webbrowser. I am however not in a webbrowser.
0
 
LVL 19

Expert Comment

by:Gary Benade
ID: 39164371
The concept of doing a page refresh doesn't really fit a flex application

You can force a displayObject to redraw itself by doing this:

this.invalidateDisplayList();
this.updateDisplayList();

This just redraws the displayObject and it's children though, it may not be what you are looking for

If you can give me a better idea of what you want to update I can help more (I'm thinking that you may need to be using data binding..?)
0
Lessons on Wi-Fi & Recommendations on KRACK

Simplicity and security can be a difficult  balance for any business to tackle. Join us on December 6th for a look at your company's biggest security gap. We will also address the most recent attack, "KRACK" and provide recommendations on how to secure your Wi-Fi network today!

 

Author Comment

by:JoachimPetersen
ID: 39164971
my navigation is placed in the MXML Application - holds the actionbar(my refresh button is on the actionbar), I want to re-navigate to the current active view, how can this be done? or if it is possible to run the current view's creationComplete or initialize function?
0
 
LVL 29

Expert Comment

by:dgofman
ID: 39165206
0
 

Author Comment

by:JoachimPetersen
ID: 39173265
So there is no way of executing the current view(navigator.activeView) creationComplete function? or atleast navigate to the currentview with navigator.pushView?

I just need to read the creationComplete  function from the currentview as I then can use:
Object(navigator.activeView).THE_Function
0
 
LVL 19

Accepted Solution

by:
Gary Benade earned 1500 total points
ID: 39174342
You could just trigger a new event for the handler

navigator.activeView.dispatchEvent( new FlexEvent( FlexEvent.CREATION_COMPLETE));

you need to:
import mx.events.FlexEvent;
0

Featured Post

Reclaim your office - Try the MB 660 headset now!

High level of background noise often makes it difficult for employees to concentrate fully on their jobs – or to communicate clearly on calls. The MB 660 headset helps you create a disruption free workspace.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question