Foros de discusión
Getting company id and group id in layout listener class
Bharanitharan R, modificado hace 12 años.
Getting company id and group id in layout listener class
New Member Mensajes: 23 Fecha de incorporación: 14/02/12 Mensajes recientes
Hi,
We have a costume portlet , we need to track some activity when that portlet is added or removed from a page.
we have a listener class which implements 'PortletLayoutListener', it's working fine.
@Override
public void onAddToLayout(String portletId, long plid) throws PortletLayoutListenerException {
update(portletId, plid);
}
Now we need to update 'company id' and 'group id'
update(portletId, plid, companyid, groupid);
How to get the 'company id' and 'group id' ?
Thank you
Bharani R
We have a costume portlet , we need to track some activity when that portlet is added or removed from a page.
we have a listener class which implements 'PortletLayoutListener', it's working fine.
@Override
public void onAddToLayout(String portletId, long plid) throws PortletLayoutListenerException {
update(portletId, plid);
}
Now we need to update 'company id' and 'group id'
update(portletId, plid, companyid, groupid);
How to get the 'company id' and 'group id' ?
Thank you
Bharani R
Sandeep Nair, modificado hace 12 años.
RE: Getting company id and group id in layout listener class
Liferay Legend Mensajes: 1744 Fecha de incorporación: 6/11/08 Mensajes recientes
Try this
Regards,
Sandeep
Layout layout = LayoutLocalServiceUtil.getLayout(plid);
long groupId = layout.getGroup().getGroupId();
long companyId = layout.getCompanyId();
Regards,
Sandeep
Bharanitharan R, modificado hace 12 años.
RE: Getting company id and group id in layout listener class
New Member Mensajes: 23 Fecha de incorporación: 14/02/12 Mensajes recientes
Thank u Sandeep.
Its Working fine.
Its Working fine.
Bharanitharan R, modificado hace 12 años.
RE: Getting company id and group id in layout listener class
New Member Mensajes: 23 Fecha de incorporación: 14/02/12 Mensajes recientes
Thank u Sandeep
Its working Fine.
Its working Fine.