Created
July 31, 2016 09:46
-
-
Save chingovan/cd1cf086c50acb252884bbc1565cea4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.opensource.techblog.portlet; | |
import javax.portlet.PortletConfig; | |
import javax.portlet.PortletException; | |
import com.liferay.portal.kernel.log.Log; | |
import com.liferay.portal.kernel.log.LogFactoryUtil; | |
import com.liferay.util.bridges.mvc.MVCPortlet; | |
public class PhaseAndLifecyclePortlet extends MVCPortlet { | |
//define log for this class | |
private static final Log _log = LogFactoryUtil.getLog(PhaseAndLifecyclePortlet.class.getName()); | |
//This method is defined in MVCPortlet | |
@Override | |
public void init() throws PortletException { | |
_log.info(" This is init method without parameter"); | |
super.init(); | |
} | |
//This method is defined in GenericPortlet | |
@Override | |
public void init(PortletConfig config) throws PortletException { | |
String viewTemplate = config.getInitParameter("view-template"); | |
_log.info("Init Parameter of viewTemplatei is ==>"+viewTemplate); | |
_log.info(" This is init method with PortletConfig parameter"); | |
super.init(config); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment