Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:29:54+00:00 2026-05-28T15:29:54+00:00

I am working on an old code base which uses dojo datagrid and JsonRestStore,

  • 0

I am working on an old code base which uses dojo datagrid and JsonRestStore, using declarative approach(in HTML). I am now trying to adapt this to use the newer dojo.store.JsonRest .

When I declare the JsonRest and ObjectStore in HTML, it works.

I want to use json.store.Cache as my store, with dojo.store.JsonRest and dojo.store.Memory backing it.
The constructor for json.store.Cache takes two arguments.

a) Is there a possibility to define constructor arguments in HTML declarative style?

I didn’t want to touch the (declarative) code of the Datagrid so I tried setting the store of the Grid in dojo.addOnLoad . I get a weird error in Firebug for dojo.js line 402 which is actually a comment:

// 5. Evaluated: the module was defined via define and the loader has evaluated the factory and computed a result.

My guess is that the error has nothing to do with dojo.js at all and the exception actually occurred in a closure somewhere(I think I’ve seen this before).

b) Is it possible to mix and match Declarative and Programmatic style in this way? And if yes, what event should I be setting the grid’s store on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:29:55+00:00Added an answer on May 28, 2026 at 3:29 pm

    I’m answering this myself as I figured it out later. There seems to be no problem in mixing and matching the declarative and programmatic style.

    I changed from using dojo.addOnLoad to dojo.ready , but I don’t think that was the problem anyway.

    I was trying to set the datagrid’s query in a call to datagrid.setQuery and then setting the store with datagrid.setStore. It didn’t work no matter which order I tried in(query first or store first).
    Turns out both have to be set together in the call to setStore. The method accepts the query as its second parameter.
    This solved my problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just been re-working an old bit of compiler-like code written using bison.
I am working on a old code base, where programmers assumed that register_globals will
I'm currently working on a quite big (and old, sigh) code base, recently upgraded
all. I'm currently working with an old established code base for a new project
I'm working on a WPF system which hooks onto an old legacy database using
New to php .I'm working on an old code in which I have to
I recently came upon some old code which I didn't write. It uses WWW::Facebook::API
I'm working on old code that relies heavily on the exception specifications behavior described
I am working with old ASP code and I am not sure about semantics
I'm working with some old PHP code that has a lot of the following:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.