2

Liferay の動的データ リストのリスト テンプレート

私はすでにこの投稿と別の webapplicationdeveloper ブログ投稿を読みましたが、動的データ リストにカスタム適用されたテンプレートでアクション ボタンを取得するアイデアは見つかりませんでした。

また、vmテンプレートにdynamicdatalistポートレットのデフォルトのrecord_action.jspを含めようとしましたが、機能せず、以下のプロパティも設定しました

journal.template.velocity.restricted.variables = 

portal-ext プロパティにありますが、それでもカスタム テンプレートにアクション ボタンが表示されません

私はすでにこれを試しました:

#
set (
$categoriesService = $portal.getClass().forName("com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil").getMethod("getService", null).invoke(null, null))

My answer is: Yessss, it works. But I want use a jstl lib (e.g. <aui> or <ui>) as well. In my opinion the simpliest way to do it is include jsp file to themeServletContext. Put your file.jsp into your theme:

your-theme/docroot/path/to/your/jsp/file.jsp

and paste this piece of code into your vm (for example portal_normal.vm):
$theme.include($themeServletContext, "/path/to/your/jsp/file.jsp")

この場合、$themeをそのまま表示しているページで $theme 変数を見つけることができません...:( 助けてください:

4

1 に答える 1

1

速度を残し、taglib を使用するには貧弱すぎます。そして freemaker 言語に切り替えます: taglib のより強力で完全なサポート。

ここでは、テーマの開発に freemaker を使用する例を示しますが、動的データ リストでテンプレート化することも出発点として適しています。

https://www.liferay.com/it/web/mika.koivisto/blog/-/blogs/using-freemarker-in-your-theme-templates

freemaker ガイドも参照してください: http://freemarker.org/docs/index.html

于 2014-01-04T18:48:48.133 に答える