SectionStack components

Hi ,

I have used a component(Stack which consists of forms) as a section in SectionStack, now if i m reusing this component in some other section in the same SectionStack then it appears only in one section, the later one takes preference . Is there some way to reuse the same component more than once

Thanks
Mahi

Do you really want this exact same component twice? That doesn’t sound very useful, but if that’s what you want then your best bet is probably to isc.clone() the object.

Or do you want two instances of the component, each with its own separate state? This is, of course, much more useful! Have a look at the SmartClient Quickstart Guide, in the “Extending SmartClient” section.

Thanks for early response,
I have a page consisting of multiple forms, so is there some utility to create clone for a page or i need to create a clone for every component

isc.clone() performs a deep clone of an object, so cloning a component will also clone its children: http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#classMethod..isc.clone

However, having two copies of the exact same object doesn’t sound useful, and showing them both on screen at once sounds even less useful! Presumably you’re intending to change something about one of these objects after cloning? If so, you’re into a kind of emulated OO and should really think about making that component a proper class.

Thanks, yes i made it a class