论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Andrés Cerezo
passing values to hidden expando field
2011年3月28日 下午11:36
答复

Andrés Cerezo

等级: Junior Member

帖子: 92

加入日期: 2010年11月11日

最近的帖子

Hello all, I have a hidden expando field and I need to pass a default value depending of a variable. Anyone knows how can I do it?

Thanks.
Udaya Ramakrishnan
RE: passing values to hidden expando field
2011年10月26日 下午9:09
答复

Udaya Ramakrishnan

等级: Junior Member

帖子: 67

加入日期: 2011年9月6日

最近的帖子

hi,

use the below code as a example:

try {
ExpandoBridge expandoBridge=user.getExpandoBridge();;
ExpandoValueLocalServiceUtil.addValue(
expandoBridge.getCompanyId(), expandoBridge.getClassName(),
ExpandoTableConstants.DEFAULT_TABLE_NAME, "ur_custom_field",
expandoBridge.getClassPK(), "default_value");
}
catch (Exception e) {
_log.error(e, e);
}


execute this lines while u adding. For example i have added this lines when a new user was added to LR
Let me know this is useful to u.......................

thanks,
Udaya.R

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!