Hi
In my project, I want to create dynamic blocks of sections with controls to manipulate data while rendering the page. And in postback session, I want to collect data from these sections and save it to the database. I chose fieldset control for the container (although I am not too happy because I am not able to hide/unhide fieldset control at runtime). In the container I had to put a matrix table for tabular data and some labels and textboxes. Now, I need to replicate this container with all the inner controls to any number of times(depends upon business scenarios).
I tried to do the same in a sample project. I took a fieldset control as a container and put a textbox and a matrix table. Now when I try to clone this container with the intention of cloning all its children, I find that it just creates a shallow object. If I try the same thing in design time and refresh the screen(by 'Save and Reload' option), it copies the children as well. Now I am confused as what goes wrong at run time. I am sure that my code has some issues. Please help me to identify them. Here is the code I used to clone a fieldset with its children.
function addAnother(objMatrix) {
var server = objMatrix.getServer();
var decisionPane = server.getJSXByName("decisionpane");
var objCloneMatrix = objMatrix.clone(jsx3.app.Model.PERSISTEMBED);
decisionPane.setChild(objCloneMatrix);
decisionPane.repaint();
objCloneMatrix.setPersistence(jsx3.app.Model.PERSISTEMBED);
}
I hope that I have explained the issue which I am facing, but if you need to know about anything else, please let me know.
Thanks
Ashim Ghose