Pregunta

How to auto refresh the share site? Now when someone post an answer in share discussion the user has to refresh the page in order to view the answer. How to auto refresh the page?

¿Fue útil?

Solución 2

I edited toolbar.get.html in tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\discussions. I added the following meta tag

<meta http-equiv="Refresh" content="100">. This is working.

Otros consejos

There is no pre-defined auto-refresh component in Share. You'll have to code it yourself.

  1. Option 1: Auto-Poll the server every x seconds via JavaScript, e.g. use YAHOO.lang.later(...)

  2. Option 2: Write your own Alfresco Policy to trigger a Server-Sent Events + consume such event in Share

  3. Option 3: Introduce WebSockets

All Options will require deep knowledge of JavaScript in the Browser, especially YUI & Alfresco's custom Share components & utils. Option 2 & 3 will additionally require deep knowledge of Java & Alfresco's Java Foundation API.

I made a polling timer to update specific data instead of reloading the whole page

http://code.google.com/p/alfresco-presence/source/browse/share/source/web/presence/components/head/polling-timer.js

However this is more work.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top