Hello,
I am fairly new to SmartClient and it's been a while since I've dabbled in JavaScript so I have what is probably a rather simple question. In the attached code, I have a section stack defined with several sections, each which has several components including ListGrids, DynamicForms, and buttons. We are trying to work out where the button click functions should be and the best way to invoke them.
At line 78 you will see the click handler for the contractSaveButton. The function, contractSaveClicked(), is defined at line 887. This code does run as expected, but it just seems sloppy to me and I would like to avoid having to duplicate that method of getting the parent of the parent for every button we have in the stack.
1. What would be a better approach to defining the contractSaveClicked() function?
2. Where would be a better place to put it?
3. How would the function be called in the contractSaveButton click handler?
Thanks!
Jason
I am fairly new to SmartClient and it's been a while since I've dabbled in JavaScript so I have what is probably a rather simple question. In the attached code, I have a section stack defined with several sections, each which has several components including ListGrids, DynamicForms, and buttons. We are trying to work out where the button click functions should be and the best way to invoke them.
At line 78 you will see the click handler for the contractSaveButton. The function, contractSaveClicked(), is defined at line 887. This code does run as expected, but it just seems sloppy to me and I would like to avoid having to duplicate that method of getting the parent of the parent for every button we have in the stack.
1. What would be a better approach to defining the contractSaveClicked() function?
2. Where would be a better place to put it?
3. How would the function be called in the contractSaveButton click handler?
Thanks!
Jason
Comment