Menu

[r195]: / cairngorm3 / trunk / libraries / NavigationTest / src / ToggleButtonBarSample.mxml  Maximize  Restore  History

Download this file

56 lines (47 with data), 1.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
layout="vertical"
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:presentation="togglebuttonbarsample.presentation.*"
xmlns:spicefactory="http://www.spicefactory.org/parsley/flex"
xmlns:cairngorm="com.adobe.cairngorm.*"
addedToStage="setupParsley()">
<mx:Script>
<![CDATA[
import com.adobe.cairngorm.navigation.history.IHistory;
import togglebuttonbarsample.ToggleButtonBarContext;
import org.spicefactory.parsley.flex.FlexContextBuilder;
import togglebuttonbarsample.presentation.ContentPM;
[Bindable]
[Inject]
public var model:ContentPM;
[Bindable]
[Inject]
public var history:IHistory;
private function setupParsley():void
{
FlexContextBuilder.build(ToggleButtonBarContext, this)
dispatchEvent(new Event('configureIOC', true));
}
]]>
</mx:Script>
<cairngorm:CairngormNavigationLib/>
<mx:HBox>
<mx:ToggleButtonBar
dataProvider="{ model.buttonBar }"
selectedIndex="{ model.selectedIndex }"
itemClick="model.navigationBarHandler(event)"/>
<mx:Label
width="300"
text="selectedName: { model.selectedName }"/>
<mx:Label text="History:"/>
<mx:Button
label="previous" enabled="{ history.hasPrevious }"
click="history.previous()"/>
<mx:Button
label="next" enabled="{ history.hasNext }"
click="history.next()"/>
</mx:HBox>
<presentation:ContentNavigator
width="100%" height="100%"/>
</mx:Application>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.