How to keep view when changing tab in TabbedViewNavigatorApplication - apache-flex

I'm working on a flex 4.6 mobile project
and I found TabbedViewNavigatorApplication will destory the old view and create a new view every time change a tab.
For example, user entered some text at a textInput in View1, then user change to View2 tab and change back to View1 tab. at this time, the entered text is gone.
My question is
How to keep these view instance when changing tabs(just like iphone tabbar did)?

Did you try destructionPolicy="never"property in View component?

Related

Drop dialog on a list page not disappearing automatically

When I add a drop-dialog to a list page, the drop dialog drops down when I click on it, but does not disappear when I click somewhere else.
I am trying to add my own drop-dialog, but I can reproduce this issue with standard Dynamics AX objects. I guess I am just missing some property on an object, but I just cannot figure out which one.
If you want to reproduce my problem in order to solve it, do the following:
Create a new Form. (Form 1)
Change the FormTemplate property to ListPage (Click on Yes)
Add the query MainAccountListPage to the DataSources
Create an ActionPanTab.
Add a Drop-dialog button with the menu item MainAccountListPageBalanceParameters.
Save and open the new List page by right clicking and choosing open. (or open the menu item)
In my case, when I click on Parameters, the drop dialog drops down. When I then click outside the drop-dialog, it disappears as it should.
Create a new display menu item. Set the object to the new list page (Form 1)
Drag the Menu item to any menu. I added mine to General ledger (Common)
Restore, open new workspace. Click on the new menu item in the general ledger menu.
Click on “parameters” and click outside the drop dialog.
When I do this the drop dialog does not disappear again. You can see this same drop dialog working fine on the Main Accounts list page. I have tried changing properties on both menu items, on the menu, on the form etc. I have tried different drop dialogs and different list pages. It always works on the details page and when opened from the AOT.
Am I missing a property? Is the entire way I am adding the drop dialog wrong?
The answer to the above example is.. add the MainAccountDetailPart Form part to the list page's (Form1) Parts.
With my other example, EcoResProductPerCompanyListPage, I had to add the EcoResProductVariantsPerCompanyFactBox to Parts.
I have no idea why this is, but adding a part to a list page fixes the drop dialogs. For example, adding MainAccountDetailPart Form part to a new list page not only fixes the MainAccountListPageBalanceParameters in my example, but it also fixes any other drop dialog that previously did not want to close. Removing the part the breaks all the drop dialogs in the list page again.
Thanks, FH-Inway, for the suggestion, I would have never have found the answer without your method. The solution really surprised me!

Hide Tab in ViewNavigator in Flex/Flash Builder?

I want to hide a Tab in ViewNavigator, is this possible?
The thing is I want to have a View and a ViewNavigator, but I don't want to have the View as a Tab in the Navigator.
In other words I want to have a View that the user cannot reach from the Tabs in the Navigator. Simply a View/ViewNavigator without being a Tab in the menu.
Is this possible?
Just set visible=false and includeInLayout=false on your Tab.

open new tabs on NavBarItem clicked in Devexpress

I'm developing some Windows forms app with Devexpress, and I have something like below, a set of tabs are open which are related to "System parameters" and I want to a new set of tabs to open in place of older tabs when I click on Error navBarItem and also it should be vise versa, I saw this in demos but I don't know how to do it myself, thanks
I suggest you use a UserControl for each set of options, and when you click on an item of your navigation bar, you do the following :
Set the visible property of the current user control to false
Check if the user control associed to the clicked item exist, if yes, set it's visible property to true (reactivate it), otherwise, create an new instance of it, and dock it.
To manage this, you should have a a list of the user controls already opened, so you can reactivate them when needed.
This link may help you :-)

Navigating between views in flex

I am trying to develop a mobile application using flex. Whenever I use 'navigator.popView()' to go back to the last view that was shown, it loads a new view on to the screen, instead of using the old one itself.
On the first screen, I have a TextInput into which I enter some text, when I push next and then push back the TextInput is empty. I want to retain the text in the TextInput.
It is advisable not to keep views in memory by default, so discarding old views and creating new ones is really the desired behavior. You should bind the content of your TextInput to a variable and store and retrieve only its text value.

storyboard - how to display a tab view modally when user hits the tabbar?

I have 4 items in my TabBar. One of the items is a "WorkFlowViewController". I want to show "WorkFlowViewController" modally when the user hits that tab in my TabBar, like click on the voicemail tab on Phone App.
How to do that using segue in the storyboard?
I tried to link(Control+mouse) the TabBarViewController with the WorkFlowViewController, Storyboard segue shows four options:
1. relationship
2. push
3. modal
4. custom
if I choose "relationship", it will auto add tab item to the tabbar and works fine(not modally) when the user hits the tab.
if i choose "modal", it won't add the tab item to the tabbar, then the user has no where to click on the tab item. and i can't manually add tab item to my tabbar using storyboard.
Thanks a lot.
You can't. TabBarViewController is a container view controller and thus only option 1 (relationship) is applicable.

Resources