Foren
how to use PortletProps API in liferay DXP
Ravi Darji, geändert vor 7 Jahren.
how to use PortletProps API in liferay DXP
Junior Member Beiträge: 56 Beitrittsdatum: 14.05.14 Neueste Beiträge
Hi Everyone,
I struggling to use com.liferay.util.portlet.PortletProps in liferay DXP.
i am using it to get properties which is defined in portlet.properties file.
to use it in liferay DXP i need to add dependency in build.gradle file (to resolve compile time)
i have added it like, compile group: "com.liferay.portal", name: "com.liferay.util.java", version: "2.0.0"
To resolve runtime i need to add it in bnd.bnd file, like as below,
Include-Resource: \
@com.liferay.util.java-2.0.0.jar
now the PortletProps is resovled but it is asking for another dependency com.swabunga.spell.engine
and the module is in installed status, because the dependency is not resolved.
Now when i include com.swabunga.spell.engine dependency, any how,
still it will ask for another dependency, and it is going on.
So, can i not use PortletProps in liferay DXP module?
Thanks & Regards,
Ravi darji
I struggling to use com.liferay.util.portlet.PortletProps in liferay DXP.
i am using it to get properties which is defined in portlet.properties file.
to use it in liferay DXP i need to add dependency in build.gradle file (to resolve compile time)
i have added it like, compile group: "com.liferay.portal", name: "com.liferay.util.java", version: "2.0.0"
To resolve runtime i need to add it in bnd.bnd file, like as below,
Include-Resource: \
@com.liferay.util.java-2.0.0.jar
now the PortletProps is resovled but it is asking for another dependency com.swabunga.spell.engine
and the module is in installed status, because the dependency is not resolved.
Now when i include com.swabunga.spell.engine dependency, any how,
still it will ask for another dependency, and it is going on.
So, can i not use PortletProps in liferay DXP module?
Thanks & Regards,
Ravi darji
Sudhanshu Kumar Shukla, geändert vor 6 Jahren.
RE: how to use PortletProps API in liferay DXP
Junior Member Beiträge: 35 Beitrittsdatum: 29.08.16 Neueste BeiträgeRavi Darji:
Hi Everyone,
I struggling to use com.liferay.util.portlet.PortletProps in liferay DXP.
i am using it to get properties which is defined in portlet.properties file.
to use it in liferay DXP i need to add dependency in build.gradle file (to resolve compile time)
i have added it like, compile group: "com.liferay.portal", name: "com.liferay.util.java", version: "2.0.0"
To resolve runtime i need to add it in bnd.bnd file, like as below,
Include-Resource: \
@com.liferay.util.java-2.0.0.jar
now the PortletProps is resovled but it is asking for another dependency com.swabunga.spell.engine
and the module is in installed status, because the dependency is not resolved.
Now when i include com.swabunga.spell.engine dependency, any how,
still it will ask for another dependency, and it is going on.
So, can i not use PortletProps in liferay DXP module?
I am Also Facing Same Issue But You Can Alternatively Use Below Code Snnipet To Read properties from portlet.properties file
Configuration configuration=ConfigurationFactoryUtil.getConfiguration(PortalClassLoaderUtil.getClassLoader(), "portlet");
String mailSubject = ContentUtil.get(configuration.get(EnquiryPortletKeys.ENQUIRY_MAILSUBJECT_TPL));
If You Resolve This How to use PortletProps then Please reply it would be appricated.
Thanks