掲示板

Liferay 7 : Upgrade simple portlet from Liferay 6.2

7年前 に Koffi AGHOSTO によって更新されました。

Liferay 7 : Upgrade simple portlet from Liferay 6.2

Junior Member 投稿: 67 参加年月日: 14/05/27 最新の投稿
Hello everybody,

I try to upgrade a simple mvc portlet from Liferay 6.2 to Liferay 7. I am using this tutorial
https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/adapting-to-liferay-7s-api-with-the-code-upgrade-tool but I still
getting the same error when I run Find Liferay 7 breaking API changes :

- copy-request- parameters init parameters init param default values changes ?

I don't know how to resolve it ? (below my simple code)

public class TestController extends MVCPortlet {

private static Log _log = LogFactoryUtil.getLog(TestController.class.getName());

@Override
public void render(RenderRequest request, RenderResponse response) throws PortletException, IOException {
super.render(request, response);
}
}

Thank you in Advanced,
Bests regards,
Koffi
thumbnail
7年前 に Geert van der Ploeg によって更新されました。

RE: Liferay 7 : Upgrade simple portlet from Liferay 6.2

New Member 投稿: 22 参加年月日: 14/04/03 最新の投稿
See an example of a Liferay 7.0 portlet here:
https://github.com/liferay-labs/pokedex/blob/master/pokedex-web/src/main/java/com/liferay/pokedex/web/portlet/PokedexPortlet.java#L39

This portlet has this particular init param set, so you could include it in your code as well.
But as your portlet is simple (as you say) I would just ignore the error: the 7.0 default is fine for your case.
thumbnail
7年前 に Pasi Kössi によって更新されました。

RE: Liferay 7 : Upgrade simple portlet from Liferay 6.2

New Member 投稿: 12 参加年月日: 08/10/13 最新の投稿
If the parameter default change has no relevance to you, you can get rid of the error in Eclipse by checking the corresponding checkbox in the "Liferay 7 Migration Problems" window.
thumbnail
6年前 に Robert Smith によって更新されました。

RE: Liferay 7 : Upgrade simple portlet from Liferay 6.2

Junior Member 投稿: 63 参加年月日: 09/10/15 最新の投稿
I am trying to upgrade my 6.2 plugins sdk to 7.0 and have encountered the same error:
The copy-request-parameters init parameter’s default value is now set to true in all portlets that extend MVCPortlet.
I have added the following to my portlet.xml in the sdk
<portlet-class>com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet</portlet-class>
<init-param>
<name>copy-request-parameters</name>
<value>false</value>
</init-param>

But the Liferay Code Upgrade keeps reporting the same error and indicates errors on the <portlet-class> and <name> lines.

Any help would be appreciated.

Thanks.
thumbnail
6年前 に Andrew Jardine によって更新されました。

RE: Liferay 7 : Upgrade simple portlet from Liferay 6.2

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
I haven't used the SDK in 7, I'm pretty well sticking with gradle, but the new convention is to use the component annotation in place of the XML files. Have you tried that?