Forums de discussion

Problem freindly url

thumbnail
ALex joubert, modifié il y a 10 années.

Problem freindly url

Junior Member Publications: 27 Date d'inscription: 19/03/10 Publications récentes
Hi,

I implemented the example:
https://issues.liferay.com/browse/FACES-257
its work correctluy but i have one probleme.
My problem is at the redirect to another page

<p:button outcome="test" value="Bookmark" icon="ui-icon-star">  
   	 <f:param name="type" value="abc" />
</p:button> 




thank you in advance
thumbnail
Juan Gonzalez, modifié il y a 10 années.

RE: Problem freindly url

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Do you have that outcome defined in faces-config?

What error are you having?
thumbnail
ALex joubert, modifié il y a 10 années.

RE: Problem freindly url

Junior Member Publications: 27 Date d'inscription: 19/03/10 Publications récentes
not I use jsf 2.2 is not worth making the declaration.

if I use

<p:button outcome="recherche" value="Bookmark" icon="ui-icon-star">
   
<!-- p: button--></p:button>


it works but freindly url not worck
thumbnail
Juan Gonzalez, modifié il y a 10 années.

RE: Problem freindly url

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Hi Alex,

so you mean that your page shows properly but the URL doesn't make use of friendly-url-routes?
thumbnail
ALex joubert, modifié il y a 10 années.

RE: Problem freindly url

Junior Member Publications: 27 Date d'inscription: 19/03/10 Publications récentes
Hi Juan,


in this case freindly url works but redirection no:


<p:button outcome="test" value="Bookmark" icon="ui-icon-star"> 
        <f:param name="type" value="abc" />
</p:button> 



in this case redirection work but freindly url no


<p:button outcome="test" value="Bookmark" icon="ui-icon-star"> 
</p:button> 
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Problem freindly url

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Alex,

In order for us to help you better, it would be great if you could follow the instructions in Building Liferay Faces From Source.

Specifically, we use the FACES-257-portlet for testing the bookmarkable URL feature.

How would you propose modifying the FACES-257-portlet in order to test redirection?

Thank you,

Neil
Michael Rohleder, modifié il y a 10 années.

RE: Problem freindly url

New Member Publications: 19 Date d'inscription: 31/07/13 Publications récentes
btw:
has anyone tried (or know if its work) friendly url together with public shared parameters in jsf?

friendly url with view params in one portlet work very well, but i have to do this for more than one (jsf) portlet on the same page (and app/war).

I tried doing the same friendly-url-routes for both porlets but that seems to be unpredictable (the first portlet that is added to a page gets the route, the other one not?)

Then I tried to define the same params from the friendly url as public shared params, but that didnt have any effect at all (the second portlet still doesnt get the params).

Has anyone a hint or tried something like that and knows if it works or not?
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Problem freindly url

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Michael,

Setting Public Render Parameters is done in the ACTION_PHASE of the portlet lifecycle. The Friendly URL feature of Liferay is based on a RenderURL and is associated with the RENDER_PHASE of the portlet lifecycle. So it is not possible to set the value of a Public Render Parameter with a Friendly URL.

Kind Regards,

Neil
Michael Rohleder, modifié il y a 10 années.

RE: Problem freindly url

New Member Publications: 19 Date d'inscription: 31/07/13 Publications récentes
Hi Neil,

thank you very, very much!

Ok, I see.
Is there any good way of doing this (in render phase).?

Just thought about a workaround like this:
portlet A gets param from (friendly) url, writes them to (servlet/lr) session, portlet B reads them from the session.
(need to configure the render prio for portlet A, so it gets rendered before B ).

But this also doesnt "feel" right/good, more like a hack ;)


Kind Regards
mike
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Problem freindly url

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Michael,

Unfortunately there is no guarantee that Portlet A will undergo the RENDER_PHASE of the portlet lifecycle before Portlet B. You can force this with the <render-weight> feature of WEB-INF/liferay-portlet.xml but I would not recommend it because that is a Liferay-specific feature that is not guaranteed to be there in future versions of Liferay Portal.

Neil
thumbnail
ALex joubert, modifié il y a 10 années.

RE: Problem freindly url

Junior Member Publications: 27 Date d'inscription: 19/03/10 Publications récentes
Hi Neil,


ALL IS WELL, the example of feindly url is perfect, the only thing I need is to put a link in h: form that redirects to another page.

In your example, it remains on the same page.

Thank you,
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Problem freindly url

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Alex,

Glad to hear that you got it working and thanks so much for the kind words about the FACES-257-portlet code. emoticon

Kind Regards,

Neil