Legacy Knowledge Base
公開されました Jul. 2, 2025

getOptions は、複数の値を許可する Select フィールドの選択された使用可能な値を返します。

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • getOptions は、複数の値を許可する Select フィールドの選択された使用可能な値を返します。

  • 再現する手順:

    • 構造体 S1 複数選択フィールド で作成し、3 つのデフォルト オプションで Sel1 という名前を付けますS1_Structure.png

    • 次のマークアップでテンプレート T1 を作成しますT1_template.png
    • Selected options:
      <ul>
      <#list Sel1.getOptions() as key>
      <li>opt: ${key} </li>
      </#list>
      </ul>
      Available options:
      <ul>
      <#list Sel1.getOptionsMap() as key, value>
      <li>opt: ${key} = ${value} </li>
      </#list>
      </ul>
    • オプション 2 とオプション 3を選択して、S1 に基づいて Web コンテンツ WC1 を作成します。
    • WC1 を表示するように Web コンテンツ表示を構成する
    • WCD の出力を確認する
      • 観測結果 Observed_Results.png
      • 期待される結果 Expected_Result.png

Environment

  • Liferay DXP 7.2 フィックスパック 7

解決策

  • これは既知の問題であり、Liferay DXP 7.2 FP9 で解決されています。
  • この問題に修正プログラムが必要な場合は、パッチの詳細を添付して、修正プログラムを要求するサポート チケットを作成してください。
  • Liferay DXP にフィックスパックとホットフィックスをインストールすると、それぞれの環境にこのホットフィックスをインストールするためのガイドが表示されます。
Did this article resolve your issue ?

Legacy Knowledge Base