留言板

Custom portlet mode in liferay

donino donino,修改在12 年前。

Custom portlet mode in liferay

Junior Member 帖子: 81 加入日期: 11-7-2 最近的帖子
Hi,

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 emoticon
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
donino donino,修改在12 年前。

RE: Custom portlet mode in liferay

Junior Member 帖子: 81 加入日期: 11-7-2 最近的帖子
Erf I suppose i should conclude Liferay can not manage custom portlets mode :/
thumbnail
Jitendra Rajput,修改在12 年前。

RE: Custom portlet mode in liferay

Liferay Master 帖子: 875 加入日期: 11-1-7 最近的帖子
see this post
thumbnail
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
thumbnail
Jan Gregor,修改在12 年前。

RE: Custom portlet mode in liferay

Regular Member 帖子: 224 加入日期: 10-10-20 最近的帖子
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.
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