Hi everyone,
After all... thanks for your help, believe that I found more valuable help here than in marketplace. =)
THE question of this time is: I have a group created in design time, then I need to make several copies of it in runtime (with code).
How can I make these copies ? I found the object WDCopyService but I can't make an instance of the class =(
Any valuable help with this ?
Regards from Mexico =)
Diego
<i>How can I make these copies ? I found the object WDCopyService but I can't make an instance of the class =(</i>
Because it is so-called Booch Utility Class -- class sole purpose of which is to provide static utility methods. so what you can is call directly WDCopyService.copyCorresponding(...) or other methods
<BR/>
VS
Hallo Diego,
the WDCopyService class is only used for copying node elements form one context (model or value) node to another based on equal attribute names and compatible attribute types.
But, as I assume, this is not the right copy service for your requirement. You probably want to copy UI-element subtrees starting from an existing root UI-element, e.g. a Group. For this scenario Armin can give you an answer.
Greetings, Bertram
As Bertram point this out you took wrong direction.
What you need is to traverse recursively UI elements from cloning target (inclusive), going into recursion on any that implements IWDUIElementContainer and apply a bit of Java Reflection on every step to copy property values / bindings.
VS
Add a comment