Foren

Custom portlet mode in liferay

donino donino, geändert vor 12 Jahren.

Custom portlet mode in liferay

Junior Member Beiträge: 81 Beitrittsdatum: 02.07.11 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Custom portlet mode in liferay

Junior Member Beiträge: 81 Beitrittsdatum: 02.07.11 Neueste Beiträge
Erf I suppose i should conclude Liferay can not manage custom portlets mode :/
thumbnail
Jitendra Rajput, geändert vor 12 Jahren.

RE: Custom portlet mode in liferay

Liferay Master Beiträge: 875 Beitrittsdatum: 07.01.11 Neueste Beiträge
see this post
thumbnail
Prakash Khanchandani, geändert vor 12 Jahren.

RE: Custom portlet mode in liferay

Expert Beiträge: 329 Beitrittsdatum: 10.02.11 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Custom portlet mode in liferay

Regular Member Beiträge: 224 Beitrittsdatum: 20.10.10 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Custom portlet mode in liferay

Liferay Master Beiträge: 894 Beitrittsdatum: 18.02.09 Neueste Beiträge
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