Foren

StaginUtil

Stefan Jankowitz, geändert vor 14 Jahren.

StaginUtil

New Member Beiträge: 3 Beitrittsdatum: 30.06.09 Neueste Beiträge
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
Amos Fong, geändert vor 14 Jahren.

RE: StaginUtil

Liferay Legend Beiträge: 2047 Beitrittsdatum: 07.10.08 Neueste Beiträge
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");
Stefan Jankowitz, geändert vor 14 Jahren.

RE: StaginUtil

New Member Beiträge: 3 Beitrittsdatum: 30.06.09 Neueste Beiträge
Thanks for the reply Amos,

I'll try setting the variables.

Thanks
Stefan