Login Register Help
API Documentation
Choose a stylesheet:

Namespacedojox.data

Additional dojo.data data stores and demos

Jump to PropertiesJump to FunctionsJump to ConstructorsNamespacesBack to top

Jump to PropertiesJump to FunctionsJump to NamespacesConstructorsBack to top

Constructordojox.data.AndOrReadStore(keywordParameters: Object)
constructor
Constructordojox.data.AndOrWriteStore(keywordParameters: Object)
The APP data store.
Constructor for the AtomRead store.
This is an abstract class that data stores can extend to add updateable result set functionality as well as client side querying capabilities. This enables widgets to be aware of how active results change in response to the modifications/notifications.
Basic store to display CSS information.
Constructordojox.data.CssRuleStore(keywordParameters: Object)
Basic store to display CSS information.
Constructordojox.data.CsvStore(keywordParameters: Object)
initializer
A simple store that provides a datastore interface to a filesystem.
Initializer for the FlickrRestStore store.
Initializer for the FlickrStore store.
A data store for retrieving search results from Google. The following attributes are supported on each item: <ul> <li>title - The blog post title in HTML format.</li> <li>titleNoFormatting - The blog post title in plain text</li> <li>content - A snippet of information about the blog post</li> <li>blogUrl - The URL for the blog</li> <li>postUrl - The URL for the a single blog post</li> <li>visibleUrl - The URL with no protocol specified. <li>cacheUrl - The URL to the copy of the document cached by Google <li>author - The author of the blog post</li> <li>publishedDate - The published date, in RFC-822 format</li> </ul> The query accepts one parameter: text - The string to search for
A data store for retrieving search results from Google. The following attributes are supported on each item: <ul> <li>title - The book title in HTML format.</li> <li>titleNoFormatting - The book title in plain text</li> <li>authors - An array of authors</li> <li>url - The URL for the item</li> <li>unescapedUrl - The URL for the item, with URL escaping. This is often more readable</li> <li>bookId - An identifier for the book, usually an ISBN.</li> <li>pageCount - The number of pages in the book.</li> <li>publishedYear - The year of publication.</li> </ul> The query accepts one parameter: text - The string to search for
A data store for retrieving RSS and Atom feeds from Google. The feeds can come from any source, which is specified in the "url" parameter of the query passed to the "fetch" function. The following attributes are supported on each item: <ul> <li>title - The feed entry title.</li> <li>link - The URL for the HTML version of the feed entry.</li> <li>content - The full content of the blog post, in HTML format</li> <li>summary - A snippet of information about the feed entry, in plain text</li> <li>published - The string date on which the entry was published. You can parse the date with new Date(store.getValue(item, "published")</li> <li>categories - An array of string tags for the entry</li> </ul> The query accepts one parameter: url - The URL of the feed to retrieve
A data store for retrieving search results from Google. The following attributes are supported on each item: <ul> <li>title - The image title in HTML format.</li> <li>titleNoFormatting - The image title in plain text</li> <li>url - The URL for the image</li> <li>unescapedUrl - The URL for the image, with URL escaping. This is often more readable</li> <li>tbUrl - The URL for the image thumbnail</li> <li>visibleUrl - A shortened version of the URL associated with the result, stripped of a protocol and path</li> <li>originalContextUrl - The URL of the page containing the image.</li> <li>width - The width of the image in pixels.</li> <li>height - The height of the image in pixels.</li> <li>tbWidth - The width of the image thumbnail in pixels.</li> <li>tbHeight - The height of the image thumbnail in pixels.</li> <li>content - A snippet of information about the image, in HTML format</li> <li>contentNoFormatting - A snippet of information about the image, in plain text</li> </ul> The query accepts one parameter: text - The string to search for
A data store for retrieving search results from Google. The following attributes are supported on each item: <ul> <li>title - The blog post title in HTML format.</li> <li>titleNoFormatting - The blog post title in plain text</li> <li>content - A snippet of information about the blog post</li> <li>url - The URL for the item</li> <li>lat - The latitude.</li> <li>lng - The longtitude.</li> <li>streetAddress - The street address</li> <li>city - The city</li> <li>region - The region</li> <li>country - The country</li> <li>phoneNumbers - Phone numbers associated with this address. Can be one or more.</li> <li>ddUrl - A URL that can be used to provide driving directions from the center of the search results to this search results</li> <li>ddUrlToHere - A URL that can be used to provide driving directions from this search result to a user specified location</li> <li>staticMapUrl - The published date, in RFC-822 format</li> </ul> The query accepts one parameter: text - The string to search for
A data store for retrieving search results from Google. The following attributes are supported on each item: <ul> <li>title - The news story title in HTML format.</li> <li>titleNoFormatting - The news story title in plain text</li> <li>content - A snippet of information about the news story</li> <li>url - The URL for the item</li> <li>unescapedUrl - The URL for the item, with URL escaping. This is often more readable</li> <li>publisher - The name of the publisher</li> <li>clusterUrl - A URL pointing to a page listing related storied.</li> <li>location - The location of the news story.</li> <li>publishedDate - The date of publication, in RFC-822 format.</li> <li>relatedStories - An optional array of objects specifying related stories. Each object has the following subset of properties: "title", "titleNoFormatting", "url", "unescapedUrl", "publisher", "location", "publishedDate". </li> </ul> The query accepts one parameter: text - The string to search for
Initializer for the GoogleSearchStore store.
A data store for retrieving search results from Google. The following attributes are supported on each item: <ul> <li>title - The blog post title in HTML format.</li> <li>titleNoFormatting - The blog post title in plain text</li> <li>content - A snippet of information about the blog post</li> <li>url - The URL for the item</li> <li>published - The published date, in RFC-822 format.</li> <li>publisher - The name of the publisher.</li> <li>duration - The approximate duration, in seconds, of the video.</li> <li>tbWidth - The width in pixels of the video.</li> <li>tbHeight - The height in pixels of the video</li> <li>tbUrl - The URL to a thumbnail representation of the video.</li> <li>playUrl - If present, supplies the url of the flash version of the video that can be played inline on your page. To play this video simply create and <embed> element on your page using this value as the src attribute and using application/x-shockwave-flash as the type attribute. If you want the video to play right away, make sure to append &autoPlay=true to the url..</li> </ul> The query accepts one parameter: text - The string to search for
A data store for retrieving search results from Google. The following attributes are supported on each item: <ul> <li>title - The page title in HTML format.</li> <li>titleNoFormatting - The page title in plain text</li> <li>content - A snippet of information about the page</li> <li>url - The URL for the item</li> <li>unescapedUrl - The URL for the item, with URL escaping. This is often more readable</li> <li>visibleUrl - The URL with no protocol specified.</li> <li>cacheUrl - The URL to the copy of the document cached by Google</li> </ul> The query accepts one parameter: text - The string to search for
Initializer for the HTML table store.
jsonPathStore constructor, instantiate a new jsonPathStore Takes a single optional parameter in the form of a Javascript object containing one or more of the following properties. data: /*JSON String*/ || /* Javascript Object */, JSON String or Javascript object this store will control JSON is converted into an object, and an object passed to the store will be used directly. If no data and no url is provide, an empty object, {}, will be used as the initial store. url: /* string url */ Load data from this url in JSON format and use the Object created from the data as the data source. indexOnLoad: /* boolean */ Defaults to true, but this may change in the near future. Parse the data object and set individual objects up as appropriate. This will add meta data and assign id's to objects that dont' have them as defined by the idAttribute option. Disabling this option will keep this parsing from happening until a query is performed at which time only the top level of an item has meta info stored. This might work in some situations, but you will almost always want to indexOnLoad or use another option which will create an index. In the future we will support a generated index that maps by jsonPath allowing the server to take some of this load for larger data sets. idAttribute: /* string */ Defaults to '_id'. The name of the attribute that holds an objects id. This can be a preexisting id provided by the server. If an ID isn't already provided when an object is fetched or added to the store, the autoIdentity system will generate an id for it and add it to the index. There are utility routines for exporting data from the store that can clean any generated IDs before exporting and leave preexisting id's in tact. metaLabel: /* string */ Defaults to '_meta' overrides the attribute name that is used by the store for attaching meta information to an object while in the store's control. Defaults to '_meta'. hideMetaAttributes: /* boolean */ Defaults to False. When enabled, calls to getAttributes() will not include the meta attribute. autoIdPrefix: /*string*/ Defaults to "_auto_". This string is used as the prefix to any objects which have a generated id. A numeric index is appended to this string to complete the ID mode: dojox.data.ASYNC_MODE || dojox.data.SYNC_MODE Defaults to ASYNC_MODE. This option sets the default mode for this store. Sync calls return their data immediately from the calling function instead of calling the callback functions. Functions such as fetchItemByIdentity() and fetch() both accept a string parameter in addtion to the normal keywordArgs parameter. When passed this option, SYNC_MODE will automatically be used even when the default mode of the system is ASYNC_MODE. A normal request to fetch or fetchItemByIdentity (with kwArgs object) can also include a mode property to override this setting for that one request.
JsonRestStore is a Dojo Data store interface to JSON HTTP/REST web storage services that support read and write through GET, PUT, POST, and DELETE.
Constructordojox.data.KeyValueStore(keywordParameters: Object)
constructor
Constructordojox.data.OpmlStore(keywordParameters: Object)
constructor
Initializer for the PicasaStore store.
This class provides a store that is mainly intended to be used for loading data dynamically from the server, used i.e. for retreiving chunks of data from huge data stores on the server (by server-side filtering!). Upon calling the fetch() method of this store the data are requested from the server if they are not yet loaded for paging (or cached). For example used for a combobox which works on lots of data. It can be used to retreive the data partially upon entering the letters "ac" it returns only items like "action", "acting", etc. note: The field name "id" in a query is reserved for looking up data by id. This is necessary as before the first fetch, the store has no way of knowing which field the server will declare as identifier.
RailsStore is a data store for interacting with RESTful Rails controllers
ServiceStore constructor, instantiate a new ServiceStore A ServiceStore can be configured from a JSON Schema. Queries are just passed through to the underlying services
Initialize a SnapLogicStore object.
Initializer for the Wikipedia data store interface.
Constructordojox.data.XmlItem(element: An, store: The, query: The)
Initialize with an XML element
Constructor for the XML store.

Jump to PropertiesJump to ConstructorsJump to NamespacesFunctionsBack to top

this function can be used to receive REST notifications, from Comet or from another frame

Jump to FunctionsJump to ConstructorsJump to NamespacesPropertiesBack to top

Navigating the Dojo API Tool

There are several different methods of navigating through the object structure of the Dojo Toolkit:

  • Use the namespace list (to the left). The simplest method would be to use the list of namespaces defined by the Dojo Toolkit, on the left side of every page.
  • Drill-down from where you are. The API Tool was designed to give you as much information via drill-down as possible. Everything defined in an object can be clicked on, for more information.
  • Use the search. At the top of the namespace list to the left is a search box; type in the terms you are looking for, and you will be taken to a result page that spans the entire toolkit.
Move to different sections

In addition, objects with large numbers of contained types have a simple way of jumping to sections on a page; simply look at the right side of any heading, and you will see a set of quick navigation icons. Clicking a type icon will take you to that section; clicking the up arrow icon will return you to the top of the page.

Inherited and private members

Show or hide variable types

The Dojo API Tool will show the full ancestry of an object's members (including how that member was defined and whether or not it overrides an original). By default, all members of an object that are inherited are shown with the object's API listing, and all private members are hidden.

To toggle either inherited or private members, look just beneath the breadcrumb bar (above the name of the object you are viewing) and click the appropriate link.

Switching styles

Choose a style

The Dojo API Tool was designed with several themes in mind; we know that some people prefer light on dark, while others might prefer dark on light. With this in mind, two themes (Noir and Blanc) are currently available, with more on the way.

To switch visual styles, click on the theme you want to use, near the top right corner of the page. The API Tool will remember which style you prefer and automatically load that theme on subsequent visits.

Key/Legend

Namespace Namespaces
A namespace in Dojo parlance is an object/property bag that can contain almost anything: constructors, methods, properties, etc. Usually is expressly defined to serve a particular purpose; for example, dojo.date.locale is a namespace defined to deal with locale-specific date handling.
Constructor Constructors
A constructor is a function designed to create instances of objects. With the Dojo Toolkit, there are two ways of creating constructors: the "old school" way (i.e. defining a function with the this keyword in the body) or using dojo.declare.
Singleton Singletons
A singleton is a constructor that is defined and then immediately executed so that only one instance may ever exist during an application's lifetime. Usually this is done to capture some information in the environment, or to ensure a set of private variables that cannot be accessed from outside of the declaration. Examples include dojox.encoding.crypto.Blowfish.

Data Types

Array Array
Arrays are ordered lists, native to Javascript.
Boolean Boolean
Native data type representing a simple "true/false" value.
Date Date
Native Javascript data type to handle common date and time representations.
DOMNode Node
An object that represents any kind of element being referenced/used by Javascript code. Note that the type of element is not dictated by this data type; only that it is a node of some sort.
Error Error
A special, native Javascript object used to indicate an error in code. Can be subclassed and used in conjunction with the throw statement, i.e. throw new MySubError(...);
Function Function
Functions/methods are pieces of invocable code; in JavaScript, they are also considered data and can be passed around like any other object.
Number Number
A Number object is used to represent any kind of numeric value; note that Javascript does not guarentee the actual underlying datatype (though the most common is a 64-bit float).
Object Object
Objects are the base data type of Javascript. With the Dojo API Tool, a type that cannot be determined is usually marked with this icon, in addition to straight objects.
Regular Expression RegExp (Regular Expression)
A regular expression is an object used for fast string search and parsing.
String String
A string is any sequence of characters.

Input formats

  • Filtered HTML:
    • Web page addresses and e-mail addresses turn into links automatically.
    • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

      This site allows HTML content. While learning all of HTML may feel intimidating, learning how to use a very small number of the most basic HTML "tags" is very easy.

      For more information see W3C's HTML Specifications or use your favorite search engine to find other sites that explain HTML.

      Most unusual characters can be directly entered without any problems.

      If you do encounter problems, try using HTML character entities. A common example looks like &amp; for an ampersand & character. For a full list of entities see HTML's entities page.

    • Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.
  • PHP code:
    • Using custom PHP code

      If you know how to script in PHP, Drupal gives you the power to embed any script you like. It will be executed when the page is viewed and dynamically embedded into the page. This gives you amazing flexibility and power, but of course with that comes danger and insecurity if you do not write good code. If you are not familiar with PHP, SQL or with the site engine, avoid experimenting with PHP because you can corrupt your database or render your site insecure or even unusable! If you do not plan to do fancy stuff with your content then you are probably better off with straight HTML.

      Remember that the code within each PHP item must be valid PHP code - including things like correctly terminating statements with a semicolon. It is highly recommended that you develop your code separately using a simple test script on top of a test database before migrating to your production environment.

      Notes:

      • You can use global variables, such as configuration parameters, within the scope of your PHP code but remember that global variables which have been given values in your code will retain these values in the engine afterwards.
      • register_globals is now set to off by default. If you need form information you need to get it from the "superglobals" $_POST, $_GET, etc.
      • You can either use the print or return statement to output the actual content for your item.

      A basic example:

      You want to have a box with the title "Welcome" that you use to greet your visitors. The content for this box could be created by going:

      print t("Welcome visitor, ... welcome message goes here ...");
      								

      If we are however dealing with a registered user, we can customize the message by using:

      global $user;
      if ($user->uid) {
      	print t("Welcome $user->name, ... welcome message goes here ...");
      }
      else {
      	print t("Welcome visitor, ... welcome message goes here ...");
      }
      								

      For more in-depth examples, we recommend that you check the existing Drupal code and use it as a starting point, especially for sidebar boxes.

  • Full HTML:
    • Web page addresses and e-mail addresses turn into links automatically.
    • Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.
  • Markdown:
    • Quick Tips:
      • Two or more spaces at a line's end = Line break
      • Double returns = Paragraph
      • *Single asterisks* or _single underscores_ = Emphasis
      • **Double** or __double__ = Strong
      • This is [a link](http://the.link.com "The optional title text")
      For complete details on the Markdown syntax, see the Markdown documentation.