Hi all,
I was hoping to have a discussion about what all needs to occur when attempting to save and load dynamically created objects.
I've looked through the following example pretty thoroughly and I feel like it is a good starting example, but leaves some complex concepts still untouched: http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx
So, my first concern is usage of only a single RadDockLayout in this example. It is my understanding that scenarios will arrive where multiple RadDockLayouts will be necessary and that each RadDockLayout needs to be able to persist the state of controls inside of it. Does Telerik possess example code to handle this scenario? Could some be mocked up?
For instance, in my scenario I have the following situation:
I was hoping to have a discussion about what all needs to occur when attempting to save and load dynamically created objects.
I've looked through the following example pretty thoroughly and I feel like it is a good starting example, but leaves some complex concepts still untouched: http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx
So, my first concern is usage of only a single RadDockLayout in this example. It is my understanding that scenarios will arrive where multiple RadDockLayouts will be necessary and that each RadDockLayout needs to be able to persist the state of controls inside of it. Does Telerik possess example code to handle this scenario? Could some be mocked up?
For instance, in my scenario I have the following situation:
- The web page loads and the user is presented with only one, blank RadPane.
- The user has the ability to divide this RadPane up into subsections which will eventually hold RadDocks through the following strategy:
- 1) User indicates they would like to add a horizontal RadSplitBar to the screen.
- 2) Dynamic creation of the following controls ensues:
- a) RadSplitter will be our base foundation. Its orientation is horizontal.
- b) RadPane will be contained in the RadSplitter.
- c) RadDockLayout will be contained in the RadPane.
- d) RadDockZone will be contained in the RadDockLayout.
- e) RadSplitBar will be contained in RadSplitter.
- f) Repeat steps b-d to replicate the 'other half' of RadSplitter's content.
- 3) This RadSplitter is now added to the blank RadPane.
- The user now has control over two dynamically created, resizable RadDockZones.
At this point it should be clear that the amount of objects requiring persistent state is going to be
much larger than that of the simple example provided above.
In addition, my scenario allows the
user to continue adding more bars to their initial RadPane -- subdividing the initially blank square
into many RadDockZones of various size.
After investigating this issue further, I was able to find some sample code provided by a Telerik
employee that showed a way of saving DockZone's to a database. In this example, they capture
a specific RadDockLayout's RegisteredZones and write the list of names to a database. Then,
they recreate each zone using only the name given in the database. This solution does not seem
easily extensible, however. How would one handle an arbitrarily large amount of nested controls?
Attempting to recreate the object structure I described above sounds near impossible. The user may have decided that they really like horizontal dividers. As such, they have nested the above object structure in itself multiple times. Each time, the code must strip away the RadDockZone and RadDockLayout and re-add the entire structure to the RadPane in order to 'split' it into two again. Then, when loading the hierarchy on page init, I cannot just load all RadDockZones. I must load the first splitter on the static pane, then the panes it holds, then splitters inside those panes (recursively going through any splitters added to the pane) before being able to go back through and add RadDockLayouts and RadDockZones to panes which do not have splitters on them.
Whew! With all that being said, I feel like this goal is an achievable one. Unfortunately, I do not see a way of dumbing down this recursive-nesting in a way that would yield the same results that I desire.
If I can provide any additional information, let me know. If a sample project with code would be helpful I can supply, but I will be the first to admit that my project is still in its infancy.
Thank you for your time!
EDIT: If it seems that creating a complicated mock-up would not be feasible at this point in time, would it be possible to receive a mock-up of a static RadPane saving/loading the state of another control?
Attempting to recreate the object structure I described above sounds near impossible. The user may have decided that they really like horizontal dividers. As such, they have nested the above object structure in itself multiple times. Each time, the code must strip away the RadDockZone and RadDockLayout and re-add the entire structure to the RadPane in order to 'split' it into two again. Then, when loading the hierarchy on page init, I cannot just load all RadDockZones. I must load the first splitter on the static pane, then the panes it holds, then splitters inside those panes (recursively going through any splitters added to the pane) before being able to go back through and add RadDockLayouts and RadDockZones to panes which do not have splitters on them.
Whew! With all that being said, I feel like this goal is an achievable one. Unfortunately, I do not see a way of dumbing down this recursive-nesting in a way that would yield the same results that I desire.
If I can provide any additional information, let me know. If a sample project with code would be helpful I can supply, but I will be the first to admit that my project is still in its infancy.
Thank you for your time!
EDIT: If it seems that creating a complicated mock-up would not be feasible at this point in time, would it be possible to receive a mock-up of a static RadPane saving/loading the state of another control?