on 11-26-2004 9:57 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What exactly do you want to copy? How does your use case look like?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, my problem was not solved at all. But at least, I dont need to "clone" objects.
At first, I was trying to create a TabStrip dynamically, and clone its contents in each tab. Tabs are identically except for 1 parameter.
But, now I'm trying to display just 1 container with a ToolBarDropDownByIndex object, and when the user change the value in the combo box, I need to refresh the screen.
Now, I'm having problems doing the 2nd. option.. =(
Thanks for your help and regards,
Diego
I see 2 possibilities:
1. Create a Web Dynpro component for those UI parts that have the same structure. Embed instances of this component in views using IWDViewContainerUIElement placeholders.
or
2. Implement a method which creates the UI tree for similar parts, and provide method parameters to create the variants. Call this method at appropriate times in wdDoModifyView() to initialize/modify the view structure.
Cloning of UI trees created at design time is not trivial, so I would not suggest to do this.
Armin
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.