Thanks Holger 

very helpful...



> On 11/07/2018 22:56, rob.at...@surroundaustralia.com <javascript:> wrote:
>
> I want to set up some common metadata that a suite of services implemented 
> in SWP can access. 
>
> I have a superclass of services, and in the header I can use a named graph 
> to persist information - because AFAICT it appears that named graphs are 
> the only mechanism for sharing context outside nested elements? 
>
> Is there another way - perhaps to tap into what is obviously available for 
> parameters passed to the SWP which are available anywhere ?
>
>
> Maybe http://uispin.org/ui.html#setContext or 
> http://uispin.org/ui.html#param
>
> AFAICT setContext is scoped to nested elements, so wont be available to 
the code in ui:prototypes of subclasses?   ui:param is useful - it is 
possible to programmatically inject values into this within an SWP to carry 
context? 

>
> Secondly - is there any way to access metadata that identifies the SWP 
> service being called? I need to do this in a header, or some other way to 
> have the superclass access this information and pass it in a standard way 
> to activity loggers in each specialised service, 
>  ?thisNode and ?thisParent dont seem to work.
>
>
> ui:param("_viewClass") should give you the physical starting point 
> assuming the service is called using _viewClass=...
>

thats great - NB this isnt mentioned in the "get metadata" part :-(

BTW - still trying to get my head around why sometimes a viewClass is used 
and sometimes an instance of such a class - both seem to co-exist in EDG - 
but whats the reason for using instances - and do they just behave like 
their parent classes? and what if there are multiple? 

the properties of an instance do not shed much light on why they exist.  
You previously pointed to classView as a way to invoke a service. the docs 
leave me no wiser:

"
_view The URI of a specific view to display (instance of ui:Element).
_viewClass The URI or qname of a user-defined view class (subclass of 
ui:Elements) to display. All other arguments that match the declared 
arguments of the view class will be passed into the view, e.g. 
uispin?_viewClass=ex:MyView&name=Test will be comparable to <ex:MyView 
arg:name="Test" />."

is this explained in more detail elsewhere?


> I don't see any other standard way of finding the root entry point. You 
> could modify you root services so that they set some context variable using 
> ui:setContext, and the elements downstream can query that value using 
> ui:contextValue().
>
> is there some implicit nesting  going on that would make a setContext 
visible to subclasses?

>
> Finally - it seems if i subclass a service then the headerIncludes from 
> the parent is still run - which is what I want - but is there any guarantee 
> or way to force it to be included first?
>
>
> Yes, inherited headIncludes will be executed first.
>
 
cool. 

>
> Holger
>
>
> -- 
> 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 topbraid-user...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to