Saving edited

I’m using something similar to Page Flow. I want to save the changes made after editing the text in each node, so that everytime I reload I want to be able to see the changes made…but this does not seem to be happening or am I missing something?? I’m very new to this library and javascript.

Sooner help would be very very well appreciated.

Thanks in advance.

Do you have a TwoWay Binding on the TextBlock.text property to a property on your data? You’ll notice that there is a TwoWay Binding on each property that might be changed by the user and that wants to be saved in the model.

thanks for your instant reply.
I’m using the same source as in “Page Flow” page. There seems to be a twoWay binding in the code. I could edit the flow and see the changes in the node. But, when i refresh the page, it takes the default value and not the changed data.

Hope to hear again soon.

If you edit some text in-line in that PageFlow sample, and then click on the “Save” button, doesn’t the new text show up in the JSON representation of the model in the textarea?

Or if you just edit the text in that textarea and then click on the “Load” button, don’t you see the modified text, or a completely different flow, depending on what changes you made to that JSON text? (You can also end up with no changes or nothing if you change it to become syntactically invalid JSON.)

Or do you mean that when you reload the page the sample starts off the same each time? That’s intentional – there’s no database anywhere that the samples utilize. If we make improvements to a sample, we want the user to see the latest. Some of the samples do load data from our server, but it’s going to be the same each time, for exactly this reason.

Both the save() and load() is working perfectly.

But in my application, I want the user to be able to see the edited(changed) content, everytime this chart is loaded . Something like a save option. Does go.js have this feature ?.
I am having a hard time trying to update a common json file ( on server ). Is there a way I can use any kind of persistence data to create my flow chart ?

You are going to have to decide how and where you want to save the data. You might be able to store it on the client side using cookies or web storage (localStorage) or Indexed DB. More commonly you can save it on the server in any number of ways, I’m sure more than I can imagine. There are all kinds of issues that your choice will entail, such as security and performance and lifetime and multi-user/sharing.

We have a demo creating an ASP.NET MVC app as a video:
http://www.nwoods.com/components/canvas/gojs-documentation.htm