on 04-04-2007 4:12 PM
Hi,
I want to embedd several views with the same interface in my window.
Only one view is visible at the same time and which view should be determined dynamically.
So I created a Component Interface with some methods in component interface controller and a Interface View Definition (named ITaskInterfaceDefinition). Every component I want to embed implements this interface.
I can embed the ITaskInterfaceDefinition in my Mainview like every other view. But now I dont know how to create an instance of the component? How to assign the component as implementing unit for the embedded ITaskInterfaceDefinition?
thx in advance
Tom
Hi Thomas,
Let assume you have declared ITaskInterfaceDefinition as <b>Required Controllers</b> and component which implements ITaskInterfaceDefinition has name "com.sap.sdn.Task"
IWDComponentUsage usage = wdThis.wdGetITaskInterfaceDefinitionComponentUsage();
if (!usage.hasActiveComponent()){
try{
usage.createComponent("com.sap.sdn.Task");
}catch(WDRuntimeException e){
//handle exception
}
}
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both very much! Of course points to you guys!
I think the first answer was exactly the hint I was looking for. Embed only one Interface and create the Components in my code. If I have 20 views with the same interface I can embed only one interface and use some mapping to create the components.
One additional question. In my interface view definition (in the Component Interface), which I embed as visual part of my component I defined several inbound plugs.
These inbound plugs result in window inbound plugs in the implementing component. How do I map these window plugs to my inbound plugs of the views inside my component?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
In my opinion, you have to create a WD component to each View that you wish to use in the winodwmain component. Each WD component will have its view.
Following these steps bellow:
1 - In the main component, add all others components that you have created, in "add Used Component";
2 - In the Window, embed the interface view of a component instance, for all views.
3 - Create a plugin navigation between the views.
4 - In the main code, use the following code to control the instantiation and navigation:
IWDComponentUsage component =
wdThis.wdGet<<your component>>InstComponentUsage();
component.createComponent();
wdThis.wdFirePlug<<your navigation>>();
That is your requirement?
Regards,
Luciano
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.