cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying two views

Former Member
0 Kudos

I have a form with a tree view on the left and a details form view on the right. When I need to add a new item, I am using a modal window with the appropriate details view embedded in it. This works great for my "add child" action (since there is a separate details view for each level in the tree). I want to also provide the ability for the user to "add sibling", but when the details view is displayed on the right, and I create the modal window with the same details view embedded in it, I get a WebDynpro error saying that an instance of the view already exists. Any ideas on how to avoid this?

-Dave

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

David,

Sadly, there is no way to avoid this -- every view per component / component usage may appears on same browser window only once.

However "component usage" is important remark here. You may extract your "details" functionality into separate component, then create 2 component usages (in master component, where tree is located) and display Interface View of both of them.

VS

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi David,

When you close the modal window and goes back to view, You have to destroy the window instance which you have created to show this window. If you have not destroyed this instance then next time calling this modal window it will show this error.

So do one thing. make one value attribute in context as type of IWDWindow.

Then at the time of creating window instance store the same instance in context also.

Now at the time of closing the window destroy this instance using its destroy method.

Like : If you have created value arrtibute : window

then at the time of closing window retrieve it using

IWDWindow win = wdcontext.currentcontextelement().getWindow();

win.destroy();

Let me know the status whether it is working fine or not.

Regards,

Bhavik

Former Member
0 Kudos

I created a test project to try using a separate component for the details functionality. I created two component usages (one for the main window and one for the popup). This worked in that I was able to display the same view on screen twice - but I needed to map data between the main window and the details component, so I used isInputElement = true. However, when I run the application, the details views are always read-only, even though none of my context elements or ui elements are set to be read-only. Is this because of the isInputElement property? Is there any way around this?

Thanks,

-Dave

Former Member
0 Kudos

David,

isInputElement setting does not enforce read-only state. Could you check whether

1. You map "isInputElement" node of component usage in surroubnding component?

2. Your node contains at least one element?

VS

Former Member
0 Kudos

That was it - I forgot to create an element for my mapped context node. Good catch...

Thanks,

-Dave