Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Christian Perez
refresh portlet, not the page
October 25, 2013 9:21 AM
Answer

Christian Perez

Rank: Junior Member

Posts: 36

Join Date: June 30, 2013

Recent Posts

Hi
I work modifying a portlet, and this portlet execute some methods but is very slow then when refresh the page takes much time to refresh, I want to refresh only the portlet and show a progress bar or something like that until the execution is done, and after this reload the portlet every 15 minutes, but only the portlet, not the entire page some idea?
I know that I have to use Ajax, but how to refresh only the portlet? any idea??
thanks
--Chris--
venka reddy
RE: refresh portlet, not the page
October 25, 2013 11:27 AM
Answer

venka reddy

Rank: Regular Member

Posts: 228

Join Date: March 23, 2011

Recent Posts

hi,

You can refresh your portlet in script

follow the link "http://liferaytutorial.blogspot.in/2013/08/refreshing-portlet-through-javascript.html" .



Let me know anything required further!!
Christian Perez
RE: refresh portlet, not the page
October 25, 2013 11:36 AM
Answer

Christian Perez

Rank: Junior Member

Posts: 36

Join Date: June 30, 2013

Recent Posts

thanks for your reply,
I have a doubt the bold word is the portlet name or the portlet id?
Christian Perez
RE: refresh portlet, not the page
October 25, 2013 11:40 AM
Answer

Christian Perez

Rank: Junior Member

Posts: 36

Join Date: June 30, 2013

Recent Posts

and one more to set the time to refresh??
venka reddy
RE: refresh portlet, not the page
October 25, 2013 11:47 AM
Answer

venka reddy

Rank: Regular Member

Posts: 228

Join Date: March 23, 2011

Recent Posts

Hi,

It is portletId

To get rid of confusion ,

http://localhost:8080/community/forums?p_p_id=test_WAR_test&p_p_lifecycle=0&p_p_state=normal&
p_p_mode=view&p_p_col_id=column-2 &p_p_col_pos=2 & p_p_col_count=3

Here p_p_id refers that name

(or )

Go to the Portlet table , refer portletId column.

Any thing else required?
venka reddy
RE: refresh portlet, not the page
October 25, 2013 12:03 PM
Answer

venka reddy

Rank: Regular Member

Posts: 228

Join Date: March 23, 2011

Recent Posts

May this following URL useful

http://stackoverflow.com/questions/2595005/automatic-reload-of-div-container
Christian Perez
RE: refresh portlet, not the page
October 25, 2013 12:10 PM
Answer

Christian Perez

Rank: Junior Member

Posts: 36

Join Date: June 30, 2013

Recent Posts

thanks this was really useful,
but other of my problem is when refresh the page I want to ignore the refresh page and only refresh with the specification of the script, every certain minutes
venka reddy
RE: refresh portlet, not the page
October 25, 2013 12:22 PM
Answer

venka reddy

Rank: Regular Member

Posts: 228

Join Date: March 23, 2011

Recent Posts

Just done google search found following script

<html>
<body>

<p>Click the button to wait 3 seconds, then alert "Hello".</p>
<p>After clicking away the alert box, an new alert box will appear in 3 seconds. This goes on forever...</p>
<button onclick="myFunction()">Try it</button>

<script>
function myFunction()
{
setInterval(function(){alert("Hello")},3000);
}
</script>


</body>
</html>
Christian Perez
RE: refresh portlet, not the page
October 25, 2013 12:31 PM
Answer

Christian Perez

Rank: Junior Member

Posts: 36

Join Date: June 30, 2013

Recent Posts

thanks
you really help me
venka reddy
RE: refresh portlet, not the page
October 25, 2013 12:36 PM
Answer

venka reddy

Rank: Regular Member

Posts: 228

Join Date: March 23, 2011

Recent Posts

Sounds good ... emoticon

your welcome