Forums de discussion
Friendly URL mapping with JSF portlet
Vikas Kadam, modifié il y a 10 années.
Friendly URL mapping with JSF portlet
New Member Publications: 22 Date d'inscription: 15/06/11 Publications récentes
Hi,
I'm trying to implement friendly URL mapping for JSF portlets. I tried with following but had no luck.
<routes>
<route>
<pattern>/search</pattern>
<generated-parameter name="facesViewIdRender">/WEB-INF/xhtml/userSearch.xhtml</generated-parameter>
</route>
</routes>
I tried by changing implicit-parameter instead of generated-parameter for the parameter facesViewIdRender, this also had same result.
The environment is;
Server: liferay-portal-6.1.20-ee-ga2
Liferay Faces libs: liferay-faces-bridge-api-3.0.1-ga2, liferay-faces-bridge-impl-3.0.1-ga2, liferay-faces-util-3.0.1-ga2
Do I missing anything?
One more, can we use a virtual parameter for xhtml page like {jspPageName}, used with spring-portlet mvc?
Thanks in advance,
-Vikas
I'm trying to implement friendly URL mapping for JSF portlets. I tried with following but had no luck.
<routes>
<route>
<pattern>/search</pattern>
<generated-parameter name="facesViewIdRender">/WEB-INF/xhtml/userSearch.xhtml</generated-parameter>
</route>
</routes>
I tried by changing implicit-parameter instead of generated-parameter for the parameter facesViewIdRender, this also had same result.
The environment is;
Server: liferay-portal-6.1.20-ee-ga2
Liferay Faces libs: liferay-faces-bridge-api-3.0.1-ga2, liferay-faces-bridge-impl-3.0.1-ga2, liferay-faces-util-3.0.1-ga2
Do I missing anything?
One more, can we use a virtual parameter for xhtml page like {jspPageName}, used with spring-portlet mvc?
Thanks in advance,
-Vikas
Kyle Joseph Stiemann, modifié il y a 10 années.
RE: Friendly URL mapping with JSF portlet
Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
Hi Vikas,
We have an issue portlet which utilizes this feature: FACES-257-portlet
You can build liferay faces from source to create this portlet, so you can see how it works.
- Kyle
We have an issue portlet which utilizes this feature: FACES-257-portlet
You can build liferay faces from source to create this portlet, so you can see how it works.
- Kyle
Vikas Kadam, modifié il y a 10 années.
RE: Friendly URL mapping with JSF portlet
New Member Publications: 22 Date d'inscription: 15/06/11 Publications récentes
Thanks Kyle,
I went through the url route xml provided in the issue portlet FACES-257-portlet. My requirement is to hide the xhtml file name in the URL.
I tried with following but failed;
<route>
<pattern>/search</pattern>
<implicit-parameter name="_facesViewIdRender">/WEB-INF/xhtml/userSearch.xhtml</implicit-parameter>
</route>
and
<route>
<pattern>/search</pattern>
<generated-parameter name="_facesViewIdRender" >/WEB-INF/xhtml/userSearch.xhtml</generated-parameter>
</route>
I could find some examples where the jsp name is hidden using generated parameter (and the all rest default params also hidden, like pp_id, pp_state. etc.)
The code for jsp hiding is;
<route>
<pattern>/{jspPageName}</pattern>
<generated-parameter name="jspPage">/{jspPageName}.jsp</generated-parameter>
</route>
Don't understand, what to use, implicit or generated to hide _facesViewIdRender?
-Vikas
I went through the url route xml provided in the issue portlet FACES-257-portlet. My requirement is to hide the xhtml file name in the URL.
I tried with following but failed;
<route>
<pattern>/search</pattern>
<implicit-parameter name="_facesViewIdRender">/WEB-INF/xhtml/userSearch.xhtml</implicit-parameter>
</route>
and
<route>
<pattern>/search</pattern>
<generated-parameter name="_facesViewIdRender" >/WEB-INF/xhtml/userSearch.xhtml</generated-parameter>
</route>
I could find some examples where the jsp name is hidden using generated parameter (and the all rest default params also hidden, like pp_id, pp_state. etc.)
The code for jsp hiding is;
<route>
<pattern>/{jspPageName}</pattern>
<generated-parameter name="jspPage">/{jspPageName}.jsp</generated-parameter>
</route>
Don't understand, what to use, implicit or generated to hide _facesViewIdRender?
-Vikas
Kyle Joseph Stiemann, modifié il y a 10 années.
RE: Friendly URL mapping with JSF portlet
Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
Hi Vikas,
I just noticed that in your first post you said you were using liferay-faces-3.0.1-ga2 on liferay-portal-6.1.20-ee-ga2. However, this issue was fixed only in the liferay faces ga3 release. Also, liferay-faces-3.0 is designed for use with an older version of the portal (liferay-portal-6.0). We have a new release out which you can upgrade to that is designed for use with liferay-portal-6.1: liferay-faces-3.1.3-ga4. Please give that a try and see if it fixes the problem.
- Kyle
I just noticed that in your first post you said you were using liferay-faces-3.0.1-ga2 on liferay-portal-6.1.20-ee-ga2. However, this issue was fixed only in the liferay faces ga3 release. Also, liferay-faces-3.0 is designed for use with an older version of the portal (liferay-portal-6.0). We have a new release out which you can upgrade to that is designed for use with liferay-portal-6.1: liferay-faces-3.1.3-ga4. Please give that a try and see if it fixes the problem.
- Kyle