Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flex Mobile - update/refresh current view

Posted on 2013-05-13
7
Medium Priority
?
1,356 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
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

 

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

Meet the Family that is Made for Collaboration

The TeamConnect Family product group as part of the Sennheiser for Business Portfolio comprising high-quality, technically well-conceived meeting solutions for business communication – designed for any meeting room and any meeting situation.

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…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

705 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