1

我在一些 cq5 dialog.xml 中有以下标记:

<text jcr:primaryType="cq:Widget" fieldLabel="label" name="./text"
 maxLength="150" xtype="textfield"  value ="This text has to be displayed in the input field"/>

现在,当我调用对话框时,我希望看到以下内容: 在此处输入图像描述

但 Inputfiled 是空的:(

任何想法?

4

1 回答 1

2

使用defaultValue属性:

<text
    jcr:primaryType="cq:Widget"
    fieldLabel="label"
    name="./text"
    maxLength="150"
    xtype="textfield"
    defaultValue="This text has to be displayed in the input field" />

更多信息可以在CQ5 Widgets API文档中找到。

于 2014-02-05T11:34:57.743 回答