mobile - Movilizer - 复杂 UI 导航中的菜单项无法正常工作?

标签 mobile movilizer

我正在尝试创建一个复杂的 UI,它由顶部的菜单项屏幕(type="6")和下面的文本输入屏幕(type="5")组成。我希望菜单项屏幕转到另一个屏幕而不是文本项屏幕,尽管我必须将文本项屏幕放在 nextQuestionKey 属性中。

我在菜单项屏幕中尝试了一个限制,如下面的代码所示,但验证器告诉我“不允许分支”。

我尝试将限制移至文本输入屏幕。验证器告诉我“复杂屏幕中的菜单屏幕不是最后必须提供有效的、预定义的属性类型 = 72 的前向导航答案”

<question key="15" type="6" backNavigationAllowed="true" sortAnswersByClientKey="false">
    <answer key="15_1" nextQuestionKey="16" clientKey="CK#15">
        <text>Scan barcode</text>
    </answer>
    <restriction nextQuestionKey="17" position="0">
        <condition>getAnswerValueByClientKey($answer:"15_1", "CK#15") != ""</condition>
    </restriction>
    <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="0" gridPosX="0" gridPosY="0" gridWidth="1" gridHeight="1" linearHeight="1" groupTitle="Input Asset number"/>
</question>

<question key="16" type="5" backNavigationAllowed="true" sortAnswersByClientKey="false">
    <answer key="16_1" nextQuestionKey="18" clientKey="CK#16" columnSizeType="ROWS">
        <text>Enter barcode manually</text>
    </answer>
    <answer key="16_2" nextQuestionKey="18" clientKey="CK#16" columnSizeType="ROWS">
        <text>Reason</text>
    </answer>
    <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="1" gridPosX="0" gridPosY="1" gridWidth="1" gridHeight="1" linearHeight="1"/>
</question>

如果有人可以帮助我找到解决此问题的方法,我将不胜感激。

最佳答案

我认为实现这一目标的最简单方法是更改​​屏幕顺序,使文本项目屏幕指向菜单屏幕。在 Complex UI 中,如果需要,您仍然可以在顶部显示菜单,因此导航顺序对此没有影响。在菜单屏幕中,您将默认答案定义为指向问题键 18 ...菜单屏幕中的可点击答案指向问题 17。

有关默认答案功能,请参阅:
https://devtools.movilizer.com/confluence/display/DOC22/Default+Answer+feature+for+Image+Menu+screens

<question key="15" type="5" backNavigationAllowed="true" sortAnswersByClientKey="false">
  <answer key="15_1" nextQuestionKey="16" clientKey="CK#16" columnSizeType="ROWS">
    <text>Enter barcode manually</text>
  </answer>
  <answer key="15_2" nextQuestionKey="16" clientKey="CK#16" columnSizeType="ROWS">
    <text>Reason</text>
  </answer>
  <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="1" gridPosX="0" gridPosY="1" gridWidth="1" gridHeight="1" linearHeight="1"/>
</question>

<question key="16" type="6" backNavigationAllowed="true" sortAnswersByClientKey="false">
  <answer key="16_1" nextQuestionKey="17" clientKey="CK#17">
    <text>Scan barcode</text>
  </answer>
  <answer key="16_2" nextQuestionKey="18" clientKey="CK#18" attributeType="72">
    <text>default answer</text>
    <predefinedValue>X</predefinedValue>
  </answer>
  <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="0" gridPosX="0" gridPosY="0" gridWidth="1" gridHeight="1" linearHeight="1" groupTitle="Input Asset number"/>
</question>

这意味着最初复杂的 UI 将显示一个 OK 按钮。如果用户按下 OK 按钮,客户端将导航至问题 18。如果用户按下扫描条码按钮,客户端将导航至问题 17。

关于mobile - Movilizer - 复杂 UI 导航中的菜单项无法正常工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29258344/

相关文章:

javascript - 如何防止 IO 中的背景滚动?

movilizer - 如何禁用 movelet 中的回复同步

angularjs - Movilizer - 将 MovilizerJS 与 Ionic 结合使用

javascript - 单个 JavaScript 文件的 TypeScript 定义

mobile - Movilizer - queryMasterdata 使用like

css - 样式表应用于手机之前的延迟

php - 如果是移动设备/平板电脑,请替换 css

java - SQLite 数据库查询多个表

jquery - 在 html 文件之间滑动手势