cancel
Showing results for 
Search instead for 
Did you mean: 

Conmponent created using IWDComponentUsage is not Visible

Former Member
0 Kudos

I created component which implements some interface.

IWDComponentUsage is defined as referencing that interface.

Component successfully create using call

.createComponent(component, container);

with String arguments of component name and project.

and placed to ViewContainer Element.

methods of controller is called,

but iView is not visible.

wDoInit() of iView not called.

iView is default.

question: for what reason iView is not visible?

thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Idhaya R

awnwer was resoving

Former Member
0 Kudos

Hi Vladimir,

DC1 - component containing methods to be used or views to be used.

DC2 - Component using dc1 for methods or views.

If you want to use view from the dc1. After creating the view container element, from the window right click on the view container element and choose embed view and choose Embed Interface view of a Component Instance. After that , you will be able to see the list of used components in your dc2. In that choose the interface view of the component and Click on finish.

If you want any method to be called from the view, as far as i know wdDoModifyView method only is called. Put a message in it and test.

In case of problems revert back.

Best Wishes

Idhaya R

Former Member
0 Kudos

It must be done programmatically,

not knowing which component will be used in design time.

Just that component must implement interface for which ComponentUseage is defined

(as reference to interface, not for concrete component)

for that CreateComponent( String, String ) method is used... so no prior TYPE knowledge is need

and... for some components it is working,

but not for my one, so I think why...

---

UI part of iView exist as default iView of window of component,

but - it is not called to be showed

so I thinking and asking - why so?

Former Member
0 Kudos

____

Problem is in fact that

for one component ViewController is not created, as I see in debug.

are there any idea for what reason controller of component is created, but

ViewController under it is not?

Former Member
0 Kudos

What is the life cycle of the view controller, manually?

Former Member
0 Kudos

no, lifi cycle is standard - as with any component created by default.

if I create application for testing and create View in Portal from it,

all will be shown.

but if I use createComponent(), ViewController is not create called,

and not visible.

Former Member
0 Kudos

There is a [tutorial|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b021025a-2908-2d10-f1b2-e5a947dc7a65] about components in the WD Java Demo Kit. Maybe you will find there the reason for your issue. I could imagine it has something to do with correct embedding of the component inside a window or creating the initial view assembly.

former_member182372
Active Contributor
0 Kudos

no, lifi cycle is standard - as with any component created by default.

>

> if I create application for testing and create View in Portal from it,

> all will be shown.

>

> but if I use createComponent(), ViewController is not create called,

> and not visible.

1) What does

hasActiveComponent()

return after you execute

createComponent

2) Is default set for interface view when you embed it into view container?

3) Is visibility set to visible for view container element?

I just tried simple scenario: interface, implementation, container DCs and it works fine for me, no issues with visibility on dynamically created component usage.

Former Member
0 Kudos

Idhaya R

your answer was resolving

Edited by: Vladimir Grigoryev on Aug 12, 2011 2:57 PM

junwu
Active Contributor
0 Kudos

does the reused component have visible interface?