Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
bitwyse #1
Question regarding ViewStack
Hi All,
I am having an issue with the ViewStack when the user clicks the back button.
The browser takes them back a page however, my Flex application doesn't
recognize the change thus none of my links work on the previous page. Let me
give an example as that sounds confusing.
The user is viewing a page in my application. Lets call it page one. On page
one the user can click a link to go to page 2. Now the user is viewing page 2
and clicks the back button to go back to page 1. For some reason the link to
page 2 no longer works. I have found that if I go back to page 1 by using
something other than the back button say a flex button, then the links on page
2 will work. Below is some sample code of how I am working with the ViewStack
Links and Buttons . . .
Thanks for any help you can offer .. . ..
private function showPage( pageNumber : Number ) : void
{
switch( pageNumber )
{
case (1) :
model.workflowState = ModelLocator.PAGE_1;
break;
case (2) :
model.workflowState = ModelLocator.PAGE_2;
break;
case (3) :
model.workflowState = ModelLocator.PAGE_3;
break;
}
}
public function getView( workflowState : Number ) : Container
{
switch( workflowState )
{
case ( ModelLocator.PAGE_1 ) :
return somePage1;
case ( ModelLocator.PAGE_2 ) :
return somePage2;
case ( ModelLocator.PAGE_3 ) :
return somePage3;
}
return pageError;
}
<mx:ViewStack id="appView" width="100%" height="100%"
selectedChild="{getView( model.workflowState )}"
historyManagementEnabled="true">
<view:Page1 id="somePage1" />
<view:Page2 id="somePage2" />
<view:Page3 id="somePage3" />
</mx:ViewStack>
<mx:Text styleName="linkText" text="Link to Page 2" mouseChildren="false"
buttonMode="true" useHandCursor="true" click="showPage(2)"/>
<mx:Button label="Go to Page 1" click = "showPage(1)"/>
bitwyse Guest
-
Can I user Repeater in a ViewStack?
Can I user Repeater in a ViewStack like this/? <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"... -
possible ViewStack bug
There seems to be something wrong with the mx:ViewStack.... I think the code is pretty obvious but what happens is that when a Tree is inside a... -
ViewStack issue
Hello, I have a viewstack called myviewstack1 having three view children i.e. view1,view2 and view3. I also have another view stack called my... -
Binding a ComboBox to a ViewStack
Hi all, Anybody have any luck getting a ComboBox to bind to a ViewStack? I'm trying to set it up so that the ComboBox will use the... -
ViewStack Problem!
Hi All, I have a problem with ViewStack, when I click the first time on the first button that called a file, for example when I click on "SMET... -



Reply With Quote

