Hi Sjoerd,
the currently active query graph in SWP can be queried using the SPARQL
function ui:currentQueryGraph().
In your example, shouldn't the Tab be a subclass of teamwork:ProjectTabs
instead? In that case, you can access the current project graph using
the variable ?projectGraph (like urn:x-evn-master:XY) in the ui:prototype.
Holger
On 10/16/2020 10:51 PM, [email protected] wrote:
Hi all,
I've build a small SWP page which shows in EDG as an additional tab of
asset collections (a subclass of teamwork:Tabs containing a ui:prototype).
From this page I'm able to call different Sparql Motion scripts which
manipulate the asset I have open at that moment. However, I'd prefer
not to hardcode in my SWP or in my Sparql motion the graph to update.
Ideally I'd like the SWP to 'know' which graph I on at that moment and
parse this to the Sparql motion script. This would allow me to reuse a
script for different datagraphs and use the current graph as a
variable in SPARQL statements.
I thought I could grab the projectGraph attribute from the URL in EDG
which has the current datagraph as its value. This works using
JavaScript, but I can't figure it out using SWP, nor can I parse my JS
variable into my SWP.
Is there a way to either use a JS function in my SWP prototype, or is
there a SWP function which allows me to get the currently open graph?
Regards,
Sjoerd
--
You received this message because you are subscribed to the Google
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/217f25d1-0b84-4903-b292-9560d470c984n%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/217f25d1-0b84-4903-b292-9560d470c984n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "TopBraid
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/b3719132-82e0-44ce-83ae-1dde11012923%40topquadrant.com.