isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: Auto refreshing Isis page
Date Mon, 09 Feb 2015 07:55:37 GMT
Hi,

Here is a quick and dirty solution:

- in YourDomainObject add impl of #cssClass() {return
"my-special-auto-updating-entity"}
- in webapp/src/main/webapp/scripts/application.js add:
$(function() {
  if ($(".my-special-auto-updating-entity").length) {
    setInterval(function() {document.location.reload();}, 1000); // 1000 is
1 sec
  }
});

A proper Isis solution solution would be to add a facet (annotation,
special method, etc.) to YourEntity and Isis do this for you. But I'm not
sure how generic this solution is.


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Feb 9, 2015 at 9:47 AM, James Agada <James.agada@cwg-plc.com> wrote:

> I am building a monitoring application for electric grid. I have a few
> requirements that I can't think of how to implement.
> 1. Some pages will need to refresh automatically at intervals. These
> include my map of the network rendered using the gmap add-on and also some
> entity and view models. How can I achieve the auto refresh. The objective
> is to include in the display new records coming in via the RO interface.
> 2. I will like to add lines on the map displayed by gmap to show the
> linkage or the network. Beyond putting pins on the map how can I achieve
> this.
> Regards
> James Agada
>
> Sent from my iPhone
> This email and any attachment thereto are confidential and priviledged. if
> you have received it in error, please delete immediately and notify the
> sender. Do not disclose, copy, circulate or in any way use it. The
> information contained therein is for the address only, if you reply on it,
> its at your own risk. Emails are not guaranteed to be secure or error free,
> the message and any attachment could be intercepted, corrupted, lost,
> delayed, incomplete or ammended. Computer warehouse group and its divisions
> do not accept liability for damage caused by this email or any attachment.
> The message you tried to print is protected with Information Rights
> Management. You don't have the necessary user rights to print the message.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message