On Tue, Feb 10, 2015 at 10:53 AM, Dan Haywood <[email protected]>
wrote:
> Now documented at [1]
>
James, did you try my suggestion ?
I don't see a reason why it won't work but I haven't tried it myself so it
is possible that the documentation misses some detail.
>
>
> ~~~
> 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 <[email protected]>
> wrote:
>
> > I'll document this quick-n-dirty solution on the Isis website.
> >
> > Thx
> > Dan
> >
> > On 9 February 2015 at 08:07, Martin Grigorov <[email protected]>
> wrote:
> >
> >> On Mon, Feb 9, 2015 at 9:55 AM, Martin Grigorov <[email protected]>
> >> 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 <[email protected]>
> >> > 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.
> >> >>
> >> >
> >> >
> >>
> >
> >
>