適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: 從伺服器擷取資料...
從伺服器擷取資料...
mx.managers 

HistoryManager  - AS3 Flex

套件mx.managers
類別public class HistoryManager
繼承HistoryManager Inheritance Object

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

History management lets users navigate through a Flex application using the web browser's Back and Forward navigation commands.

In general, you should use the BrowserManager class and deep linking for maintaining state in an application and manipulating URLs and browser history, but the HistoryManager class can be useful under some circumstances, such as if you are maintaining a legacy Flex application. You cannot use the HistoryManager and the BrowserManager classes in the same Flex application, even though they use the same set of supporting files.

History management is enabled by default for the Accordion and TabNavigator containers. This means that if the user selects one of the panes in an Accordion control, that user can return to the previous pane by using the browser's Back button or back navigation command. History management is disabled by default for the ViewStack navigator container.

You can disable history management by setting the navigator container's historyManagementEnabled property to false.

You can also enable history management for other objects in an application by registering the objects with the HistoryManager. To register a component with the HistoryManager class, you call the HistoryManager class's register() method with a reference to a component instance that implements the IHistoryManagerClient interface. In the following example, the Application component (this) is registered with the HistoryManager class when the Application is initialized:

  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
    implements="mx.managers.IHistoryManagerClient" 
    initialize="mx.managers.HistoryManager.register(this);">
  
You must also implement the saveState() and loadState() methods of the IHistoryManagerClient interface to complete the registration of the component. Components that extend UIComponent automatically inherit the loadState() method.

All methods and properties of the HistoryManager are static, so you do not need to create an instance of it.

相關 API 元素



公用屬性
 屬性定義自
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
公用方法
 方法定義自
 Inherited
指出物件是否有已定義的指定屬性。
Object
  
[靜態] DEPRECATED - Initializes the HistoryManager.
HistoryManager
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
  
[靜態] Registers an object with the HistoryManager.
HistoryManager
  
[靜態] Saves the application's current state so it can be restored later.
HistoryManager
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
 Inherited
傳回代表此物件的字串,根據地區特定慣例進行格式化。
Object
 Inherited
會傳回指定之物件的字串形式。
Object
  
[靜態] Unregisters an object with the HistoryManager.
HistoryManager
 Inherited
會傳回指定之物件的基本值。
Object
方法詳細資訊

initialize

()方法
public static function initialize(sm:ISystemManager):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

DEPRECATED - Initializes the HistoryManager. In general, this does not need to be called because any time you add a component with historyManagementEnabled, Flex calls this method. However, the HistoryManager will not work correctly if it is not initialized from the top-level application. So, if your application does not have any HistoryManager enabled components in it and loads other sub-applications That do, you must call the HistoryManager.initialize() method in the main application, usually from an initialize event handler on the application.

參數

sm:ISystemManager — SystemManager for this application.

register

()方法 
public static function register(obj:IHistoryManagerClient):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Registers an object with the HistoryManager. The object must implement the IHistoryManagerClient interface.

參數

obj:IHistoryManagerClient — Object to register.

相關 API 元素

save

()方法 
public static function save():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Saves the application's current state so it can be restored later. This method is automatically called by navigator containers whenever their navigation state changes. If you registered an interface with the HistoryManager, you are responsible for calling the save() method when the application state changes.

unregister

()方法 
public static function unregister(obj:IHistoryManagerClient):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Unregisters an object with the HistoryManager.

參數

obj:IHistoryManagerClient — Object to unregister.





[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。