Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Liferay中将组织statusId设置为临时成员_Liferay - Fatal编程技术网

在Liferay中将组织statusId设置为临时成员

在Liferay中将组织statusId设置为临时成员,liferay,Liferay,如何将组织的状态设置为com.liferay.portal.model.organization.status类型的临时成员 当我这样做的时候 GetterUtil.getInteger(PropsUtil.get("sql.data.com.liferay.portal.model.ListType.organization.status")); 它将组织状态设置为正式成员。此sql.data.com.liferay.portal.model.ListType.organization.st

如何将组织的状态设置为com.liferay.portal.model.organization.status类型的临时成员

当我这样做的时候

GetterUtil.getInteger(PropsUtil.get("sql.data.com.liferay.portal.model.ListType.organization.status"));

它将组织状态设置为正式成员。

sql.data.com.liferay.portal.model.ListType.organization.status
portal.properties
中的一个属性,您可以在
portal-ext.properties
中覆盖它

因此,您可以在您的
portal-ext.properties
中为
临时成员
指定以下属性:

#
# Set the default SQL IDs for common objects.
#

sql.data.com.liferay.portal.model.ListType.organization.status=12018
ListType
表中的ID在所有版本中或多或少都保持不变,至少我看到它在Liferay CE 6.0到6.1 EE GA2之间保持不变

另一种方法
或者,另一种方法是在您的
portal-ext.properties
中有一个新属性,例如:

sql.data.com.liferay.portal.model.ListType.organization.status.provisional=12018
然后,您可以在任何地方的代码中使用:

GetterUtil.getInteger(PropsUtil.get("sql.data.com.liferay.portal.model.ListType.organization.status.provisional"));
但这第二种方法只适用于自定义portlet或钩子中的自定义代码,而不适用于liferay的代码

希望这对解决这个问题有所帮助