留言板
Custom portlet mode in liferay
Hi,
I develop a portlet which use custom modes, defined in portlet.xml as below:
But nothing happens, liferay seems completely ignore it
Is there anything else to manage for Liferay? I saw few post on that subject, but they are a bit old and not completely clear.
Could someone confirm if custom portlet modes can be used or not?
Thanks
I develop a portlet which use custom modes, defined in portlet.xml as below:
<portlet>
...
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode> <!-- Report display -->
<portlet-mode>EDIT</portlet-mode> <!-- Portlet preferences settings (report path, size, running mode...) -->
<portlet-mode>HELP</portlet-mode> <!-- Help: replace default jsp page by your own functional help -->
<portlet-mode>myMode</portlet-mode> <!-- Filtering mode: select et store report parameters values -->
</supports>
....
</portlet>
...
<custom-portlet-mode>
<description>myMode</description>
<portlet-mode>myMode</portlet-mode>
<portal-managed>false</portal-managed>
</custom-portlet-mode>
...
And in my java portlet class:
@RenderMode(name = "myMode")
public void doMyMode(RenderRequest request, RenderResponse response)
throws IOException, PortletException {
//code controller
}
But nothing happens, liferay seems completely ignore it
Is there anything else to manage for Liferay? I saw few post on that subject, but they are a bit old and not completely clear.
Could someone confirm if custom portlet modes can be used or not?
Thanks
Jitendra Rajput,修改在12 年前。
RE: Custom portlet mode in liferay
Liferay Master 帖子: 875 加入日期: 11-1-7 最近的帖子
Prakash Khanchandani,修改在12 年前。
RE: Custom portlet mode in liferay
Expert 帖子: 329 加入日期: 11-2-10 最近的帖子Jitendra Rajput:
see this post
Hi Jitendra,
Custom Mode and Custom Configuration are two different things, if I am correct in my understanding.
What you are explaining in your post is adding a Custom configuration page and not Custom Mode Development as asked and there is also a Wiki entry available for adding a custom configuration page as you are explained in your blog post.
To answer the question of Custom Mode Development as I understand it:
1) Liferay supports the following custom modes apart from the three (VIEW, EDIT (preferences), HELP):
a) ABOUT
b) CONFIG
c) PRINT
d) PREVIEW
e) EDIT_DEFAULTS
f) EDIT_GUEST
2) You cannot create a custom mode unless it is supported by the Portal.
3) When you specify these custom modes in your portlet.xml, Liferay displays the modes in the configuration menu of your portlet. (see attached image)
Hope this helps.
Regards,
Prakash Khanchandani
Hi all,
Custom modes are supported in general, but unfortunatelly they are ignored in this version, see http://issues.liferay.com/browse/LPS-13233
Regards,
Jan.
Custom modes are supported in general, but unfortunatelly they are ignored in this version, see http://issues.liferay.com/browse/LPS-13233
Regards,
Jan.
Oliver Bayer,修改在12 年前。
RE: Custom portlet mode in liferay
Liferay Master 帖子: 894 加入日期: 09-2-18 最近的帖子
Hi Prakash,
see the comment from my colleague Harald at the following ticket LPS-4090. With some modifications you will be able to use custom portlet modes.
HTH Oli
see the comment from my colleague Harald at the following ticket LPS-4090. With some modifications you will be able to use custom portlet modes.
HTH Oli