Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
deleteinstance issue and solution
Tim__D
I developed a form which contained a "Tabs" or container. This container contained other container elemets which were the "choices" of the OR when adding additional Tabs. The resulting interface gave users the ability to add a variable amount of tabs for a given page.
I needed a way to ensure that they only added 1 of each tab within the form. So I used formAPI to see which kind of tab had been added and then looked at the series of instances to see if it was a valid "choice" or not. That is, not more than 1 of each type existed in the series of tabs. For this I used a associative javascript array.
If more than 1 of the same "tab" type was entered then I deleted the instance that was added (not the second one to be counted).
This is where I ran into a little issue with deleteinstance. It did delete the instance behind the scenes, BUT it left the instance in the browser display and if it was deleted by the user another instance was deleted!! This is in another thread as well.
My solution for this was to use a recursive function to make the added instanace and all children invisible. Except for a small gap of white space on the page this was the best I could come up with.
If this helps anyone.. great. If you have a better suggestion lets hear it.
Oh..by the way. Using onbeforereplicantadd was not an option for me as it does not provide a handle to the instance being added only the replicant container.
Hope this helps.
Solaris 10
TS 6.7.1
Find more posts tagged with
Comments
There are no comments yet