문제

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?

도움이 되었습니까?

해결책 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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top