Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: setRenderParameter is deprecated in liferay CE 7.3
Kindly suggest the alternative method which can be used, thank you
As this is in javax.portlet.ActionResponse, the deprecation is part of the new Portlet API 3.0, JSR 362. See the specification, or its javadoc (I found the first one here to a (new) superclass of ActionResponse)
Hi Olaf, I have the same question as manoj. The link posted here is broken. Maybe it's my firewall or security settings.
I did find the following for the Portlet API 3.0, JSR 362
This doesn't make sense to me, how do we replace a "set" method with a "get" method?? I want to set the "mvcPath" parameter to my JSP. There must be a different way of doing this. I can still use it as it's simply deprecated, but when they decide to completely remove it, we are screwed.
If there is an alternative to setting the renderParameter, let us know.
Hi, I am new to liferay so may i know what function should i used to achive things, which we were using liferay 7.
@SuppressWarnings("deprecation")
public void
addBatch(ActionRequest actionrequest, ActionResponse actionresponse)
throws IOException, PortalException {
ServiceContext
serviceContext =
ServiceContextFactory.getInstance(Batch.class.getName(),actionrequest);
String name = ParamUtil.getString(actionrequest,
"batchname");
String city =
ParamUtil.getString(actionrequest, "batchcity");
long id = Long.valueOf((ParamUtil.getString(actionrequest,
"groupId")));
BatchLocalServiceUtil.create_Batch(id, name, city,
serviceContext);
actionresponse.setRenderParameter(
"mvcPath", "/batch_view.jsp");
I am calling this addBatch from front end using action url, now i want to render to a specific page after doing some database operation, may i know how to do that
This looks like a new question, not like an answer to the question that you answered to. Consider posting a new question, because your question is not about a deprecated method - or is it?
Or if it is: Please describe your observations. The method is only deprecated, not removed. I'd expect it to still work. Worst case, you can also revert to portlet spec 2.0, JSR-286
Hi Manoi,
You can do it in following way
response.getRenderParameters().setValue("mvcPath", "view.jsp");
response.getRenderParameters().setValue("param name", "param value");
Powered by Liferay™