<?xml version="1.0" encoding="UTF-8"?>
<process xmlns:blue="http://www.e-marson.com/bluelemon">
<descriptor>
<name>com/emarson/lemonade/examples/mobank/MainScreen</name>
<version>1.0</version>
<description>
Shows the main screen with the options read from the
dataset kept in the "permanent" location in the node
'com/emarson/lemonade/examples/mobank/MenuOptions', adding
'Update...' at the bottom.
</description>
<vendor>E-MARSON</vendor>
</descriptor>
<path>
<subprocess name="action for 'Exit'">
<source>com/emarson/lemonade/templates/ExitFromApplication</source>
<resultTo>actionForExit</resultTo>
</subprocess>
<subprocess name="action for 'Update'">
<source>com/emarson/lemonade/examples/mobank/Update</source>
<resultTo>actionForUpdate</resultTo>
</subprocess>
<action name="main menu">
<type>general/bluelemon/code</type>
<definition resultTo="mainMenu">
<blue:get node="com/emarson/lemonade/examples/mobank/MenuOptions"
location="permanent" toVariable="menuOptions"/>
<blue:call manager="UtilsManager" method="this" toVariable="lastRow">
<blue:argument type="dataset">
<blue:descriptor>
<blue:field type="String"/>
<blue:field type="byteArr"/>
</blue:descriptor>
<blue:row>
<blue:field value="Update..."/>
<blue:field contextKey="actionForUpdate"/>
</blue:row>
</blue:argument>
</blue:call>
<blue:call manager="UtilsManager" method="appendLast"
toVariable="menuOptions">
<blue:argument type="variable" name="menuOptions"/>
<blue:argument type="variable" name="lastRow"/>
</blue:call>
<blue:newInstance module="com/emarson/lemonade/bluelemon/midp1/ChoiceFactory"
toVariable="choiceFactory"/>
<blue:call object="choiceFactory" method="createList"
toVariable="list">
<blue:argument type="byte" value="List.IMPLICIT"/>
</blue:call>
<blue:call object="list" method="initialize">
<blue:argument type="String" value="moBank"/>
<blue:argument type="variable" name="menuOptions"/>
</blue:call>
<blue:call manager="UtilsManager" method="getActionCommand"
toVariable="command">
<blue:argument type="String" value="Exit"/>
<blue:argument type="byte" value="ActionCommand.EXIT"/>
<blue:argument type="byte" value="0"/>
<blue:argument type="byteArr" contextKey="actionForExit"/>
</blue:call>
<blue:call object="list" method="addCommand">
<blue:argument type="variable" name="command"/>
</blue:call>
<blue:call manager="GeneralManager" method="setCurrent">
<blue:argument type="variable" name="list"/>
</blue:call>
</definition>
</action>
<finish name="done">
<return>mainMenu</return>
</finish>
</path>
</process>