Foros de discusión

StaginUtil

Stefan Jankowitz, modificado hace 14 años.

StaginUtil

New Member Mensajes: 3 Fecha de incorporación: 30/06/09 Mensajes recientes
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, modificado hace 14 años.

RE: StaginUtil

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
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, modificado hace 14 años.

RE: StaginUtil

New Member Mensajes: 3 Fecha de incorporación: 30/06/09 Mensajes recientes
Thanks for the reply Amos,

I'll try setting the variables.

Thanks
Stefan