cancel
Showing results for 
Search instead for 
Did you mean: 

using an existing view in a view set again

Former Member
0 Kudos

hi all

i have a requirement where in i am placing a tool bar on top of all my views. The toolbar consists of actions ( like save, edit and so on). It is also required that the tool bar be present at the bottom of all the views. So i thought of using a 3 * 1 view set and allow the same view to be embeded in rows 1 and 3. Whenever there is a change in toolbar ( it's content changes )it must reflect in both the top and the bottom toolbar views. Now it gives me a runtime error saying duplicate usage of the view ( quite natural), is there any quick solution to this?

thank you.

regards

vln

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Lakshminarayanan,

1. Extract your toolbar view in separate component

2. Create 2 usages of "toolbar" component in main component

3. Place interface view of "toolbar" usages as first and third row.

To synchronize data between main component and 2 usages of "toolbar" apply context mapping.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Valery Silaev

Thanks for your reply. That was helpful..

But in the view i had not used context to setup the "toolbar" ( rather variables, morever i had setup a toggle on a button). Thought there would be direct method other than context mapping!

Thank you.

regards

vln

Former Member
0 Kudos

Lakshminarayanan,

Actually, there are 2 ways to share data between WD components:

1. Context mapping

2. Combo of parameters to methods / parameters in events.

Say, you want to synchronize your 2 toolbars. You may declare some method(s) to alter state in "toolbar" component interface and some event(s) about state update. Now main component has to subscribe to this event from every component usage and invoke method in other component usage to synchronize state.

With context mapping you may achieve state synchronization automatically. Also method/event pair will look plain ugly if you have a lot of parameters or complex structures.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

hi

Try this.

In the webdynpro explorer,

1) right click the view in which u hav the toolbar.

2) Copy it. In the context menu of the views u have the option paste.

3) Paste it with a new name and then embed the new view to ur viewset.

Hope this helps u.

Regards,

Rathna.