Need help in customizing widget

33 views
Skip to first unread message

Shreelakshmi G.M

unread,
May 20, 2015, 2:25:36 AM5/20/15
to topbrai...@googlegroups.com
I need help in building the browser like interface for the ontology.

I started with the default SWP application based on template.
Instead of single tree as in the template, I need multiple trees on top level, so I am using swa:Tree tag for each tree.

<swa:Tree arg:dataProvider="swa:ClassTreeDataProvider" arg:id="classTree1" arg:onSelect="swa.loadWithResource('formWindow', 'resource', resource)" arg:root="itterms:Generalandreference"/>

ViewFormGadget is working fine with this, but InstancesGridGadget, FormSearchGadget, GridSearchResultsGadget are not working.

this is what I am using and for instances grid,

 <swa:Window arg:id="formW" arg:layoutPanel="south" arg:title="Instances">
                <swa:InstancesGridGadget arg:resourceSelectedEvent="{= ?instanceSelectedEvent }" ui:args="*"/>
            </swa:Window>

Is there any example available for this should I use swa:Objects tag, if so can I get an example for this.

Thanks,
Shreelakshmi

Holger Knublauch

unread,
May 20, 2015, 2:38:36 AM5/20/15
to topbrai...@googlegroups.com


On 5/20/15 4:25 PM, Shreelakshmi G.M wrote:
I need help in building the browser like interface for the ontology.

I started with the default SWP application based on template.
Instead of single tree as in the template, I need multiple trees on top level, so I am using swa:Tree tag for each tree.

<swa:Tree arg:dataProvider="swa:ClassTreeDataProvider" arg:id="classTree1" arg:onSelect="swa.loadWithResource('formWindow', 'resource', resource)" arg:root="itterms:Generalandreference"/>

Above you are just refreshing one window (formWindow) when selection changes. I believe what you'd rather want is to publish a resource selection event to the event hub, so that all windows that are subscribed to that event can refresh themselves. In the SWA default app this is done with a TreeGadget (instead of using a pure Tree):

<swa:Window arg:layoutPanel=\"center\" arg:title=\"Class Hierarchy\">
    <swa:ClassTreeGadget arg:resourceSelectedEvent=\"{= ?instanceSelectedEvent }\" ui:args=\"*\"/>
</swa:Window>

Have you tried that pattern?

Thanks
Holger



ViewFormGadget is working fine with this, but InstancesGridGadget, FormSearchGadget, GridSearchResultsGadget are not working.

this is what I am using and for instances grid,

 <swa:Window arg:id="formW" arg:layoutPanel="south" arg:title="Instances">
                <swa:InstancesGridGadget arg:resourceSelectedEvent="{= ?instanceSelectedEvent }" ui:args="*"/>
            </swa:Window>

Is there any example available for this should I use swa:Objects tag, if so can I get an example for this.

Thanks,
Shreelakshmi
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
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.
For more options, visit https://groups.google.com/d/optout.

Shreelakshmi G.M

unread,
May 21, 2015, 1:33:30 AM5/21/15
to topbrai...@googlegroups.com
Thanks Holger for immediate reply, I am using pure tree because I need all top classes of ontology as separate trees.
If I use TreeGadget, single tree will be constructed with owl:Thing as the parent class, which I don't need.
What I need is, if A, B, C are the subclasses of Thing, I want to display A, B, C as adjacent trees and Thing should not be displayed.
For the above purpose, I used swa:Tree for each class separately. How to go about this for InstancesGridGadet and other gadgets.

Holger Knublauch

unread,
May 21, 2015, 2:44:52 AM5/21/15
to topbrai...@googlegroups.com
At least in my version, swa:ClassTreeGadget takes an optional argument arg:rootClass, which you could use to set the root.

HTH
Holger
--

Shreelakshmi G.M

unread,
May 21, 2015, 3:07:49 AM5/21/15
to topbrai...@googlegroups.com
Thanks a lot Holger, it worked with arg:rootClass, but now I have a new problem, is it possible to remove the autocomplete textbox which appears by default below the tree when I use swa:ClassTreeGadget. Because , for each ClassTreeGadget, there will one textbox below which looks odd in my case.

One more request is, is there any detailed library explaination for SWA? If so let me know. Since, I was not knowing arg:rootClass needs to be used for swa:ClassTreeGadget,
I wasted lot of time figuring it out. I kept on trying with arg:root instead of arg:rootClass.

Holger Knublauch

unread,
May 21, 2015, 3:15:02 AM5/21/15
to topbrai...@googlegroups.com


On 5/21/15 5:07 PM, Shreelakshmi G.M wrote:
Thanks a lot Holger, it worked with arg:rootClass, but now I have a new problem, is it possible to remove the autocomplete textbox which appears by default below the tree when I use swa:ClassTreeGadget. Because , for each ClassTreeGadget, there will one textbox below which looks odd in my case.

In this case I would just clone the gadget class and remove the input field in my own copy. Cloning can easily be done in TBC with right-click on the class.



One more request is, is there any detailed library explaination for SWA? If so let me know. Since, I was not knowing arg:rootClass needs to be used for swa:ClassTreeGadget,
I wasted lot of time figuring it out. I kept on trying with arg:root instead of arg:rootClass.

The SWA help page accessible from the TBC Help menu has a link to a gadgets overview page. However, I find it usually most reliable to navigate into the definition of the gadget myself. Within TBC, hold the Ctrl key down while moving over the element name (e.g. swa:ClassTreeGadget), then click. There you can see the list of supported arguments.

Holger

Shreelakshmi G.M

unread,
May 21, 2015, 3:56:56 AM5/21/15
to topbrai...@googlegroups.com
Thanks for all the replies, everything is working fine now. I could remove the autocomplete text box.
Reply all
Reply to author
Forward
0 new messages