掲示板

Issue withLiferay 7 updateLayout method override in service wrapper

thumbnail
7年前 に devaraj s によって更新されました。

Issue withLiferay 7 updateLayout method override in service wrapper

Regular Member 投稿: 228 参加年月日: 12/05/21 最新の投稿
Hello Team,
I have created a CustomLayoutServicewrapper, I am able to override addLayout , deleteLayout , but with updateLayout I am facing an issue. When I am doing a operation updating layout page name internally its not calling my CustomLayoutServicewrapper updateLayout method. Could anyone please suggest what could be the issue.

This Issue I am facing when I am updating the Layout in Staging

public class CustomLayoutServiceWrapper extends LayoutLocalServiceWrapper {

	public CustomLayoutServiceWrapper() {
		super(null);
	}
	
	@Override
	public Layout addLayout(
			long userId, long groupId, boolean privateLayout,
			long parentLayoutId, Map<locale, string> nameMap,
			Map<locale, string> titleMap, Map<locale, string> descriptionMap,
			Map<locale, string> keywordsMap, Map<locale, string> robotsMap,
			String type, String typeSettings, boolean hidden,
			Map<locale, string> friendlyURLMap, ServiceContext serviceContext)
		throws PortalException {
		
		//Custom Operation
				
		Layout layout =  super.addLayout(
				userId, groupId, privateLayout,
				parentLayoutId, nameMap,
				titleMap, descriptionMap,
				keywordsMap, robotsMap,
			    type, typeSettings,hidden,
				friendlyURLMap,serviceContext);
		
		
		
		return layout;
	}

	@Override
	public Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId,
			Map<locale, string> nameMap, Map<locale, string> titleMap, Map<locale, string> descriptionMap,
			Map<locale, string> keywordsMap, Map<locale, string> robotsMap, String type, boolean hidden,
			Map<locale, string> friendlyURLMap, boolean iconImage, byte[] iconBytes, ServiceContext serviceContext)
			throws PortalException {
			
		//Custom Operation
		
		Layout layout =  super.updateLayout(groupId, privateLayout, layoutId, parentLayoutId, nameMap, titleMap, descriptionMap,
				keywordsMap, robotsMap, type, hidden, friendlyURLMap, iconImage, iconBytes, serviceContext);
	    return layout;
	}
</locale,></locale,></locale,></locale,></locale,></locale,></locale,></locale,></locale,></locale,></locale,></locale,>
thumbnail
7年前 に Severin Rohner によって更新されました。

RE: Issue withLiferay 7 updateLayout method override in service wrapper

Junior Member 投稿: 43 参加年月日: 14/01/28 最新の投稿
Hi devaraj
There are other update methods in the LayoutLocalServiceWrapper.java. Did you try if any of the other is called?
thumbnail
7年前 に devaraj s によって更新されました。

RE: Issue withLiferay 7 updateLayout method override in service wrapper

Regular Member 投稿: 228 参加年月日: 12/05/21 最新の投稿
Severin Rohner:
Hi devaraj
There are other update methods in the LayoutLocalServiceWrapper.java. Did you try if any of the other is called?


Yes, I have tried with all the update of LayoutLocalServiceWrapper.java, and LayoutServiceWrapper.java but it didnt call. This issue I am facing only when the server is in staging.. It would be helpful if you let me know other possible reason for this issue.
thumbnail
7年前 に Severin Rohner によって更新されました。

RE: Issue withLiferay 7 updateLayout method override in service wrapper

Junior Member 投稿: 43 参加年月日: 14/01/28 最新の投稿
If you like to debug the portal, you can start in modules/apps/web-experience/layout/layout-admin-web/src/main/java/com/liferay/layout/admin/web/internal/portlet/LayoutAdminPortlet.java editLayout(ActionRequest actionRequest, ActionResponse actionResponse)

It kooks like the local service is called in a different way, but perhaps you can override the LayoutServiceWrapper.

About staging, IMHO be careful and test it well, we faced a publish problem with Liferay 7 GA3.
thumbnail
7年前 に devaraj s によって更新されました。

RE: Issue withLiferay 7 updateLayout method override in service wrapper

Regular Member 投稿: 228 参加年月日: 12/05/21 最新の投稿
Thanks for the response, Even I tried by overriding LayoutServiceWrapper but we have same issue. and tried all possible way but It looks like a bug.

Appreciate if Liferay team guide me on this if I am doing something wrong.
thumbnail
7年前 に Severin Rohner によって更新されました。

RE: Issue withLiferay 7 updateLayout method override in service wrapper

Junior Member 投稿: 43 参加年月日: 14/01/28 最新の投稿
You can report the bug on issues.liferay.com