cancel
Showing results for 
Search instead for 
Did you mean: 

Pop-up usage

Former Member
0 Kudos

Hello,

I have 2 WD DC, namely DCA and DCB. DCA has 2 pop-ups. DCA also has a child WD DC called JuniorDCA. JuniorDCA needs to use the pop-ups of the DCA on the click of the buttons. Can somebody please send me the step-by-step detail of the same?

Thanks in advance.

Regards,

Dharmi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dharmi,

Is DCB acting as the child DC for DCA?

By pop-ups, I asssume you have created two seperate windows in DCA, and wants to show them as pop-ups in the child DC.

Anyway, Child DC's cannot access the objects of the parent DCs. It is always the parent DC which make use of the child DC and I don't think the reverse is possible.

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

Hello Nibu,

Thank you for your prompt reply. No, DCB is a seperate WD DC which would eventually also like to use one of the pop-ups of the DCA.

Your assumption is right I have 2 seperate windows for 2 pop-ups.

Sorry there is no child DC, however I thought I created one, but in DCA itself I have 2 web Dynpro components Is it then possible to call/ use the pop-ups in the second Web Dynpro component? If, yes can u please specify the step by step detail.

I look forward for same promptness and sorry for the confusion.

Regards,

Dharmi

Message was edited by: Dharmi Tanna

Former Member
0 Kudos

Hi Dharmi,

It is not possible to use a component's <b>Window</b> in another Component. this is because, Windows being created inside a component is very much specific to it.

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

Hello Nibu,

Thank you once again. Tell me how can I make use of the 2 pop-ups in other WD DC's. Tell me how the scenario should be to make the usage possible?

I would like to use 2 pop-ups in 2 WD DC.

Regards,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

If you want to show two different <b>views</b> of the second component inside a pop-up window of the first component a workaround possible:

1) create two differnt views in the second component. Make one on the views as the default one.

2) Create an attribute in that say 'view'. If it's value is a specific value, say for eg 'second', trigger a plug to the second view.

3) Now map this attribute to the second component's interface view.

4) Create a window in your first component, embedd the interface view of the second component inside that window.

5) Mapp the context attribute of the second component's Interface view controller to the first component's view controller or component controller.

6) Set the mapped attribute's value accordingly ('second' if the second view is to be shown etc.).

Create a pop-up window out of the new Window created in the first component. Opening this window, will show a pop-up with one of the views from the second component.

Hope this helps,

Best regards,

Nibu

Former Member
0 Kudos

Hello Nibu,

If I understand you correctly, you are suggesting same like in the sample codes and tutorials "Using server-side Eventing in web dynpro components".

"Create a pop-up window out of the new Window created in the first component. Opening this window, will show a pop-up with one of the views from the second component."

This is indeed what i was looking for. Let me try that and get back to you.

Thanks much,

Dharmi

Former Member
0 Kudos

Hello Nibu,

Hurray, It works for first pop-up now I am going to try it for the second one. Thanks a lot.

Can you please explain this "Create an attribute in that say 'view'. If it's value is a specific value, say for eg 'second', trigger a plug to the second view." I mean how do i trigger a plug to the second view? I do know how to navigate through plugs from one view to another but in this case I would like to mention that the first view (pop-up) has nothing to do with the second.

Cheers,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

<b>Sorry if I have confused you. That statement is necessary only if you want to dynamically select & show different views belonging to the same component inside the pop-up of another component.</b>

Say now you have created a view in the second DC as the default one, and is showing that view in the pop-up window of DC1. I suggested you to create another attribute incase you have created one more view in the second DC, and wants to show one of these views in the pop-up window depending on the user input. The problem here is, you can embedd only the interface view of DC2 into the pop-up window, which will bring up the default view. And as far as I know, you cannot set a view as the default one at runtime. So what I was suggesting was, pass a value depending on the user input to DC2, read that value in the default view and then if value is for showing the second view, fire a plug to that view. And for passing the user input, we are making use of data mapping. So create an attribute in the view of DC1, map that to the interface view of DC2 and then from there to the default view of DC2.

But it has a big drawback, as it does the checking in the wdDoInit() method, it works only for the first time. So if you want to show these views again & again, it will be of no use for you. But I suppose if you manually control the component usage, you may be able to take advantage of this.

It would be really useful, if there is a way to decide to which view the control flows from the component. The small documentation for the 'wdDoBeforeNavigation' method of the component controller, says you can fire outbound plugs from here. But as far as I know, that will help us to fire only interface view plugs. Any help on this would be very much helpful. If someone knows more about this, can you please share it here?

Best Regards,

Nibu.

Former Member
0 Kudos

Hello Nibu,

You confused me now. I got both the pop-up working.

I just went by your statement "Create a pop-up window out of the new Window created in the first component. Opening this window, will show a pop-up with one of the views from the second component."

This what I did: I creted 2 Web Dynpro Components in the WD DC for each pop-up. I used those 2 components then in the 3rd Web Dynpro Component and it works.

Thanks much for your help

Regards,

Dharmi

Answers (0)