36 lines
1.2 KiB
Java
36 lines
1.2 KiB
Java
package org.gcube.portlets.user.sbdportlets;
|
|
|
|
import java.io.IOException;
|
|
|
|
import javax.portlet.ActionRequest;
|
|
import javax.portlet.ActionResponse;
|
|
import javax.portlet.PortletException;
|
|
|
|
import com.liferay.portal.kernel.servlet.SessionErrors;
|
|
import com.liferay.portal.kernel.servlet.SessionMessages;
|
|
import com.liferay.portal.kernel.util.ParamUtil;
|
|
import com.liferay.util.bridges.mvc.MVCPortlet;
|
|
|
|
/**
|
|
* upload method/dataset: UserUpload Admin
|
|
- Share idea: UserIdea Admin
|
|
* Portlet implementation class CollaborateWithUs
|
|
*/
|
|
public class CollaborateWithUs extends MVCPortlet {
|
|
|
|
public void addIdea(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException {
|
|
try{
|
|
String experiment_name = ParamUtil.getString(actionRequest, "experiment_name");
|
|
System.out.println("ex: " + experiment_name);
|
|
SessionMessages.add(actionRequest.getPortletSession(), "experiment-form-success");
|
|
actionResponse.setRenderParameter("mvcPath", "/html/collaboratewithus/view-experiment-inserted.jsp");
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
SessionErrors.add(actionRequest.getPortletSession(),"experiment-form-error");
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|