留言板

New Portlet is displaying name prefixed by javax.portlet.titlet.testportlet

Shreyas K,修改在12 年前。

New Portlet is displaying name prefixed by javax.portlet.titlet.testportlet

New Member 帖子: 10 加入日期: 11-6-3 最近的帖子
Hi,
I have developed a new portlet but the display name is coming as javax.portlet.title.testportlet.
can anybody help me out why this is occuring?
Thanx in advance.

Regards,
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: New Portlet is displaying name prefixed by javax.portlet.titlet.testpor

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
You should create a file called /docroot/WEB-INF/src/content/Language.properties and add a property javax.portlet.title.testportlet=My Portlet Name. You also must have a tag <resource-bundle>content/Language</resource-bundle> in your portlet.xml.

Hope this helps
Shreyas K,修改在12 年前。

RE: New Portlet is displaying name prefixed by javax.portlet.titlet.testpor

New Member 帖子: 10 加入日期: 11-6-3 最近的帖子
Hi,
Thanx for the reply. But this didnt help me. Again same error. and also the solution suggested like the properties in the files as javax.portlet.title=myportletname. How it will work if we have multiple portlets.

Regards/
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: New Portlet is displaying name prefixed by javax.portlet.titlet.testpor

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
Humm, this is not working as expected. I will give a try to fix it.
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: New Portlet is displaying name prefixed by javax.portlet.titlet.testpor

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
Ok, I got it with help of Mika.

You should create for each portlet a different Language.properties file for instance Language-portlet1.properties with a key javax.portlet.title=MyName. Don't forget to configure the portlet.xml with the proper tags for each portlet <resource-bundle>content/Language-portlet1</resource-bundle>.
Let me know if you have problems.
Shreyas K,修改在12 年前。

RE: New Portlet is displaying name prefixed by javax.portlet.titlet.testpor

New Member 帖子: 10 加入日期: 11-6-3 最近的帖子
Still i am getting the same problem emoticon . The only difference is the path is /ROOT/WEB-INF/classes/content/Language.properties and also i have checked by putting the file in /ROOT/WEB-INF//content/Language.properties instead of /docroot/WEB-INF/src/content/Language.properties as suggested by you. In both the cases it is not working. Kindly let me know on this.

Regards,
Shreyas K,修改在12 年前。

RE: New Portlet is displaying name prefixed by javax.portlet.titlet.testpor

New Member 帖子: 10 加入日期: 11-6-3 最近的帖子
Hi,
Finally it worked. emoticon I didnt give the property name properly in Language.properties. Thanx alot for your help.

Regards/