cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple views on a single window

Former Member
0 Kudos

Hi All....

My project requires tht everything should be displayed in a single window. How can i use multiple views to be displayed on the same window (one at a time) , and can i put a view inside a container...

Plz help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi muzammil.......

you have an ui element called viewcontainer. you just place it in your current view.

then create a component usage in the current view.

go to the window in which you have embedded your current view.

there you can find this viewcontainer ui element as a view.

rightclick on it and give embed view.

now you can insert any view needed.

---regards,

alex b justin

Former Member
0 Kudos

I did the same thing. Here is what I did. I have a main view called "main". In that I have a "transparent container", in which I have a group, so added the viewcontainer in that group. Then I clicked on "Windows" and dragged the new view (which I want to get embedded) under the viewcontainer., then I made the navigation link.. But it is not working.

But if I create a simple view without embedding then it is working fine. Please help out..

Former Member
0 Kudos

hi bichoo........

there is no need for any navigation....

just follow the following steps.......

create view a....

insert view container ui element...

save and activate.....

create view b with some ui elements.

save and activate....

go to windows....

right click on window a.....

embed view a.....

now you can see viewcontainer uielement under view a.

right click the ui element....

embed view b.

save and activate.

this is just for testing purpose... view b must be visible in view container when you execute it. later on it can be changed according to our logic.

---regards,

alex b justin

Former Member
0 Kudos

HI Alex.

Yeah that way it is working.. but the scenario is like this.. i have my main page.. in which i have a transparent container.. and depending on the link which i click..say "display account".. the view which contains the "display account" details should be visible in the transparent container.

The way u told , both views are getting displayed, i want tht dynamically a view is displayed depending on the link clicked.

Plz Reply...

Former Member
0 Kudos

Hi Muzammil.

Insert 2 views inside the ViewContainerUI element in the window. One will be your Account details view.

Other will be an empty view. You can insert an empty view by right clicking on the VIEWCONTAINERUI element in the window.

Make the empty view as your default view.

So initially only your main view is displayed. ViewContainerUI element does not show anything as it has got an empty view.

Then when you click on a button or link, you can fire an outbound plug which is linked to an inbound plug of the Account Details View.

This should work.

Former Member
0 Kudos

hi bichoo........

if you have only two views... then you can have to view container ui elements and make tehm visible according to teh logic....

else you need to do it dynamically byusing this link...

[link|http://help.sap.com/saphelp_erp2005/helpdata/en/0d/a7884121a41c09e10000000a155106/content.htm]

---regards,

alex b justin

Former Member
0 Kudos

Hi Alex..

It is almost working with one small problem. I created a main view in whic i put the view container in which i put two views say a and b. and i created two inbound plugs fr these two views and two outbound plugs fr main view, View a or b should actually be called when the appropriate link is clicked, while this works fine with view C, but it always displays the view a , even before its corresponding link is clicked. I don't want any view ( a or b) to be displayed initially when main view is loaded.

Former Member
0 Kudos

As i said before also Bichoo, add an empty view to your Window and make it the default view.

Then initially nothing will come.

Former Member
0 Kudos

Hi....

Hey i added an empty view and amde that as default view.Now it is working properly..

Thanks a lot......

Answers (2)

Answers (2)

former_member182190
Active Participant
0 Kudos

Hi Muzammil,

You can achieve this functionality by embedding both the views in the same Viewcontainer .

All you need to do is create Inbound plugs to these 2 views and trigger the respective inbound plug depending on the element you have clicked.

Hope this helps.

Regards,

Ismail.

Former Member
0 Kudos

Your window can have as many views as you want. One view will be displayed at a time.

To go from one view to another, you can have inbound and outbound plugs.

So for eg: You have View A and View B.

For View A, you have inbound plug : IB_VA; outbound plug OB_VA.

For View B, IB_VB and OB_VB.

Put both views in the window. Make the view you want to come first as the default view.

Define the navigation from OB_VA to IB_VB and IB_VA to OB_VB in the window.

In the views, you need to fire the respective Outbound plugs when the relevant button is clicked.

And yes, you can have the view in a VIEWCONTAINTERUI element. So you can also embed 2 views in a window.

Same example as above: In View A, you can have a viewcontainerUI element.

in the Window, insert ViewB inside the View A's viewcontainerUI element.

Hope it helps...