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

Liferay が自動的にエラー メッセージを表示する正しい場所はどれですか?

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.

問題

  • ユーザーがエラーを起動したいときにウィジェットに表示されるエラー メッセージ。ページの下部にメッセージが表示される場合と、ページの上部に表示される場合があります。 たとえば、同じポートレットが 2 回続けてメッセージを生成すると、2 つの異なる場所にメッセージが生成されます。

Environment

  • Liferay DXP 7.1

解決策

  • タグ <liferay-ui:error> はいくつかの側面で構成可能であり、そのうちの 1 つは属性 埋め込みによって制御されるメッセージの表示位置または方法です。
    • 埋め込みの値 true(デフォルトの場合、 タグが呼び出された場所と同じ場所にメッセージ されます
    • 埋め込みの値が false (例:) <liferay-ui:error embed="<%= false %>" key="error401" message="error401"/>の場合、メッセージは左に浮いて表示されます。

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base