<?xml version="1.0" encoding="UTF-8"?>
<process xmlns:blue="http://www.e-marson.com/bluelemon">
<descriptor>
<name>com/emarson/lemonade/examples/mobank/moaccount/HistoryDetailsScreen</name>
<version>1.0</version>
<description>
The action which is invoked when a user selects any element from
the history list screen.
</description>
<vendor>E-MARSON</vendor>
</descriptor>
<path>
<action name="action for 'Back'">
<type>general/bluelemon/code</type>
<definition resultTo="goToHistoryScreen">
<blue:call node="com/emarson/lemonade/examples/mobank/moaccount/HistoryScreen"
location="@com/emarson/lemonade/examples/mobank/moaccount"/>
</definition>
</action>
<action name="show the transfer details">
<type>general/bluelemon/code</type>
<definition resultTo="screen">
<blue:call manager="GeneralManager" method="getCurrent"
toVariable="screenWithDates"
castTo="com/emarson/lemonade/bluelemon/midp1/List"/>
<blue:call object="screenWithDates" method="getSelectedIndex"
toVariable="selectedIndex"/>
<blue:get node="com/emarson/lemonade/examples/mobank/moaccount/HistoryData"
location="permanent" toVariable="historyDataset"/>
<blue:call manager="UtilsManager" method="this"
toVariable="historyDatasetDescriptor">
<blue:argument type="dataset">
<blue:descriptor>
<blue:field type="byte"/>
<blue:field type="byte"/>
<blue:field type="byte"/>
</blue:descriptor>
<blue:row>
<blue:field value="STRING_TYPE"/>
<blue:field value="INT_TYPE"/>
<blue:field value="STRING_TYPE"/>
</blue:row>
</blue:argument>
</blue:call>
<blue:call manager="UtilsManager" method="getField"
toVariable="date">
<blue:argument type="variable" name="historyDataset"/>
<blue:argument type="variable" name="historyDatasetDescriptor"/>
<blue:argument type="variable" name="selectedIndex"/>
<blue:argument type="byte" value="0"/>
</blue:call>
<blue:call manager="UtilsManager" method="getField"
toVariable="ammount">
<blue:argument type="variable" name="historyDataset"/>
<blue:argument type="variable" name="historyDatasetDescriptor"/>
<blue:argument type="variable" name="selectedIndex"/>
<blue:argument type="byte" value="1"/>
</blue:call>
<blue:call manager="UtilsManager" method="getField"
toVariable="accountNo">
<blue:argument type="variable" name="historyDataset"/>
<blue:argument type="variable" name="historyDatasetDescriptor"/>
<blue:argument type="variable" name="selectedIndex"/>
<blue:argument type="byte" value="2"/>
</blue:call>
<blue:call manager="UtilsManager" method="numberToString"
toVariable="ammountAsString">
<blue:argument type="variable" name="ammount"/>
</blue:call>
<blue:call manager="UtilsManager" method="concat"
toVariable="text">
<blue:argument type="String" value="On "/>
<blue:argument type="variable" name="date"/>
<blue:argument type="String" value=" you have transferred "/>
<blue:argument type="variable" name="ammountAsString"/>
<blue:argument type="String" value=" EUR to the account "/>
<blue:argument type="variable" name="accountNo"/>
<blue:argument type="String" value="."/>
</blue:call>
<blue:newInstance module="com/emarson/lemonade/bluelemon/midp1/Form"
toVariable="form"/>
<blue:call object="form" method="initialize">
<blue:argument type="String" value="History"/>
</blue:call>
<blue:call object="form" method="appendString">
<blue:argument type="variable" name="text"/>
</blue:call>
<blue:call manager="UtilsManager" method="getActionCommand"
toVariable="command">
<blue:argument type="String" value="Back"/>
<blue:argument type="byte" value="ActionCommand.BACK"/>
<blue:argument type="byte" value="0"/>
<blue:argument type="byteArr" contextKey="goToHistoryScreen"/>
</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>