on 04-14-2008 10:52 AM
Hello experts,
i have a following problem.
I have one DC(DCmain), wich used most of other DCs. I have in this DCmain a Popup Window. I have my DC(DCmy) wich is also used in DCmain. I need to perform the following scenario:
The user used a link in some view of DCmy. Some information must be send und Popup window from DCmain must be opened.
Is it possible ? As i tried to use DCmain in DCmy an error appeared, because of cycle reusage. Is at possible at all to send from my component interface an event with Data to the Component in DCmain ? How can i call this popup window without reusage of DCmain Component?
Thank you in advanced!!!
Kind regards,
Daria
Hi Daria,
You can navigate from DCmy to DCmain, for that no need to use DCmain as used DC in DCmy.
Flow is like
DCmy->DCmain->PopUp
follow thse steps.
1.create an outbound plug in interface view controller of DCmy (say *toDCmainPopUp).*
2. create an inbound plug in interface view controller of DCmain view in DCmain.(say *fromDCmy)*
in implementation of fromDCmy
write code to call PopUp
3. as DCmy is already used as used DC in DCmain.
so link
*toDCmainPopUp->*FromDCmy
Edited by: snehal kendre on Apr 14, 2008 12:29 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, i have some problem to post message, because of forbidden words...
ok i try it again..
Hi ,
thank you very much for your answer!
But i still could perform only two steps, you have suggested.
As i correctly understand, i have made in DCMy an "oubound plug" in WebDynproComponents-> <My>Component-> Interface Views-> <My>interfaceView with the name "toDCmainPopUp" (type standard)
in DCmain ,in in WebDynproComponents-> <My>Component-> Interface Views-> PopUp<My>View i have made an inbound plug with the name "fromDCmy"
I have not implemented yet, how i call the window, because i don't know how to link :
4)toDCmainPopUp->FromDCmy
i have not found any possibility in inteface view controller to link, i can only created there out-, and inbounds plugs, ...and as the second problem, is it correct with PopUp<My>View or it should be the main interface view controller from DCmain, where i created this "inbound plug"
Could you help please?
Thank you very much in advance!
Kind regards,
daria
Edited by: Daria Sosunova on Apr 14, 2008 1:49 PM
Edited by: Daria Sosunova on Apr 14, 2008 1:50 PM
P.S. and how can i fire a plug then?
Edited by: Daria Sosunova on Apr 14, 2008 3:57 PM
Hi Daria,
Create a inbound plug in interfaceview controller of your main screen.
IF DCMainView is your main view then
1.> and its interface view controller is DCmainInterfaceview then create an inbound plug there as FromDCMy
2>In implmentation you will get onPlugFromDCMy there put the code for popup
e.g.
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PopUpWindow");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
window.setTitle("PopUp");
window.setWindowPosition(WDWindowPos.CENTER);
window.open();
that means from DCMy view you`ll call DCmainView but beacause of code return in inbound plug it`ll directly show you the popup
and to fire the plug from DCMy view
1> in properites view of view. add interfaceview controller as required controller
2> then on action of button or anything just wdthis.interfaceviewcontroller.wdfirelplugtoDCmain.
Then build your DCMy, refresh the used DC in DCmain and in You main Window(i.e in DCmain) you can link these plug
Edited by: snehal kendre on Apr 15, 2008 5:30 AM
Hi Snehal,
thank you very very much !!!
i have made with DCmainView some different as you sugessted. Because i had DCmyInterfaceView, i can see an outbout plug on it.
That's why i made a normal inbound plug by some view in dcmain and linked DCmyInterfaceView with this inbound. So now i can see my PopUp window!!!!
I have only one little(i hope) problem now. My PopUp window use some parameters to represent data. I thought, i can send these parameters(String par1, String par2), using wdfireplug(string 1, string2),
so i have added to outboundplug two parameters par1 and par2 of type string
i fire plug, as you explained + parameters: wdthis.interfaceviewcontroller.wdfirelplugtoDCmain("kuku", "kuku2");
in onplugFromDCmy, i have only wdEvent...so i i can get this String parmeters if i write:
String result1= wdEvent.getString("par1"); //here isr par1 is the name of parameter of outboundplug
String result2=wdEvent.getString("par2");
but it seems not working....:(
Have you maybe any idea?
Thank you!!!
Kind regards,
Daria
Hi Daria,
In your case passing parameter to popup through fireplug is not possible.
Instead of that pass parameter through controller.
1.) create two context in your DCmainController say para1 & para2. and one method as setcontext.
setcontext(string kuku,string kuku2)
{
wdcontext.setpara1(kuku);
wdcontext.setpara2(kuku2);
}
2.) map these context into your popup view.
or simply you can do as
String result1=
wdgetDCmainCompController.wdgetcontext.currentContextElement.getpara1.
String result2= wdgetDCmainCompController.wdgetcontext.currentContextElement.getpara2.
3.) Add DCmainController as required controller in DCmain Interface View controller.
As your scenario is
plugtoDCmain("kuku", "kuku2")->PlugfromDCmy(kuku,kuku2)
4.) In implementation of onPlugfromDCmy(kuku,kuku2)
call method of controller
wdthis.wdgetDCmainCompController.setcontext(kuku,kuku2);
That mean you first save parameter in component controller as context
and then access those context in PopUp view
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.