cancel
Showing results for 
Search instead for 
Did you mean: 

component usages

Former Member
0 Kudos

Hello Everybody,

I hav requirement like..am using component usages to use multiple Z components in a main component. But the issue like how to call different components based on button action with in same view of a main component.

Plz Help me in this..

Thanks

M.Prashanthi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You are displaying the reused component in the ViewContainerUI element in main view, right. You can get your requirement by binding the display property true/false on click of a button event.

Hope it works for you.

Answers (4)

Answers (4)

Former Member
0 Kudos

This is answered

Former Member
0 Kudos

Hello,

For all the components u have declared the usage will have the interface view. In the window of themain component you can keep all the Interface views.

After this you can create the Inboound plugs for these views.

Create a navigation links and different outbound plungs from the view you want the navigation to hapen.

Now on the Button action Fire the outbound plug you want ., this will take to thre required compoennts Views

Regards,

Raju Bonagiri

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>But the issue like how to call different components based on button action with in same view of a main component.

Are you doing dynamic or static declaration of the inner component usages? If it is mainly the navigation aspects you are concerned with, you probably want to look at the dynamic navigation API:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0c/99f2405a6bdd50e10000000a1550b0/frameset.htm

Former Member
0 Kudos

Hi,

I am not sure if this will work , but you can try out.

I guess you must be using viewcontainerUI element to embed views from other components.

For each view that you want to embed , you create a seperate viewcontainer.

Now based on the button clicked or event triggered , you can make a particular viewcontainer invisible .

EXAMPLE,

DATA : lo_viewcontainer TYPE REF TO CL_WD_VIEW_CONTAINER_UIELEMENT.

IF 'event = next' .

lo_viewcontainer ?= view_instance->get_element( ID = 'ID of ur viewcontainer' ).

lo_viewcontainer->set_visible(value = 01 ).

ENDIF.

This code can be written in event handler of the button.

Make sure that you set the view_instance with the value of "view" in WDOMODIFY method of view.

Cheers,

Aditya.

Former Member
0 Kudos

Hi,

Plz can u elaborate..