我在一些 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 是空的:(
任何想法?
使用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文档中找到。