23 Mar 2010 10:00 PM #1
Local data store
Local data store
I'm a little unclear on exactly what the data stores in the Designer support.
Is it possible to specify not only the definition but also the data that gets read in for data stores within the designer? Or perhaps point to a file on the local filesystem? Hitting a url is fine in many situations, but often for prototyping it seems that it would be more convenient to have a standard set of test data available locally (the services might not be written yet, server not available, etc).
24 Mar 2010 5:24 AM #2
24 Mar 2010 9:41 AM #3
I cannot get the stores to work,
I have tried:
- Add Json Store
- Entered the url (I checked via typing in Firefox and can see the data) in this case I have used a Http location
- added the root
right clicked on MyStore and Load Data:
An Error has occured on line 7 in the designer-complete.js
TypeError: Result of expression 'this.owner' [undefned] is not an object.
Is this not the correct method?
24 Mar 2010 9:55 AM #4
I had the problem this morning. The url you enter is supposed to be relative to a base url. I found this (annoying) setting in the "Edit->Edit Preferences" menu. Here lies the "URL Prefix". Set your prefix ("http://localhost" or whatever) in this field, then your data store url is just something like "/somepath/to/a/json/result".
I also noticed that the right click "Load Data" option is broken (throws an error). Select the datastore and click the "load data" button above.
I am still trying to figure out how to get the grid to display the data. I believe I have it configured correctly, but no luck.
Error messaging and reporting needs a lot of improvement. That annoying dialog that says something like "cannot load data with current configuration" is bad. A nice 404 with the darned URL it tried to hit would be nice. I would have noticed "http://localhosthttp://localhost/testdata.js" as being an issue.
24 Mar 2010 10:13 AM #5
24 Mar 2010 10:32 AM #6
Just to make sure:
Here is a quick json data example:
Save that to a file named "example.js" and make it accessible within your http server.
So, assuming you have it @ http://localhost/example.js
Make sure your base url prefix (in the edit->edit preferences) is http://localhost/
Create your datastore and set the following properties:
storeId: Example //not required for our test, but...
Then click on the load data button
Does it work? Are you sure you have the correct url? Are you missing a path component such as http://localhost/<~your home dir>/path ?
Other than that, I am not sure. I'm not having a lot of luck on this application. What OS are you using?
24 Mar 2010 11:02 AM #7
Getting it to work
Getting it to work
So far Im trying right now to replicate an already built app. At this moment everything is new and unknown ... Well ... mostly.
The designer is doing a lot of weird things while working with it ... Im still supposing that these is due to the trial version (even it says its a fully working version )
In regards to the store I have already made it to connect
my edit preferences -> base url is: http://localhost/myAppName/
In my stores im using: url: 'datastores/storename.php' where stores is the subfolder within myAppName.
It works, it loads the data (at least thats what it says) but still cant see it with the preview (binded to a GridPanel)
I will keep going with testing to see how well this new tool performs.
Best of luck to each of us!!! We'll keep posting info as it becomes available.
Ernesto Vallejo.Kind regards,
24 Mar 2010 11:21 AM #8
24 Mar 2010 3:44 PM #9
This works, but I'd still like to see more capabilities for dealing with data inside the Designer itself. Maybe a future version could come with an embedded server and give you the option of using that if you want.
24 Mar 2010 9:23 PM #10
I managed to make it work and to display the data in the grid within the designer. However this works only the 1st time, example:
I create new store and add the fields, then I click load and it shows me how many records are loaded. Then on the grid I am adding the corresponding dataIndex-es and the data appearing in the grid.
However if I close the project and then reopen it to continue working... the attempt to load the store is failing and the line 7 error is appearing.
adding new store and reconfiguring it again solve the problem but only until the next time you open the project.