Skip to content

Instantly share code, notes, and snippets.

@adit2787
Created October 13, 2015 09:16
Sender
package com.sender;
import java.io.IOException;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
import javax.portlet.PortletSession;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;
public class Sender extends MVCPortlet {
public void processFood(ActionRequest request, ActionResponse response) throws PortletException, IOException {
String foodType = ParamUtil.getString(request, "foodType" ,"default");
if(!foodType.equalsIgnoreCase("default"))
{
PortletSession session = request.getPortletSession();
session.setAttribute("foodType",foodType, PortletSession.APPLICATION_SCOPE);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment