Barb,

here is an example of using SPARQLMotion and SPIN to define new services:

http://www.topquadrant.com/products/SPARQLMotion_docs/SPARQLMotion_ex_dbpedia.html

This does not cover the particular UI modules, but you will find them in 
the standard SM module library (sparqlmotionlib.owl) under 
sml:ImportFromVariousModules.  This includes

- sml:EnterLiteral
- sml:SelectInstance
- sml:SelectResource

and (under RDFProcessing)

- sml:DisplayEditForm

Note: these are not yet supported in conjunction with TBE applications, 
but we are working on a closer integration to implement interactive 
scripts and wizards in the next few weeks.

Holger


Barb wrote:
> What would I need to import to have sml:SelectInstance or
> sml:DisplayEditForm available to me?
> Would you have an example?
> 
> Barb
> 
> On Jul 31, 4:32 pm, Holger Knublauch <[email protected]> wrote:
>> TopBraid comes with the Rhino ECMAScript engine, but this is different
>> from full JavaScript, as it does not live inside of a web browser.  As a
>> result, JavaScript-specific UI feature such as prompts are not supported.
>>
>> In order to collect user input, you need to use SPARQLMotion-based SPIN
>> functions with modules such as sml:SelectInstance or sml:DisplayEditForm.
>>
>> Holger
>>
>>
>>
>> Barb wrote:
>>> I'm using JavaScript to define a SPIN function.
>>> I've created a javascript file that simply returns a string.
>>> I followed all the steps outlined in the "Using JavaScript to define
>>> SPIN/SPARQL Functions" under Help and everything worked fine.
>>> Next I wanted to try a SPIN function that displayed a dialog box.
>>> I tried this with my javascript and it didn't work.
>>> I received the following message ....
>>> Failed to retrieve all query results
>>> Error in JavaScript call: org.mozilla.javascript.EcmaError:
>>> ReferenceError: "prompt" is not defined. (myPrompt.js#1)
>>> This is my function ...
>>> function myPromptTest() {
>>>  var a = prompt("What is your name", "Type your name here");
>>>  return a ;
>>> }
>>> I'm guessing "prompt" is something not defined/allowed within
>>> Composer.
>>> Is there another way to have a SPIN function launch a dialog?
>>> Barb- Hide quoted text -
>> - Show quoted text -
> > 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to