掲示板

StaginUtil

14年前 に Stefan Jankowitz によって更新されました。

StaginUtil

New Member 投稿: 3 参加年月日: 09/06/30 最新の投稿
Hi,

Is there a way to use StagingUtil.java from within external (not lr) portlets, I'm getting this:

actionPerformed com.liferay.portal.NoSuchGroupException: No Group exists with the primary key 0;

I'm trying to do this:

com.liferay.portlet.communities.util.StagingUtil.updateStaging(pRequest);

Thanks
thumbnail
14年前 に Amos Fong によって更新されました。

RE: StaginUtil

Liferay Legend 投稿: 2047 参加年月日: 08/10/07 最新の投稿
Hi Stefan,

I suppose it's possible. I don't know if StagingUtil was created with other portlets in mind though.

If you look at StagingUtil, it requires some variables to be set in the request.

		ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
			WebKeys.THEME_DISPLAY);

		long liveGroupId = ParamUtil.getLong(actionRequest, "liveGroupId");

		long stagingGroupId = ParamUtil.getLong(
			actionRequest, "stagingGroupId");

		boolean stagingEnabled = ParamUtil.getBoolean(
			actionRequest, "stagingEnabled");
14年前 に Stefan Jankowitz によって更新されました。

RE: StaginUtil

New Member 投稿: 3 参加年月日: 09/06/30 最新の投稿
Thanks for the reply Amos,

I'll try setting the variables.

Thanks
Stefan