Ruby :: Storing A Filesystem Tree In Mongodb And Serve As Json To A Flex Application
Apr 17, 2011
I want to store a filesystem tree into MongoDB within a Ruby application, so we are talking about json/bson representation of something like:
/
/foo
/foo/one
/foo/bar/two
/foo/bar/three
/four
my aim is to store it efficiently and to serve it via json to an Adobe Flex application which will display it in a Tree component. which is the best solution in your opinion? this document suggests some options. i'd like to go for something like the first pattern (keeping in mind the limit of 16Mb document size) with this format:
[Code]....
View 2 Replies
Similar Posts:
Dec 27, 2010
hi i have to create Hierarchical tree in flex through json. Please let me know if there is any type of help
View 1 Replies
May 13, 2011
Is there anything preventing a Flash website from storing several gigs of data using its filesystem / cache?What are the limitations?
View 1 Replies
Apr 10, 2012
I am building a Rails app that would nicely communicate with Flex via sockets. Currently I found only two ways of communication: Simple HttpRequest, RemoteObject. But I need something "multiplayer" style. I need Flex to talk to sockets and Rails app to grab data from those sockets do some job and push something back to a socket so Flex could read it "on the fly".
View 1 Replies
Nov 22, 2011
i am creating an object like this:
var myObj:Object = new Object();
myObj["someProperty"] = {
anotherProperty: "someValue",
whateverProperty: "anotherValue"
}
now i want to send it to a web server (rails):
var service:HTTPService = new HTTPService();
service.url = "http://server.com/some/path/entry.json";
service.method = URLRequestMethod.POST;
service.send( myObj );
the problem is that the server receives the json like this:
{"someProperty"=>"[object Object]"}
is this a problem with HTTPService? should i use the good old loader/urlrequest and serialize myself? by the way, serializing and then passing the string doesn't work, webserver receives empty request as GET.but i kinda want to use the httpservice class though...
View 2 Replies
Aug 4, 2006
I've got a tree component on the stage that the user can add folders and questions to. I need to write the data from the tree into a database as the user adds items and then re-build the tree from the database when the user re-opens the program. This works fine except the client wants the user to be able to delete and move items within the tree.
I'm not sure how I can track the position of items within the tree so that it re-builds the tree (from the database values) in the same order as it was when the user closed the program?
At first, I thought I would just add the getDisplayIndex of the selectedNode, but that changes when you expand or collapse a folder, and it would also mean that I would have to update a number in each database entry any time the user moves a folder or item...
I'm thinking the only way I can get around this and ensure the db tracks the latest treeview is to provide a "Save" button and make the user hit that (instead of hitting the "Accept Changes" button which currently exists for each item & folder and just updates the database on each new entry). With the "Save" button, I could just copy a new database on top of the old one (removing all the unique id indexes) and then write to the new db. Not the end of the world, but it seems more ponderous and less intuitive. Plus, if the user enters hundreds of items, it could take time to write the entire db each time...
View 1 Replies
Feb 2, 2010
I have a XML-file, which I want to send to a rails server. To do so I use the following code:
<mx:HTTPService id="dataService"
result="resultHandler(event)"
resultFormat="e4x"/>
[code].....
View 1 Replies
Oct 13, 2010
I would like to know if it is possible to connect MongoDB with Flash/Flex?
View 4 Replies
Feb 1, 2010
I have a webpage based on ruby on rails. For one task I need some more complex user interface which I plan to do with a flex programm. The question is, how I can start the a new window with my flex programm and hand over the right url where the flex app can load its data in XML format...
View 1 Replies
Nov 28, 2011
Created an editable flex grid which exposes a method called getGridData() to javascript. I am using the JSON.encode() method of the [url]....library to convert the grid object's dataProvider into JSON before returning it.
ExternalInterface.addCallback("getGridData", getGridData);
public function getGridData():String
{[code].....
However, when I sort a column in the user interface, the encode method is failing throwing the following error
Property usingCustomCompareFunction not found on mx.collections.SortField and there is no default value.
View 1 Replies
Jan 17, 2010
I have a Tree Control inside my Flex Application which I want to edit on a doubleclick on a tree item. I found the properties doubleClickEnabled= "true", doubleClick="startEditMode()", and editable="true". With these functions I can detect a double click and I can change the editable property to true based on a double click. The problem is that after I double clicked on a Item i have to click once more to really enter the edit mode. That doesn't seem to be intuitive at all..
View 3 Replies
Aug 28, 2011
I am about to develop my masters project using Flex as front end, BlazeDs, Java Web Services and MongoDB in the backend. I am looking to deploy and manage it on a cloud. (The application analyzes financial data from various sources, I will need to query multiple endpoints for news articles and DB for processing)
It is my experiment to usage of cloud rather than deploying on my local for demo and presentation purposes.
I saw heroku (http://www.heroku.com/), but I am not sure if it allows flash.
Please suggest a cloud application platform which allows Flex, BlazeDs, Java Web Services and MongoDB?
View 1 Replies
May 25, 2011
Is there a way to directly communicate with a mongodb server from a flash builder 4 AIR / actionscript (cli?) application?
I know it is possible to use AMF - for example through Zend AMF (PHP), but I was hoping for this particular application to eliminate that hop or overhead and communicate directly with the database.
View 3 Replies
Nov 19, 2011
I'm trying to make a Flex Tree Component display the children of a sprite in a hierarchical way. Moreover, dragging the items on the FlexTree would resort and reparent the items. I have special Elements set as Folders. This would allow other elements to be added there as a children by dragging an element on the tree and dropping it there. I have a failed attempt which works, but breaks when I try to add folders. Basically, it fails at reparenting the items by dragging and resorting folders and that Does anyone know of a component or something which can do this, has anyone have created any of this or could anyone give me a clue?
View 1 Replies
Jul 26, 2011
In flex (flash builder 4) I have a Date() property that I am passing to Zend AMF (php) and I want to store that (as well as other data) in mongoDB. Mongodb is complaining about the date because it comes across as a Zend_Date object, which appears to be an object containing several properties and Mongodb is saying that it can not accept blank properties. So, I take that to mean it needs to be converted to something else before I can store it? If so, how do I do that?
At the moment I have taken the approach of converting the Zend_Date object in to a date string to store it (in php):
$object->readyDT=date("m/d/Y H:i", strtotime($object->readyDT)); //convert to string
That works fine, and I have a string in mongodb of that date. Now, when I load the date from MongoDB, I need to convert it back to a Zend_Date so it properly converts back in to a Date() object in flex (I have to check that it's not blank or it throws errors in php):
if (isset($object->readyDT) && $object->readyDT!=="") $object->readyDT = new Zend_Date($object->readyDT, 'MM/dd/yyyy hh:mm');
This all works, but it seems like there should be a much easier way to take a Date() from flex and get it stored in MongoDB via Zend AMF/PHP. ?
View 1 Replies
Feb 11, 2010
I was developing the Application in Flex and ruby on rails.
It is working fine some times. but some times i am getting routing error.
Error: "No route matches "/index.html" with {:method=>:get}"
Here index.html is my login page
View 1 Replies
Oct 17, 2011
In my rails controller, I have a show and save action. The show is for showing the flash application. The save is for saving the flash application. When the flash application calls the rails save action I would like it to redirect to a new view in the rails app and no longer be inside the flash application.I have a redirect_to some_path in the save action. The server log shows a successful redirect to some_path, however, for the user there is no redirect and they are still stuck inside the flash application.
View 1 Replies
Oct 30, 2009
I am working on Air application,i had a problem on Tree control.Iam adding nodes for the tree dynamically, while adding nodes to the tree i am setting Tree.selectedItem as present added node. after that i need to fire Tree.itemClick event handler method also.how can i call event handler method as a common method. in Flex3
View 1 Replies
Apr 22, 2011
I am creating a flex collection in which as model I have an array collection of slides.Each of the slide has a set of objects like array of images , array of captions etc . I want to pass these slides to the web service coded using asp.net and C# , from where it will be saved to a sql server db. Is there a way to send the image Array directly to the web service or I have to send each of the image separately by making as many calls to the web service as the number of images in the array .
In general what would be the most efficient way to send these array of slides and the associated objects to the web service so that they could be stored in the database ?
View 3 Replies
Nov 1, 2010
How to use flash.filesystem.FileStream? FileStream.as file Where?
View 2 Replies
Apr 9, 2011
I am creating an EDM (Electronic document Management) system which will use Flex for front-end, PHP at server side and Mysql as database. Since its an EDM a single file will have many versions old copies will be stored hence one to one files mapping is not a choice. Wondering whats the best way to do so.
View 1 Replies
Dec 13, 2011
i have the following:
<s:Image source="{path}/imageName"/>
how can i determine that path to load the image from filesystem lets say from
C:UserssstaurossDesktop ??
View 2 Replies
Sep 13, 2009
may i know in order to use these 2 class in my actionscript. I need to use "adobe air and flex" ?
View 1 Replies
Mar 31, 2011
In need to move/delete files on the local file system of the user from a web page.
I know the flash player run all applications in a sandbox for security reasons. But maybe is there the possibility for the user to allow local filesystem operations (in some advanced settings). Or maybe to sign/join a certificate.
View 3 Replies
Feb 6, 2010
I have the following two action methods:
[Code]...
The application is used through Facebook. I click the button and the flash contains the notice while create is being executed, but after that it's empty again. It doesn't survive a redirect.
View 1 Replies
Jul 20, 2011
How can we include (nicely) a swf file in a Rails application?By the way, I tried the swf_fu plugin but it didn't work. When I call my swf file located in the swfs directory, it tells me that the method is not found:
View 1 Replies
Nov 5, 2010
I'm working on a Flash AS2 application that needs to post JSON data to a web service.In previous projects, I've used LoadVars.send() or LoadVars.sendAndLoad() successfully to manage this:
var send_lv:LoadVars = new LoadVars();
send_lv.data = JSON.stringify({some json object});
var response_lv:LoadVars = new LoadVars();
response_lv.onData = function(rawdata) {
[code]....
In somepage.php, I can grab that JSON data using $_POST['data'].However, on this project, the developer of the web service requires the JSON content to be the BODY of the request (i.e., not a name/value pair). Is this possible with LoadVars?
View 1 Replies
Oct 14, 2011
I'm new to JSON. This is the .json I want to decode but I always get this error:
[Code]...
View 1 Replies
Feb 23, 2012
I have a pure ActionScript 3 problem, but the simplified test case I've prepared is in Flex 4 for better visibility (the source code is below): Since Flash Player 11 / AIR 3 support JSON natively, I've decided to move a multiplayer game, which used XML for communicating with server, to JSON. But I have a frustrating problem, that given two Objects like
[Code]...
View 1 Replies
Oct 31, 2010
how to use flexpaper for my rails application? it needs swf formats, and our rails wud converted any supported file type to pdf.how to proceed further with converting pdf to swf on the fly and displaying it via the flexpaper app.
View 2 Replies