(Beta)
Package | com.adobe.mosaic.om.interfaces |
Interface | public interface IView extends IMosaicNode , IDisplayable |
Language Version: | ActionScript 3.0 |
Product Version: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5 |
Runtime Versions: | AIR 2.0.2, Flash Player 10.1 |
IView
interface defines methods for adding panels, saving views, and retrieving
view context and a list of panels.
Public Properties
Property | Defined By | ||
---|---|---|---|
childrenNodes : Array [read-only]
Returns an array of child nodes (IMosaicNode objects) of the node. | IMosaicNode | ||
context : IContext [read-only]
Returns the context interface for a view. | IView | ||
displayed : Boolean [read-only]
Determines if the selected node is currently displayed. | IDisplayable | ||
nodeId : String [read-only]
Returns the ID of the node. | IMosaicNode | ||
nodeLabel : String
Returns the label of the tile. | IMosaicNode | ||
nodeName : String [read-only]
Returns the name of the node. | IMosaicNode | ||
nodeType : String [read-only]
Returns the type value of the node. | IMosaicNode | ||
panels : Array [read-only]
Returns an array of panels that exist within a view. | IView | ||
parentNode : IMosaicNode [read-only]
Returns the direct parent node of the current node within the application. | IMosaicNode |
Public Methods
Method | Defined By | ||
---|---|---|---|
Adds a new panel instance to the view. | IView | ||
Navigates the application until the selected node is displayed. | IDisplayable | ||
Oens a pop-up window for saving the current view where users can then input description for the view. | IView | ||
save(label:String, description:String = null, onSuccess:Function = null, onFailure:Function = null):void
Programmatically saves the view with a label and description. | IView |
Property Detail
context | property |
context:IContext
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5 |
Runtime Versions: | AIR 2.0.2, Flash Player 10.1 |
Returns the context interface for a view. View contexts are specific to each particular view.
Implementation
public function get context():IContext
Related API Elements
panels | property |
panels:Array
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5 |
Runtime Versions: | AIR 2.0.2, Flash Player 10.1 |
Returns an array of panels that exist within a view.
Implementation
public function get panels():Array
Method Detail
addPanel | () | method |
public function addPanel(panel:IPanel):void
Language Version: | ActionScript 3.0 |
Product Version: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5 |
Runtime Versions: | AIR 2.0.2, Flash Player 10.1 |
Adds a new panel instance to the view.
Parameters
panel:IPanel — A new instance of a panel, that implements IPanel .
|
Related API Elements
requestSave | () | method |
public function requestSave():void
Language Version: | ActionScript 3.0 |
Product Version: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5 |
Runtime Versions: | AIR 2.0.2, Flash Player 10.1 |
Oens a pop-up window for saving the current view where users can then input description for the view.
save | () | method |
public function save(label:String, description:String = null, onSuccess:Function = null, onFailure:Function = null):void
Language Version: | ActionScript 3.0 |
Product Version: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5 |
Runtime Versions: | AIR 2.0.2, Flash Player 10.1 |
Programmatically saves the view with a label and description. Users are not presented with a user interface to input view details.
Parameters
label:String — The label to use for the view.
| |
description:String (default = null ) — The text description for this view.
| |
onSuccess:Function (default = null ) — A function that takes in one parameter of type Event that is called when the view is saved successfully.
| |
onFailure:Function (default = null ) — A function that takes in one parameter of type Event that is called when the view save fails.
|
Examples How to use this example
IView_example.mxml
<?xml version="1.0" encoding="utf-8"?> <mc:Tile xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mc="com.adobe.mosaic.core.*" applicationComplete="initTile()"> <fx:Script> <![CDATA[ import mx.controls.Alert; import com.adobe.mosaic.om.interfaces.IPanel; import com.adobe.mosaic.om.interfaces.IView; private function initTile():void { var viewCurrent:IView = this.parentView; // Add an empty panel to this view var panelNew:IPanel = this.mosaicApp.createBlankPanel(); panelNew.nodeLabel = "Blank panel"; viewCurrent.addPanel(panelNew); // List all of the panels in this view for each (var panelTemp:IPanel in viewCurrent.panels) { labelPanels.text += '\n' + " " + panelTemp.nodeLabel; } } // Saves the current view to the user view list in the organizer private function saveView(strSavedViewLabel:String, strSavedViewDescription:String = null):void { this.parentView.save(strSavedViewLabel, strSavedViewDescription, onSaveViewSuccess, onSaveViewFailure); } // Handler for successfully saving the view private function onSaveViewSuccess(event:Event):void { Alert.show("View was saved"); } // Handler for if an error occured while saving the view private function onSaveViewFailure(event:Event):void { Alert.show("View was not saved"); } ]]> </fx:Script> <s:Label id="labelPanels" text="Panels in this view:"/> <s:Group> <s:Label x="5" y="10" text='Save this view:' fontWeight="bold"/> <s:Label x="15" y="35" text="View label:"/> <s:TextInput x="141" y="30" id="inputViewToSaveLabel" width="250"/> <s:Label x="15" y="65" text="Description (optional):"/> <s:TextInput x="141" y="60" id="inputSaveViewDescription" width="250"/> <s:Button x="400" y="60" id="buttonSaveView" label="Save view" click="saveView(inputViewToSaveLabel.text, inputSaveViewDescription.text)"/> </s:Group> </mc:Tile>
Wed Nov 21 2018, 06:34 AM -08:00