Skip to main content

Jmaki loadable resources

1 reply [Last post]
bakarirum
Offline
Joined: 2005-07-07
Points: 0

I was searching through archives to try to find out to choose the default yahoo.datatable column to be sorted and also choose the direction (I have not found this yet).

Anyway, I stumbled upon the example pointed out by Greg at
http://jmaki.com/jmaki-loadtable/

I viewed the source and voila! I saw something interesting.

Am I correct in interpreting this correctly in that if I use the following syntax I can use "remote" resources to load widgets and I no longer have to include the resources in each individual project?

</p>
<p>    jmaki.addWidget(<br />
        {<br />
            uuid:"yahoo_dataTable_3",<br />
            name:"yahoo.dataTable",<br />
            widgetDir:"http://jmaki.com/jmaki-loadtable/resources/yahoo/dataTable",<br />
            service: 'http://jmaki.com/jmaki-loadtable//tabledata.json',<br />
            subscribe: "/jmaki/table",<br />
            script:"http://jmaki.com/jmaki-loadtable/resources/yahoo/dataTable/component.js"<br />
        }<br />
    );</p>
<p>

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Bakarirum,

We don't publicize this but it should be possible. If the service is uses Ajax (XmlHttpReuqest interactions) the service will need to be hosted from the same domain from which the page is loaded otherwise you will get domain of origin issues.

You could use JSONP style services which would really depend on how you write your widgets. Widgets individually decide what to do with the service attribute and generally they use XmlHttpRequests to fetch data.

What kind of widgets are you interested in remotely hosting?

-Greg