FreeMarker テンプレート エンジン (v2.3.14) で spring ポートレット mvc (v3.2.9) を使用して、liferay ポータル (v6.2) 用のシンプルなポートレットを開発しています。ポートレットと aui taglibs を使用してページを作成します
<#assign portlet=JspTaglibs["http://java.sun.com/portlet"]>
<#assign aui=JspTaglibs["http://liferay.com/tld/aui"]>
これらのタグはほとんどの場合機能しますが、次のコードに問題があります
<@aui.form action="${editPreferencesUrl}">
<@aui.model-context bean="${myBean}" />
<@aui.input name="name" />
<@aui.input name="surname" />
</@aui.form>
次の例外が発生します
javax.portlet.PortletException: org.springframework.web.util.NestedServletException: View rendering failed; nested exception is freemarker.core.NonNumericalException: Error on line 8, column 11 in preferences.ftl
Expression aui.model is not numerical
Expression context is not numerical
私はこのチュートリアルに従っていましたhttp://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Alloy+UI+Forms+(aui)/pop_up?_36_version=1.9
問題は間違いなく @aui.model-context です。このタグをフリーマーカーで使用するには?