legacy-knowledge-base
公開されました Jul. 2, 2025

カスタム ポートレットでフォームをレンダリングできなくなりました

written-by

Sorin Pop

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

learn-legacy-article-disclaimer-text

問題

  • プログラムでフォームをレンダリングするカスタム コード (ポートレットなど) がある
  • しかし、パッチ レベルのアップグレード後、これは機能しなくなり、フォームはレンダリングされません。

Environment

  • DXP 7.2

解決策

  • LPS-112849 (フィックスパック dxp-6 でリリース) によって導入された変更が原因で、この問題が発生している可能性があります。
  • LPS-112849 では、コンテナーが存在する場合にのみフォームをレンダリングするチェックを修正に含め、containerId を使用してそれをチェックしました。
  • したがって、解決策は、containerId を FormRenderContext に追加して、それを準備することです。 以下に例を示します。
formRenderContext.setContainerId("ddmForm".concat(StringUtil.randomString()));

(StringUtil を使用できるようにするには、次のインポートが必要です:
import com.liferay.portal.kernel.util.StringUtil;)

did-this-article-resolve-your-issue

legacy-knowledge-base