Login Register

url

How to feed the datastore with data and refresh it by url

Hi,

I have got a data store defined with a "data" property instead of "url" because the data is already known when the HTML page is sent by the server, and I can thus avoid an XHR request to the server afer the page is loaded.

var data = { /* Object initially populated by my PHP script */ };
var store = new dojo.data.ItemFileWriteStore({ data: data });

Defining SMD for REST with Url path params?

I've spent some time looking around the SMD Google Group, the Dojox help forum, and the Dojo book and didn't see anything related to this, but my apologies if I managed to overlook an obvious answer. I'm wondering if it's possible to define a SMD for a REST based service that takes params as URL path components instead of query-string parameters.

For example, the following are all valid urls that return the results as JSON (the server is using Apache Jersey, though that shouldn't matter).

/artists -> list of artists
/artists/radiohead -> artist info

How do I dynamically add GET parameters to the url of my dojo.data.ItemFileReadStore?

Hello,

I am new to Dojo and I am trying to create an ItemFileReadStore to feed a grid. Using the following markup, I get what I am looking for when the server reads the item parameter from the url.

<div dojoType="dojo.data.ItemFileReadStore" jsId="jsonStore" url="http://mysite.com&item=1234">
</div>

If I need to pass a different item number to the server dynamically, how would I go about doing that? I tried creating the Store programmatically like this, but the code throws an error on the last statement:

function getItem(){

dojo.io.bind and HTTP 302 in IE 7

Our web application is protected by cookie provider that will do redirect every 60 seconds to check user's credential. I am using dojo.io.bind and FloatingPane. When it hit that 60 seconds, when the browser is requesting one page from the web server, web server will redirect request to cookie provider. When I use fiddler2 to track the browser traffic. In IE 7, it will stop there with a 302 on the page requested and 200 on the cookie provider url. It didn't receive the redirected page back. In IE 6, it's working fine. The browser will get the redirected page back.

construct tree from database information dynamically

Hi master,

I have a problem to retrieve information from database to construct a tree. Below is my code which point to physical file to construct a tree and it works fine. I have construct a json format with javascirpt and it works when i pasted the information into the file that i harded.[URL parameter was hard coded to that particular json file]. How can i constructe a tree dynamically with database information.

javascript
var jsonForm = "{identifier: 'packageID',label: 'packageName',items:"+getJsonAcc1+"}";

JSP

url parameter in ItemFileReadStore

Hello,
How to change dynamically the url parameter in ItemFileReadStore for the ThumbnailPickere widget ?
This approach does not work

This <a href="javascript:onReadyState('images.json')">Thumbnail A</a>
<a href="javascript:onReadyState('francis.json')">Thumbnail B</a>.
<div id="top">       
<div id="thumbPicker2" dojoType="dojox.image.ThumbnailPicker" size="400"></div>
</div>                     
<div id="thumbPicker1Clicker"></div>

function onReadyState(url) {
var console=document.getElementById('top');

Syndicate content