{pagetree:root=@self}
h2. Quando usar
* Para informar o usuário sobre ações que aconteceram no sistema.
h2. Estrutura
h2. Comportamentos
h2. Boas Práticas
h2. Exemplo
\\
{flash:file=^toaster_info.swf|width=640|height=480|align=middle}
\\
h2. Código fonte
{code}
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="startUp()">
<mx:Script>
<![CDATA[
import com.datasul.framework.ui.msg.model.UIMessage;
[Bindable]
public var _model:SampleMessagesModel = new SampleMessagesModel();
[Bindable]
public var _controller:SampleMesssagesController;
private function startUp():void {
_controller = new SampleMesssagesController(this);
}
]]>
</mx:Script>
<mx:VBox horizontalAlign="center" horizontalCenter="0" verticalCenter="0">
<mx:ComboBox id="cbTypeMessage" dataProvider="{_model.collection}"/>
<mx:HBox>
<mx:Button label="Info" id="btnInfo" click="_controller.onMessage(UIMessage.INFO, String(cbTypeMessage.selectedItem.data) )"/>
<mx:Button label="Confirm" id="btnConfirm" click="_controller.onMessage(UIMessage.INFOCONFIRM, String(SampleMessagesModel.SHOW_TOASTER) cbTypeMessage.selectedItem.data))"/>
<mx:Button label="Warning" id="btnWarning" styleName="WarningMessageButton" click="_controller.onMessage(UIMessage.WARNING, String(cbTypeMessage.selectedItem.data))"/>
<mx:Button label="Error" id="btnError" styleName="ErrorMessageButton" click="_controller.onMessage(UIMessage.ERROR, String(cbTypeMessage.selectedItem.data))"/>
</mx:HBox>
</mx:VBox>
</mx:Canvas>
{code}
h2. Referências
* [ |