Cq5构建一个数字增量/减量框

时间:2014-08-15 09:30:49

标签: combobox adobe increment cq5 decrement

enter image description here

上面的图片是我需要在CQ5中构建的,我一直在adobe cq api中挖掘, 我发现的只有Class CQ.Ext.form.NumberField

但是这个数字字段只提供像textfield那样的手动输入数字(这不是我需要的)

谁能指导我如何在cq5对话框中创建这样的数字增量/减量框?请一些代码示例,谢谢

2 个答案:

答案 0 :(得分:3)

您可以使用xtype CQ.form.Spinner尝试spinner。 这是数字,日期或时间值的触发器字段。

微调器使用CQ.form.Spinner.Strategy来定义其行为。

此处显示对话框配置片段。

<numfield xtype="spinner" name="./numfield" editable="false">
    <strategy xtype="number" allowDecimals="false" maxValue="50" />
</numfield>

有关详细信息,请查看此Spinner APINumberStrategy API

答案 1 :(得分:0)

使用xtype =“spinner”查看Spinner Widget。在那里你可以定义微调器的策略,例如增量值。我自己从未使用它,所以我无法为您提供运行代码示例。

相关问题