Solved

Flex Mobile - update/refresh current view

Posted on 2013-05-13
7
1,296 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
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

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 Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

740 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