Content
This section demonstrates the edit_mode and next_edit_mode callbacks. In order to demonstrate this better we are also using the next_edit_mode fragment (for changing the modes).
<?xml version="1.0" encoding="UTF-8"?> <!--in the next line we use the edit_mode and next_edit_mode callbacks--> <SnomIPPhoneMenu name="Edit mode:$(edit_mode); Next edit mode:$(next_edit_mode)" speedselect="off"> <InputField> <Handler event="keypress">file:///xml/text.xml#var:text=$[current_input]</Handler> <Key>ENTER</Key> <Prompt>Input:</Prompt> </InputField> <SoftKeyItem> <Name>F1</Name> <Label>Next mode</Label> <Icon>kIconTypeFkeyRight</Icon> <Url>snom://mb_nop#next_edit_mode</Url> <!--here we use the next_edit_mode fragment--> </SoftKeyItem> </SnomIPPhoneMenu>
Result:
D8xx phones with new phone UI
For these phones the edit mode and next edit mode callbacks can have an additional parameter with an input field id. The D8xx pones with the new phone ui support multiple input fields. Each input field is using an own edit mode. With the additional parameter you can differ between the edit modes of each input field. If no parameter is given the last id of the last used input field will be used.
<?xml version="1.0" encoding="UTF-8"?> <!--in the next line we use the edit_mode and next_edit_mode callbacks--> <SnomIPPhoneMenu name="Demo edit mode" speedselect="off"> <InputField id="input0"> <Handler event="keypress">file:///xml/text.xml#var:text=$[current_input]</Handler> <Key>ENTER</Key> <Prompt>Input0:</Prompt> </InputField> <InputField id="input1"> <Handler event="keypress">file:///xml/text.xml#var:text=$[current_input]</Handler> <Key>ENTER</Key> <Prompt>Input1:</Prompt> </InputField> <MenuItem name="Input0: Edit mode:$(edit_mode:input0); Next edit mode:$(next_edit_mode:input0)"> </MenuItem> <MenuItem name="Input1: Edit mode:$(edit_mode:input1); Next edit mode:$(next_edit_mode:input1)"> </MenuItem> <SoftKeyItem> <Name>F1</Name> <Label>Next mode</Label> <Icon>kIconTypeFkeyRight</Icon> <Url>snom://mb_nop#next_edit_mode</Url> <!--here we use the next_edit_mode fragment--> </SoftKeyItem> </SnomIPPhoneMenu>
Result:
Further Information
Related articles