« Return to Thread: data store

Re: data store

by Vance Dubberly :: Rate this Message:

Reply to Author | View in Thread

Jared,
  Thanks for the response.  What I want to to populate a
dijit.form.FilteringSelect with an object of the form

pageJSON = {
   identifier : 'id',
   items : [
     { id : 'a', label: "Letter A" },
     { id : 'b', label: "Letter B" },
     { id : 'c', label: "Letter C" },
     { id : 'd', label: "Letter D" }
   ]
 }

Honestly I don't want to use a datastore to do it.  Seems like a
complete waste of memory and CPU. However not using a datastore  does
not appear to be an option. So baring that, I want to populate a
datastore with the above object without having to read it from the
server.  I already have the data it was pulled from the server in a
much more complex format and is being used for may things. the above
sample is a derived subset of that data.

what I'd love to do is this:

dijit.form.FiteringSelect.store = pageJSON;

baring that I'd like to do this:

store = new dojo.data.SomeKindOfStore( pageJSON )
dijit.form.FilteringSelect.store = store;

What I don't want to do is go to the server for data I already have.

Any advice or direction ( god knows i'm completely spun around at this
point ) would be greatly appreciated.

Vance



On Dec 11, 2007 9:04 AM, Jared Jurkiewicz <jared.jurkiewicz@...> wrote:

>    I'm not following on what you are trying to do here.  Can you be a
> little more descriptive on your problem, other than not wanting to
> write your own datastore?   How are you wanting to get the data?
> ItemFile*Store doesn't require the end point be an actual file, it
> could just as readily be a service, such as a PHP script or a servlet.
>   The only thing ItemFile*Store requires is the format of the returned
> data match its expectations.  There are many other datastores
> available in dojox as well, such as QueryReadStore, which expects to
> talk to a back end service (which is mimic'ed in a simple php file for
> testing purposes).  So, what exactly are you trying to do and what do
> you want your data source to be?
>
> Sincerely,
> -- Jared Jurkiewicz
>
>
> On Dec 10, 2007 1:43 AM, Vance Dubberly <altjeringa@...> wrote:
> > It would seem like a really simple thing.  Use a filtering select
> > list.  Or any select type with an object of the form
> >
> >   pageJSON = {
> >     identifier : 'id',
> >     items : [
> >       { id : 'a', label: "Letter A" },
> >       { id : 'b', label: "Letter B" },
> >       { id : 'c', label: "Letter C" },
> >       { id : 'd', label: "Letter D" }
> >     ]
> >   }
> >
> > and it is if I have that object serialized on a server as a text
> > file... but for the life of me I can not  figure out how to do this
> > really simple thing without going through the process of writing my
> > own data store, which appears to be an long process for which I simply
> > do not have time at this juncture.
> >
> > I've got to be missing something amazingly obvious.  Please help.
> > Pretty please. ;)
> >
> > Vance
> >
> >
> >
> > --
> > To pretend, I actually do the thing: I have therefore only pretended to pretend.
> >   - Jacques Derrida
> > _______________________________________________
> > FAQ: http://dojotoolkit.org/support/faq
> > Book: http://dojotoolkit.org/docs/book
> > Forums: http://dojotoolkit.org/forum
> > Dojo-interest@...
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest@...
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>



--
To pretend, I actually do the thing: I have therefore only pretended to pretend.
  - Jacques Derrida
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest@...
http://dojotoolkit.org/mailman/listinfo/dojo-interest

 « Return to Thread: data store