0

コンポーネントの選択フィールドを作成したいのですが、CRXDEでこれらのオプションを手動で入力する方法を解読できません。

プロパティとして次のように入力しました。

options (String) : [ {value: "5", text: "5" }, { value: "10", text: "10" } ]

これにより、ダイアログエディタウィンドウに結果が表示されず、JavaScriptの問題が多数発生します。

ガイドラインとして、また構文として、このドキュメントに従っています:http ://dev.day.com/docs/en/cq/5-4/widgets-api/index.html?class=CQ.form.Selection

4

2 に答える 2

1

最後の行については、CRXDE でこれらのオプションを手動で入力する方法を教えてください。

テキストと値を含む Map を返す json ファイルを作成できます。

ドロップダウンにテキストを表示し、JSP で値を使用します。

テキストと値を手動で指定するのではなく、オプション フィールドでその json に $Path を追加できます。

于 2013-03-12T09:02:38.370 に答える
1

Options for the selection xtype are done with nodes not properties.

Your node structure should be something like:

-[NodeName] - jcr:primaryType=cq:Widget, xtype=selection
  -options - jcr:primaryType=cq:WidgetCollection
    -[NodeName] - jcr:primaryType=nt:unstructured, text=[Text], value=[Value]
    -[Other options you want]...

An example to look at is: /libs/foundation/components/list/dialog/items/list/items/listFrom

于 2013-03-07T20:23:00.317 に答える