我正在尝试创建一个复杂的UI,它包含顶部的菜单项屏幕(type ="6")和下面的文本输入屏幕(type ="5").我希望菜单项屏幕转到除文本项屏幕之外的另一个屏幕,但我必须将文本项屏幕放在nextQuestionKey属性中.
我在菜单项屏幕中尝试了它,如下面的代码所示,但验证器告诉我"不允许分支".
我尝试将限制移动到文本输入屏幕.验证器告诉我"复杂屏幕中不在最后的菜单屏幕必须提供有效的,预定义的attributeType = 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>
Run Code Online (Sandbox Code Playgroud)
如果有人能帮我找到解决这个问题的方法,我将不胜感激.
小智 3
我认为实现此目的的最简单方法是更改屏幕顺序,使文本项屏幕指向菜单屏幕。在复杂的 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>
Run Code Online (Sandbox Code Playgroud)
这意味着复杂的 UI 最初将显示“确定”按钮。如果用户按下“确定”按钮,客户端将导航至问题 18。如果用户按下“扫描条形码”按钮,客户端将导航至问题 17。
| 归档时间: |
|
| 查看次数: |
162 次 |
| 最近记录: |