<?xml version="1.0" encoding="UTF-8"?>
<process xmlns:blue="http://www.e-marson.com/bluelemon">
<descriptor>
<name>com/emarson/lemonade/examples/mobank/moaccount/TransferScreen</name>
<version>1.0</version>
<description>
This is the screen with two text fields.
User can specify the ammount of money to transer and the
target account number. The validation is being processed,
as both of those fields are required.
</description>
<vendor>E-MARSON</vendor>
</descriptor>
<path>
<action name="action for 'Cancel'">
<type>general/bluelemon/code</type>
<definition resultTo="goToMainScreen">
<blue:call node="com/emarson/lemonade/examples/mobank/moaccount/MainScreen"
location="@com/emarson/lemonade/examples/mobank/moaccount"/>
</definition>
</action>
<subprocess name="action for 'OK'">
<source>com/emarson/lemonade/examples/mobank/moaccount/Validate</source>
<resultTo>readFieldsAndProceed</resultTo>
</subprocess>
<action name="a form to specify transer data">
<type>general/bluelemon/code</type>
<definition resultTo="screen">
<blue:newInstance module="com/emarson/lemonade/bluelemon/midp1/TextField"
toVariable="ammountField"/>
<blue:call object="ammountField" method="initialize">
<blue:argument type="String" value="Ammount [EUR]:"/>
<blue:argument type="String" value=""/>
<blue:argument type="byte" value="8"/>
<blue:argument type="byte" value="TextField.NUMERIC"/>
</blue:call>
<blue:newInstance module="com/emarson/lemonade/bluelemon/midp1/TextField"
toVariable="targetAccountField"/>
<blue:call object="targetAccountField" method="initialize">
<blue:argument type="String" value="To account:"/>
<blue:argument type="String" value=""/>
<blue:argument type="byte" value="16"/>
<blue:argument type="byte" value="TextField.NUMERIC"/>
</blue:call>
<blue:newInstance module="com/emarson/lemonade/bluelemon/midp1/Form"
toVariable="form"/>
<blue:call object="form" method="initialize">
<blue:argument type="String" value="Transfer"/>
</blue:call>
<blue:call object="form" method="appendItem">
<blue:argument type="variable" name="ammountField"/>
</blue:call>
<blue:call object="form" method="appendItem">
<blue:argument type="variable" name="targetAccountField"/>
</blue:call>
<blue:call manager="UtilsManager" method="getActionCommand"
toVariable="command">
<blue:argument type="String" value="Cancel"/>
<blue:argument type="byte" value="ActionCommand.BACK"/>
<blue:argument type="byte" value="0"/>
<blue:argument type="byteArr" contextKey="goToMainScreen"/>
</blue:call>
<blue:call object="form" method="addCommand">
<blue:argument type="variable" name="command"/>
</blue:call>
<blue:call manager="UtilsManager" method="getActionCommand"
toVariable="command">
<blue:argument type="String" value="OK"/>
<blue:argument type="byte" value="ActionCommand.OK"/>
<blue:argument type="byte" value="0"/>
<blue:argument type="byteArr" contextKey="readFieldsAndProceed"/>
</blue:call>
<blue:call object="form" method="addCommand">
<blue:argument type="variable" name="command"/>
</blue:call>
<blue:call manager="GeneralManager" method="setCurrent">
<blue:argument type="variable" name="form"/>
</blue:call>
</definition>
</action>
<finish name="done">
<return>screen</return>
</finish>
</path>
</process>