Fórumok
How to get all Portlet categories information?
Gurumurthy Godlaveeti, módosítva 10 év-val korábban
How to get all Portlet categories information?
Regular Member Bejegyzések: 208 Csatlakozás dátuma: 2011.08.12. Legújabb bejegyzések
Hi Liferay Guys,
I wish to know all portlet categories information in my plugin portlet. Any idea, how to get by using Liferay code?
I have seen the existed code & WebappPool class is helpful to get the portlet categories but this java class is not available to plugins portlet. So any chance to get portlet categories in plugins ?
I wish to know all portlet categories information in my plugin portlet. Any idea, how to get by using Liferay code?
I have seen the existed code & WebappPool class is helpful to get the portlet categories but this java class is not available to plugins portlet. So any chance to get portlet categories in plugins ?
Sagar A Vyas, módosítva 10 év-val korábban
RE: How to get all Portlet categories information?
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzésekany chance to get portlet categories in plugins ?
Two quick questions.
1. which version liferay you are using
2. and you want to retrieve categories which is assign to your asset ? correct ? please elaborate on same.
Thanks,
Sagar Vyas
Gurumurthy Godlaveeti, módosítva 10 év-val korábban
RE: How to get all Portlet categories information?
Regular Member Bejegyzések: 208 Csatlakozás dátuma: 2011.08.12. Legújabb bejegyzésekSagar A Vyas:
any chance to get portlet categories in plugins ?
Two quick questions.
1. which version liferay you are using
2. and you want to retrieve categories which is assign to your asset ? correct ? please elaborate on same.
Thanks,
Sagar Vyas
Hi Sagar,
I am working on Liferay 6.0.6
For example, we configure portlet details in portlet.xml, liferay-portlet.xml & liferay-display.xml files. This liferay-display.xml file is having the information about portlet categories. Once we deploy the portlet then we drag the application into certain page through add -> portlet.
Now i need to get these portlet categories based on specific portlet id.
Sagar A Vyas, módosítva 10 év-val korábban
RE: How to get all Portlet categories information?
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzések
Hi,
As per my understanding....
You can user following code to retrieve categories for your asset.
here classNameId - its your portlet classID plus you need to pass Categories id. it will returns your list of your asset having same cateId.
Thanks,
Sagar Vyas
As per my understanding....
You can user following code to retrieve categories for your asset.
List<assetentry> assetIdeasEntry = new ArrayList<assetentry>();
long classNameId = PortalUtil.getClassNameId(IdeasEntry.class.getName());
AssetEntryQuery aeq = new AssetEntryQuery();
aeq.setAllCategoryIds(new long[] { cateId });
aeq.setClassNameIds(new long[] {classNameId });
assetIdeasEntry = AssetEntryLocalServiceUtil.getEntries(aeq);
</assetentry></assetentry>
here classNameId - its your portlet classID plus you need to pass Categories id. it will returns your list of your asset having same cateId.
Thanks,
Sagar Vyas
Gurumurthy Godlaveeti, módosítva 10 év-val korábban
RE: How to get all Portlet categories information?
Regular Member Bejegyzések: 208 Csatlakozás dátuma: 2011.08.12. Legújabb bejegyzésekSagar A Vyas:
Hi,
As per my understanding....
You can user following code to retrieve categories for your asset.List<assetentry> assetIdeasEntry = new ArrayList<assetentry>(); long classNameId = PortalUtil.getClassNameId(IdeasEntry.class.getName()); AssetEntryQuery aeq = new AssetEntryQuery(); aeq.setAllCategoryIds(new long[] { cateId }); aeq.setClassNameIds(new long[] {classNameId }); assetIdeasEntry = AssetEntryLocalServiceUtil.getEntries(aeq); </assetentry></assetentry>
here classNameId - its your portlet classID plus you need to pass Categories id. it will returns your list of your asset having same cateId.
Thanks,
Sagar Vyas
Hi Sagar,
I have looked in to asset entry tables, there is no information about portlet categories, it's having the liferay feature ( tags & categories) info which is helpful to search the articles, documents, pages, users, images...etc.
Can you provide exactly what should i need to do to get the portlet categories name (which we configure in liferay-display.xml file) when i know portlet id.
Thanks in advance
Sagar A Vyas, módosítva 10 év-val korábban
RE: How to get all Portlet categories information?
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzések
This is your custom portlet right ?
Can you help me to understand how you inject categories to your portlet id ? in code side ?
Thanks,
Sagar Vyas
Can you help me to understand how you inject categories to your portlet id ? in code side ?
Thanks,
Sagar Vyas
Gurumurthy Godlaveeti, módosítva 10 év-val korábban
RE: How to get all Portlet categories information?
Regular Member Bejegyzések: 208 Csatlakozás dátuma: 2011.08.12. Legújabb bejegyzések
Hi Sagar,
I have no idea on injecting the portlet category for portlet id in code side. That's the main thing i would like to know then automatically my requirement fulfil.
I got the portlets list which i provided one user. I have segregate those portlets list into groups just based on portlet category name.
I have no idea on injecting the portlet category for portlet id in code side. That's the main thing i would like to know then automatically my requirement fulfil.
I got the portlets list which i provided one user. I have segregate those portlets list into groups just based on portlet category name.
Sagar A Vyas, módosítva 10 év-val korábban
RE: How to get all Portlet categories information?
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzésekGurumurthy Godlaveeti:
Hi Sagar,
I have no idea on injecting the portlet category for portlet id in code side. That's the main thing i would like to know then automatically my requirement fulfil.
I got the portlets list which i provided one user. I have segregate those portlets list into groups just based on portlet category name.
Probably you needs following code to inject categories [oob] to your custom portlet.
<liferay-ui:panel defaultstate="closed" extended="<%=false%>" id="<portlet:namespace/>testl" persiststate="<%=true%>" title="categorization">
<aui:fieldset>
<aui:input classPK="${entryId}" name="categories" type="assetCategories" />
<aui:input classPK="${entryId}" name="tags" type="assetTags" />
</aui:fieldset>
</liferay-ui:panel>
Entry Id : This is your primary key of custom portlet.
Thanks,
Sagar Vyas
Hi I am Liferay