From the wiki (no shame here though, took me a very long time to find it):
Add Config Page to Plugin Portlet <- get more info here
liferay-portlet.xml->
<portlet>
<portlet-name>configuration-example</portlet-name>
<icon>/icon.png</icon>
<configuration-action-class>com.sample.jsp.action.ConfigurationActionImpl</configuration-action-class>
<instanceable>true</instanceable>
<header-portlet-css>/css/test.css</header-portlet-css>
<footer-portlet-javascript>/js/test.js</footer-portlet-javascript>
</portlet>
ConfigurationActionImpl.java (or your class)->
public class ConfigurationActionImpl implements ConfigurationAction {
public void processAction(PortletConfig config, ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
String portletResource = ParamUtil.getString(actionRequest, "portletResource");
PortletPreferences prefs = PortletPreferencesFactoryUtil.getPortletSetup(actionRequest, portletResource);
//Read, validate, and then set form parameters as portlet preferences
prefs.store();
SessionMessages.add(actionRequest, portletConfig.getPortletName() + ".doConfigure");
}
public String render(PortletConfig config, RenderRequest renderRequest, RenderResponse renderResponse) throws Exception {
return "/configuration.jsp";
}
}
Configuration.jsp
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<portlet:defineObjects />
<form action="<liferay-portlet:actionURL portletConfiguration="true" />" method="post" name="<portlet:namespace />fm"> <input name="<portlet:namespace /><%=Constants.CMD%>" type="hidden" value="<%=Constants.UPDATE%>" />
Type: <select name="<portlet:namespace />type"> <option value="casual">Casual</option> <option value="formal">Formal</option> </select> <br/>
<input type="button" value="Save" onClick="submitForm(document.<portlet:namespace />fm);" /> </form>
"Note the portletConfiguration attribute in the liferay-portlet:actionURL tag."