Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Chirag Suthar
Hidding portlets from another portlets
3 de marzo de 2009 3:18
Respuesta

Chirag Suthar

Ranking: Junior Member

Mensajes: 41

Fecha de incorporación: 10 de enero de 2008

Mensajes recientes

I have search portlet and once I create trigger (Press search btn).I need to display other porltes which having search results.
How can I do that hidden/unhidden portion of portlets?
NOTE: by default search result portles is hidden.

Thanks,
zahid khan
RE: Hidding portlets from another portlets
3 de marzo de 2009 3:36
Respuesta

zahid khan

Ranking: Regular Member

Mensajes: 116

Fecha de incorporación: 30 de julio de 2008

Mensajes recientes

Hi chirag

as i understand your requirement, what u can do is on click of the search button u can forward the user to a hidden page on which u have keep to all the search results portlet .And in the mean time do the search processing, if there is any.

(sorry if i am wrong in understanding ur requirement.)
Chirag Suthar
RE: Hidding portlets from another portlets
3 de marzo de 2009 5:04
Respuesta

Chirag Suthar

Ranking: Junior Member

Mensajes: 41

Fecha de incorporación: 10 de enero de 2008

Mensajes recientes

Its also fine for me but if all portlets is on same page then its plus.
If possible then send me the roadmap of implementation.
Kindly find the attachment for your reference.

Thanks
Samuel Kong
RE: Hidding portlets from another portlets
3 de marzo de 2009 10:35
Respuesta

Samuel Kong

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1553

Fecha de incorporación: 10 de marzo de 2008

Mensajes recientes

One possible solution is to use JavaScript to change the CSS for the second portlet.

If you're using jQuery, you can just use toggle(), show(), or hide()
zahid khan
RE: Hidding portlets from another portlets
4 de marzo de 2009 3:30
Respuesta

zahid khan

Ranking: Regular Member

Mensajes: 116

Fecha de incorporación: 30 de julio de 2008

Mensajes recientes

Chirag Suthar:
Its also fine for me but if all portlets is on same page then its plus.
If possible then send me the roadmap of implementation.
Kindly find the attachment for your reference.

Thanks


there is no attachment along these thread .

to forward a user to a specific page use response .sendRedirect(url);
from your processAction class. where url should be String url = "web/guest/hidden-searchResultPage";

where "hidden-searchResultPage" is the name of the hidden page where all ur searchResult portlets are kept.
Chirag Suthar
RE: Hidding portlets from another portlets
4 de marzo de 2009 23:34
Respuesta

Chirag Suthar

Ranking: Junior Member

Mensajes: 41

Fecha de incorporación: 10 de enero de 2008

Mensajes recientes

Image is attached now.

zahid khan:
Chirag Suthar:
Its also fine for me but if all portlets is on same page then its plus.
If possible then send me the roadmap of implementation.
Kindly find the attachment for your reference.

Thanks


there is no attachment along these thread .

to forward a user to a specific page use response .sendRedirect(url);
from your processAction class. where url should be String url = "web/guest/hidden-searchResultPage";

where "hidden-searchResultPage" is the name of the hidden page where all ur searchResult portlets are kept.
Adjunto

archivos adjuntos: hiddenPortles.PNG (40,6k)
Luc Pons
RE: Hidding portlets from another portlets
5 de marzo de 2009 0:26
Respuesta

Luc Pons

Ranking: Junior Member

Mensajes: 70

Fecha de incorporación: 3 de diciembre de 2008

Mensajes recientes

You could also change the permissions of the portlets.

If the user doent have any permissions, once he does the search, you could grant the "view" permissions to the resulted portlets.
MohdFaizul Sulaiman
RE: Hidding portlets from another portlets
22 de abril de 2009 20:32
Respuesta

MohdFaizul Sulaiman

Ranking: New Member

Mensajes: 7

Fecha de incorporación: 10 de noviembre de 2008

Mensajes recientes

Hi,

I'm also facing the same problem and I found this solution.

You can use javascript to trigger the portlet css.
By default, all portlets are visible unless you trigger the hidden action.
So, you can check if the results are not available, set it as hidden (display: none).

Here is the sample code.

function hidePortlet(e){
element = document.getElementById(e).style;
element.display = 'none';
}

then at the portlet to be hide:
check if no result to display, then run the following script:

<script type = "text/javascript" >
hidePortlet('portlet_ID');
initiate(); // This must be placed immediately.
</script>

Hope this is useful for you.

Regards,
Faizul Sulaiman