2014-02-05 135 views
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"/> 

現在,當我打電話的對話,我希望看到以下內容: enter image description here

但Inputfiled是空的:(

任何想法

回答

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文檔。

相關問題