Solved

Flex Mobile - update/refresh current view

Posted on 2013-05-13
7
1,232 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now