isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Agada <James.ag...@CWG-PLC.COM>
Subject Re: Auto refreshing Isis page
Date Tue, 10 Feb 2015 11:36:26 GMT
I will try this out. Thanks.

Sent from my iPhone

> On Feb 10, 2015, at 9:57 AM, Dan Haywood <dan@haywood-associates.co.uk> wrote:
>
> Now documented at [1]
>
>
> ~~~
> We didn't answer part (2) of your question... how to add lines between the
> nodes.
>
> For that, you are going to need to extend gmap3.   I would:
>
> - define an Edge interface representing the two Locatable's to be joined
> together:
>
> public interface Edge {
>    public Locatable getFrom();
>    public Locatable getTo();
> }
>
>
> - define a HasEdges interface representing a collection:
>
> public interface HasEdges {
>    public List<Edge> getEdges();
> }
>
> make your entities implement HasEdges.
>
> Then, extend the Gmap3 component factory [2] to also check whether the
> entities implement HasEdges.  If they do, then in the component [3] it can
> render this info as lines; I am sure the gmap3 API will make this easy to
> do.
>
> HTH
> Dan
>
>
> [1]
> http://isis.apache.org/components/viewers/wicket/how-to-auto-refresh-page.html
> [2]
> https://github.com/isisaddons/isis-wicket-gmap3/blob/091d5123cd5fe5fb01031d5dcb0e5d7baafa7840/cpt/src/main/java/org/isisaddons/wicket/gmap3/cpt/ui/CollectionOfEntitiesAsLocatablesFactory.java
> [3]
> https://github.com/isisaddons/isis-wicket-gmap3/blob/091d5123cd5fe5fb01031d5dcb0e5d7baafa7840/cpt/src/main/java/org/isisaddons/wicket/gmap3/cpt/ui/CollectionOfEntitiesAsLocatables.java
>
>
>
>
> On 9 February 2015 at 14:21, Dan Haywood <dan@haywood-associates.co.uk>
> wrote:
>
>> I'll document this quick-n-dirty solution on the Isis website.
>>
>> Thx
>> Dan
>>
>>> On 9 February 2015 at 08:07, Martin Grigorov <mgrigorov@apache.org> wrote:
>>>
>>> On Mon, Feb 9, 2015 at 9:55 AM, Martin Grigorov <mgrigorov@apache.org>
>>> wrote:
>>>
>>>> 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
>>>
>>> I meant setTimeout() instead of setInterval()
>>>
>>>
>>>>  }
>>>> });
>>>>
>>>> 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.
> 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.
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
View raw message