0

Liferay 6.2 GA2 を実行しています。次のソースを使用して、ダミーの構造とテンプレートを使用して Web コンテンツを作成しました。

#set($layoutServiceUtil = $serviceLocator.findService("com.liferay.portal.service.LayoutService"))
#set($topPublicLayouts = $layoutServiceUtil.getLayouts($groupId,true))
#set($viewCountExpName = 'viewCount')
#set($viewCount = ${topPublicLayouts.get(0).getExpandoBridge().getAttribute($viewCountExpName)})
Works in Chrome-${topPublicLayouts.get(0).getExpandoBridge().getAttribute($viewCountExpName)}-
-${topPublicLayouts.get(0).getNameCurrentValue()}-
--${viewCount}--

カスタム属性を作成し、portal-ext.properties から速度制限を削除しました。

上記のコードは Chrome では機能しますが、IE では機能しません。

Chrome での応答:

Chrome-1617- -Home- --1617-- で動作します

IE での応答 (8、9、10 & 11):

Chrome で動作-${topPublicLayouts.get(0).getExpandoBridge().getAttribute($viewCountExpName)}- -Home- --${viewCount}--

Velocity パッケージでデバッグすると、IE の場合のみ以下のエラー ログが表示されます。

17:41:45,687 DEBUG [RuntimePageImpl-6][velocity:155] Null reference [template '10257#10297#12641', line 5, column 17] : ${topPublicLayouts.get(0).getExpandoBridge().getAttribute($viewCountExpName)} cannot be resolved.
17:41:45,688 DEBUG [RuntimePageImpl-6][velocity:155] Null reference [template '10257#10297#12641', line 7, column 3] : ${viewCount} cannot be resolved.

$viewCountIE ブラウザで動作する値を取得するにはどうすればよいですか。

4

0 に答える 0