留言板
Expando Bridge(get attribute value from view to service)
Akram MONCER,修改在11 年前。
Expando Bridge(get attribute value from view to service)
Regular Member 帖子: 106 加入日期: 12-9-25 最近的帖子
hi i follow the example provided in liferay in action book,
so i use expando bridge to get my attribute value from view(jsp) to service :
in the service.xml add this references to my new entity:
in my custom service class :
in the jsp page :
but the value of the attribute is null
can anyone help !!!
thanks
so i use expando bridge to get my attribute value from view(jsp) to service :
in the service.xml add this references to my new entity:
<reference package-path="com.liferay.portlet.expando" entity="ExpandoValue" />
<reference package-path="com.liferay.portlet.expando" entity="ExpandoRow" />
in my custom service class :
String imageUrl = (String)
serviceContext.getExpandoBridgeAttributes().get("image-url");
in the jsp page :
<aui:input name="<portlet:namespace />ExpandoAttributeName(image-url)" type="hidden" value="image-url" />
<aui:field-wrapper label="image-url">
<liferay-ui:input-field model="<%= ShoppingCategoryImage.class %>" fieldParam="ExpandoAttribute(image-url)" bean="<%= catImage %>" field="imageUrl" />
</aui:field-wrapper>
but the value of the attribute is null
can anyone help !!!
thanks