Fórum
configuration page invisible
Jerome Comouth, modificado 9 Anos atrás.
configuration page invisible
New Member Postagens: 24 Data de Entrada: 07/04/14 Postagens Recentes
I followed this article. I can choose the tab 'setup', but the content of the tab is blank (only on the right sight a link "Archive/Restore Setup").
Maybe you could tell me, if I made something wrong:
liferay-portlet.xml
config.jsp
portlet.xml
<init-param>
<name>config-template</name>
<value>/views/config.jsp</value>
<!-- <name>view-template</name>
<value>/views/scan.jsp</value> -->
</init-param>
I combined init.jsp and config.jsp, so I don't need to create a jsp more. Maybe there is the mistake? Is there a possibility to search for errors, if there are no one displayed in the log file?
Maybe you could tell me, if I made something wrong:
liferay-portlet.xml
<configuration-action-class>de.pax.qm.portlet.flra.Configuration</configuration-action-class>
config.jsp
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui"%>
<%@ page import="javax.portlet.PortletPreferences"%>
<%@ page import="com.liferay.portal.kernel.util.Constants" %>
<%@ page import="com.liferay.portal.kernel.util.GetterUtil" %>
<%@ page import="com.liferay.portal.kernel.util.StringPool" %>
<liferay-theme:defineobjects />
<liferay-portlet:actionurl portletConfiguration="true" var="configurationURL" />
<%
PortletPreferences prefs = renderRequest.getPreferences();
boolean showLocationAddress_cfg = GetterUtil.getBoolean(prefs.getValue("showLocationAddress", StringPool.TRUE));
%>
<aui:form action="<%= configurationURL %>" method="post" name="fm">
<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
<aui:input name="preferences--showLocationAddress--" type="checkbox" value="<%= showLocationAddress_cfg %>" />
<aui:button-row>
<aui:button type="submit" />
</aui:button-row>
</aui:form>
portlet.xml
<init-param>
<name>config-template</name>
<value>/views/config.jsp</value>
<!-- <name>view-template</name>
<value>/views/scan.jsp</value> -->
</init-param>
I combined init.jsp and config.jsp, so I don't need to create a jsp more. Maybe there is the mistake? Is there a possibility to search for errors, if there are no one displayed in the log file?
Pankaj Kathiriya, modificado 9 Anos atrás.
RE: configuration page invisible
Liferay Master Postagens: 722 Data de Entrada: 05/08/10 Postagens Recentes
<configuration-action-class> entry you provided is custom class, can you provide code of that? Itseems that class is not implemented properly.
Jerome Comouth, modificado 9 Anos atrás.
RE: configuration page invisible
New Member Postagens: 24 Data de Entrada: 07/04/14 Postagens Recentes
The class is copy pasted from the tutorial, I can't see a problem there.
Thank you for the reply, Pankaj
Thank you for the reply, Pankaj
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletConfig;
import javax.portlet.PortletPreferences;
import com.liferay.portal.kernel.portlet.DefaultConfigurationAction;
public class Configuration extends DefaultConfigurationAction {
@Override
public void processAction(
PortletConfig portletConfig, ActionRequest actionRequest,
ActionResponse actionResponse) throws Exception {
super.processAction(portletConfig, actionRequest, actionResponse);
PortletPreferences prefs = actionRequest.getPreferences();
String showLocationAddress = prefs.getValue(
"showLocationAddress", "true");
System.out.println("showLocationAddress=" + showLocationAddress +
" in ConfigurationActionImpl.processAction().");
}
}
Jitendra Rajput, modificado 9 Anos atrás.
RE: configuration page invisible
Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
No need to create custom configuration class if you just want to store text value preferences. Use default configuration class instead.
<configuration-action-class>com.liferay.portal.kernel.portlet.DefaultConfigurationAction</configuration-action-class>
On submit action DefaultConfigurationClass will store all request parameters which are having preferences--xxx-- pattern.
<configuration-action-class>com.liferay.portal.kernel.portlet.DefaultConfigurationAction</configuration-action-class>
On submit action DefaultConfigurationClass will store all request parameters which are having preferences--xxx-- pattern.
Jerome Comouth, modificado 9 Anos atrás.