Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Phoenix Zerin
Configuration Page for MVC Portlet
August 22, 2011 6:48 AM
Answer

Phoenix Zerin

Rank: Junior Member

Posts: 60

Join Date: June 28, 2011

Recent Posts

How do I create a new tab on the configuration view for an MVC plugin portlet?

EDIT: I noticed from this forum post that this feature has ben deprecated; is there a better way to control settings for all users per instance of a portlet?

Thanks!
Manikandan S
RE: Configuration Page for MVC Portlet
August 23, 2011 4:46 AM
Answer

Manikandan S

Rank: Expert

Posts: 492

Join Date: September 15, 2010

Recent Posts

Check this Link
and this Link
Phoenix Zerin
RE: Configuration Page for MVC Portlet
August 30, 2011 6:46 AM
Answer

Phoenix Zerin

Rank: Junior Member

Posts: 60

Join Date: June 28, 2011

Recent Posts

Thanks for the links Mani.

Do you know if there's an MVCPortlet way to accomplish this?
Manikandan S
RE: Configuration Page for MVC Portlet
August 30, 2011 9:13 PM
Answer

Manikandan S

Rank: Expert

Posts: 492

Join Date: September 15, 2010

Recent Posts

Are you expecting this link ?
Phoenix Zerin
RE: Configuration Page for MVC Portlet
September 20, 2011 7:13 AM
Answer

Phoenix Zerin

Rank: Junior Member

Posts: 60

Join Date: June 28, 2011

Recent Posts

I guess what I'm curious about is how one might implement a config mode in the same way as view/edit/help mode for a plugin portlet; that is:

docroot/WEB-INF/portlet.xml:

 1    <init-param>
 2      <name>config-jsp</name>
 3      <value>/html/config.jsp</value>
 4    </init-param>
 5    ...
 6    <supports>
 7      ...
 8      <portlet-mode>CONFIG</portlet-mode>
 9    </supports>


docroot/WEB-INF/src/.../MyPortletClass.java:

1  @Override
2  public void doConfig(RenderRequest renderRequest, RenderResponse renderResponse)
3    throws IOException, PortletException
4  {
5    ...
6  }


docroot/html/config.jsp:

1
2<p>This is my portlet in <b>config</b> mode.</p>


The above doesn't work as expected, though (in fact, it doesn't seem to have any effect on the portlet's behavior whatsoever).
Phoenix Zerin
RE: Configuration Page for MVC Portlet
September 20, 2011 7:16 AM
Answer

Phoenix Zerin

Rank: Junior Member

Posts: 60

Join Date: June 28, 2011

Recent Posts

Interestingly, even using Liferay Developer Studio's own tool - the New Plugin Portlet wizard - I still can't get this to work. When creating a new portlet, I am presented with the opportunity to configure it with "config" mode, which causes the wizard to make changes very similar to what I posted above, except with one difference:

docroot/WEB-INF/portlet.xml:

 1    <init-param>
 2      <name>config-jsp</name>
 3      <value>/html/config.jsp</value>
 4    </init-param>
 5    ...
 6    <supports>
 7      ...
 8      <portlet-mode>config</portlet-mode>
 9    </supports>


Note "config" portlet mode instead of "CONFIG".

But this still seems to have no effect whatsoever upon my portlet's behavior; when I deploy my portlet and click on the wrench icon in my portlet's titlebar and select "Configure", I still don't see my custom config page anywhere.