Foros de discusión
Hidding portlets from another portlets
Chirag Suthar, modificado hace 15 años.
Hidding portlets from another portlets
Junior Member Mensajes: 41 Fecha de incorporación: 10/01/08 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,
How can I do that hidden/unhidden portion of portlets?
NOTE: by default search result portles is hidden.
Thanks,
zahid khan, modificado hace 15 años.
RE: Hidding portlets from another portlets
Regular Member Mensajes: 116 Fecha de incorporación: 30/07/08 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.)
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, modificado hace 15 años.
RE: Hidding portlets from another portlets
Junior Member Mensajes: 41 Fecha de incorporación: 10/01/08 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
If possible then send me the roadmap of implementation.
Kindly find the attachment for your reference.
Thanks
zahid khan, modificado hace 15 años.
RE: Hidding portlets from another portlets
Regular Member Mensajes: 116 Fecha de incorporación: 30/07/08 Mensajes recientesChirag 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, modificado hace 15 años.
RE: Hidding portlets from another portlets
Junior Member Mensajes: 41 Fecha de incorporación: 10/01/08 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.
Samuel Kong, modificado hace 15 años.
RE: Hidding portlets from another portlets
Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 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()
If you're using jQuery, you can just use toggle(), show(), or hide()
Luc Pons, modificado hace 15 años.
RE: Hidding portlets from another portlets
Junior Member Mensajes: 70 Fecha de incorporación: 3/12/08 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.
If the user doent have any permissions, once he does the search, you could grant the "view" permissions to the resulted portlets.
MohdFaizul Sulaiman, modificado hace 15 años.
RE: Hidding portlets from another portlets
New Member Mensajes: 7 Fecha de incorporación: 11/11/08 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
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