Fórumok
Portlet preferences for Liferay portlet in 6.2
Aston Pearl, módosítva 9 év-val korábban
Portlet preferences for Liferay portlet in 6.2
Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2013.02.04. Legújabb bejegyzések
Hello EveryOne,
I'm trying to set preferences for custom portlet. Which is Liferay MVC portlet, using following Doc. as a reference Implementing Configurable Portlet Preferences.
But somehow portlet not able to store store preferences using "--preferences--{fieldname}--" naming convention.
Can any one please pin-point, if there is some issue up here !!!
I'm trying to set preferences for custom portlet. Which is Liferay MVC portlet, using following Doc. as a reference Implementing Configurable Portlet Preferences.
But somehow portlet not able to store store preferences using "--preferences--{fieldname}--" naming convention.
Can any one please pin-point, if there is some issue up here !!!
Pankaj Kathiriya, módosítva 9 év-val korábban
RE: Portlet preferences for Liferay portlet in 6.2
Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
I hope you have used aui input tags, or if you have plan html input tags then you have <portlet:namespace/> prefix to its name.
Aston Pearl, módosítva 9 év-val korábban
RE: Portlet preferences for Liferay portlet in 6.2
Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2013.02.04. Legújabb bejegyzések
Hi Pankaj,
I did use the AUI tags. I have just copy paste the code from given Document get understanding. But still not able to store the preferences.
I did use the AUI tags. I have just copy paste the code from given Document get understanding. But still not able to store the preferences.
Pankaj Kathiriya, módosítva 9 év-val korábban
RE: Portlet preferences for Liferay portlet in 6.2
Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
Try putting debug breakpoints in com.liferay.portal.kernel.portlet.DefaultConfigurationAction class, to check if control is going there or not.
Nagendra Kumar Busam, módosítva 9 év-val korábban
R: Portlet preferences for Liferay portlet in 6.2
Liferay Master Bejegyzések: 678 Csatlakozás dátuma: 2009.07.07. Legújabb bejegyzések
If you can attach your portlet w/ basic configuration - so that we can have a look at actual code
Sent from my iPhone with Liferay.com Forums
Sent from my iPhone with Liferay.com Forums
Aston Pearl, módosítva 9 év-val korábban
RE: R: Portlet preferences for Liferay portlet in 6.2
Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2013.02.04. Legújabb bejegyzésekNagendra Kumar Busam:
If you can attach your portlet w/ basic configuration - so that we can have a look at actual code
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/util" prefix="liferay-util" %> <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> <%@ page import="com.liferay.portal.kernel.util.Constants" %> <%@ page import="com.liferay.portal.kernel.util.GetterUtil" %> <%@ page import="com.liferay.portal.kernel.util.StringPool" %> <%@ page import="javax.portlet.PortletURL" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineobjects /> <liferay-theme:defineobjects /> This is the <b>Config Controller</b> portlet in Config mode <liferay-portlet:actionurl portletConfiguration="true" var="configurationURL" /> <% boolean showLocationAddress_cfg = GetterUtil.getBoolean(portletPreferences.getValue("showLocationAddress", StringPool.TRUE)); %> <aui:form action="<%= configurationURL %>" method="post" name="fm"> <aui:input name="preferences--showLocationAddress--" type="checkbox" value="<%= showLocationAddress_cfg %>"></aui:input> <aui:button-row> <aui:button type="submit" /> </aui:button-row> </aui:form>
liferay-portlet.xml<liferay-portlet-app> <portlet> <portlet-name>config-controller</portlet-name> <icon>/icon.png</icon> [b]<configuration-action-class>com.liferay.portal.kernel.portlet.DefaultConfigurationAction</configuration-action-class>[/b] <preferences-unique-per-layout>true</preferences-unique-per-layout> <header-portlet-css>/css/main.css</header-portlet-css> <footer-portlet-javascript> /js/main.js </footer-portlet-javascript> <css-class-wrapper>config-controller-portlet</css-class-wrapper> </portlet> [indent]...[/indent] </liferay-portlet-app>
Am I missing something here...???
Pankaj Kathiriya, módosítva 9 év-val korábban
RE: Portlet preferences for Liferay portlet in 6.2 (Válasz)
Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
You are missing below code in your form
which is required as per implementation of DefaultConfigurationAction.
<aui:input name="<%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" />
which is required as per implementation of DefaultConfigurationAction.
Aston Pearl, módosítva 9 év-val korábban
RE: Portlet preferences for Liferay portlet in 6.2
Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2013.02.04. Legújabb bejegyzések
Thanks Pankaj !!!