我有两个portlet的单页,第一个portet显示一些基于frindly URL的内容,如 localhost:8080 / portal / web / guest / article / - / id / 123 。第二个portlet是表单。当我发送表单时,我希望我的页面重新加载,网址看起来像 portal / web / guest / article / - / id / 123?p_p_id = xxx& p_p_lifecycle = 0& p_p_state = normal 但是我的友好参数( / - / id / 123 )消失了。可以帮我吗?
文章-URL-routes.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE routes PUBLIC "-//Liferay//DTD Friendly URL Routes 6.2.0//EN" "http://www.liferay.com/dtd/liferay-friendly-url-routes_6_2_0.dtd">
<routes>
<route>
<pattern>/{id:[0-9]+}</pattern>
<generated-parameter name="id">{id}</generated-parameter>
</route>
</routes>
的liferay-portlet.xml中
<portlet>
<portlet-name>Foo</portlet-name>
<friendly-url-mapper-class>com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper</friendly-url-mapper-class>
<friendly-url-mapping>id</friendly-url-mapping>
<friendly-url-routes>article-url-routes.xml</friendly-url-routes>
</portlet>