Solved

Flex Mobile - update/refresh current view

Posted on 2013-05-13
7
1,306 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

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 500 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

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…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses

752 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