(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 |
---|
Property Detail
Method Detail
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