cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic component usages- urgent

Former Member
0 Kudos

hi,

The scenario is as follows

1. I have a using component(A)

2. The used component name is known only at runtime

3. Hence i have defined a component interface(CI) as a usage in A

4. At runtime i create a component usage for the used component under the usage group of the interface.

5. The used component has implemented CI

I am unable to pass data from A to the used component. It is not possible to map the context nodes of the interface controller of CI and the component controller of used component.

Please help.

thanks,

kavitha

Accepted Solutions (0)

Answers (1)

Answers (1)

Yashpal
Active Contributor
0 Kudos

Hi ,

yes u can pass data to the context of interface controller of component for that u have to set the is InputElement property of context nodes to true .means it gets data from external source and while mapping the context u have to map the context which fetches the data to this nodes ...

if any more explanation required post query.

Thanks,

Yashpal

give appropriate points.

Former Member
0 Kudos

I don't understand how to do the mapping

I need to do the foll.

1. take input for node N from screen in using component(A)

2. pass it to component interface(CI) node(N)

3. map node N of CI and node N of used component so that the used component can receive the data

I get an error saying "Mapping for ComponentController node is not complete" in the using component when i run the application

kavitha

Former Member
0 Kudos

Kavitha,

I am not seeing a big problem here or probably i am not understanding your requirement.

Component A. uses probably component B or C or D. you know that only at runtime.

You can include all these components as used components to Component A with lifcycle as manual.

you can write a method in Component A which can receives a parameter and then with that parameter you can create the comp-usage.

After creating required component you can set the values to the Node attributes of the desired component.

You also have to find a place to destroy the used component so that you are not encountering problem.

Former Member
0 Kudos

Hi senthivel,

you are right, but what if today there are 5 used components but the list is subject to change? We want to just add to the list of used components in a data model instead of recoding the using component each time.

I found a solution. thanx anyway

kavitha

Former Member
0 Kudos

Kavitha,

Would you please post also your solution so that SDNers would benifit from that.

yes,you are right.If you use a model then probably you could use reference mode of the used components.Anyway you solved the problem.very good.

regards

senthivel

Former Member
0 Kudos

Senthivel,

This is what i did

1. Using component A dynamically creates a usage group with the component interface CI

2. All used components implement CI

3. The CI has an interface view W1 whose default inbound plg accepts parameters

4. The used component embeds its views in window/interface view W1

5. In a method of A the used component name is available at runtime

6. Create a dynamic navigation link from the current view to the interface view W1 and fire the outbound plug of the view.

7. The inbound plug of W1 receives the data

8. Used component stores this data in its context appropriately and can use it.

Hope it helps

kavitha