Foren

Portlet Configuration processAction() not invoked

Sourabh Lonikar, geändert vor 7 Jahren.

Portlet Configuration processAction() not invoked

Junior Member Beiträge: 42 Beitrittsdatum: 14.11.16 Neueste Beiträge
Hi everyone,
I am trying to make simple portlet. While submitting configuration settings, processAction() of ConfigurationActionImpl is not invoked. Directly render() is called. Hence I am unable to save setting.

/** Backend Code **/
public class ConfigurationActionImpl extends DefaultConfigurationAction {

@Override
@ProcessAction(name="processAction")
public void processAction(PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
logger.info("processAction | enter");
}
}

/* JSP */

<%@ page import="com.liferay.portal.kernel.util.GetterUtil" %>
<%@ page import="com.liferay.portal.kernel.util.StringPool" %>
<%@ page import="com.liferay.portal.kernel.util.Constants" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>

<liferay-portlet:actionURL name="submitForm" portletConfiguration="true" var="configurationActionURL" portletName="CarousalCustom_WAR_CarousalCustomportlet">
<portlet:param name="<%=Constants.CMD %>" value="<%=Constants.UPDATE %>" />
</liferay-portlet:actionURL>

<aui:form action="${configurationActionURL}" method="post" name="fm" id="fm">
<%-- <aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" /> --%>
<aui:input name="preferences--emailFromName--" type="checkbox" value="<%= somePreferenceKey_cfg %>" />
<!-- Preference control goes here -->
<!-- <div onclick="updateGames()">CLICK HERE</div> -->
<aui:button-row>
<aui:button type="submit" />
</aui:button-row>
</aui:form>


Regards,
Sourabh
thumbnail
Abhishek Suthar, geändert vor 7 Jahren.

RE: Portlet Configuration processAction() not invoked

New Member Beiträge: 18 Beitrittsdatum: 26.06.13 Neueste Beiträge
Make changes to back end code like shown in below link,

https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/using-configurable-portlet-preferences

Try removing @ProcessAction(name="processAction") this annotation.You 'll get an idea if its called OR not. This annotation says that it will find name parameter with "processAction" value.Which is not your case.