Skip to Content
avatar image
Former Member

component usages

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 19, 2010 at 11:20 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2010 at 11:22 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 19, 2010 at 11:47 AM

    >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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2010 at 08:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 11, 2011 at 02:22 PM

    This is answered

    Add comment
    10|10000 characters needed characters exceeded