> Ah ok but using the var value = ... only may it available in ethisch block
> but i News it in the enclosing zenmethod
> Erhards Sebastian
> Am 13.04.2012 21:13 schrieb "Vlado" <viliyc...@earthlink.net>:
>> It should be:
>> &js<var value=zenPage.jsOnShowDialog('#(evt)#');
>> and
>> ClientMethod onPopupAction(popupName, action, value) [ Language =
>> javascript ]
>> {
>> .......
>> return value;
>> }
>> but you will have problem with the synchronizing.
>> The other way is to use event value(evt) as popupName :
>> zenPage.launchPopupWindow(**zenLink('nwP.ZEN.Dialog.**
>> UserDialog.cls'), evt,'status,**scrollbars,resizable,width=**
>> 500,height=300',parms);
>> }
>> (changed 'FORMSAVECONFLICT' with evt)
>> and go with my example where you will do everything in onPopupAction
>> So:
>> switch(popupName) {
>> case 'Event1'
>> case 'Event2'
>> ....
>> **Владо
>> On Friday, April 13, 2012 10:52:27 AM UTC-7, sebth wrote:
>>> Hey Vlado thanks for the samples,
>>> in my Case the Popup will be shown if a Event occurs. So i need to
>>> call the jsOnShowDialog() first. The Popup open, the user click a
>>> button (which is the popups event).The parent page (who called the
>>> popup) received the event via onPopupAction(). This is a JS Method -
>>> now I need to call a zenmethod and pass the received event - this
>>> method (zenAnalyzeEvent) need this event parameter and another one
>>> which can only be passed by zenDoSomeThing() method which originally
>>> call the popup... i think this is a bad behaviour,
>>> Based on the above explanation i hope it is clear what i mean. What
>>> would be the best design to have not 3 methods to gather and process
>>> the single value passed from the popup. I need the event value from
>>> the Popup in the zenDoSomeThing() method.
>>> Regards, Sebastian
>>> On 13 Apr., 19:11, Vlado <viliyc...@earthlink.net> wrote:
>>> > Although it is not fully clear for me what you are trying to do here
>>> is an
>>> > example
>>> > which maybe will help you something.Generally in onPopupAction method
>>> > you can do what you want:
>>> > ==============================**==============================**=========== ===
>>> > ClientMethod onPopupAction(popupName, action, value) [ Language =
>>> > javascript ]
>>> > {
>>> > switch(popupName) {
>>> > case 'Klienti':
>>> > if (action == "ok") this.showDetailsKlienti(value)**;
>>> > break;
>>> > case 'NDok':
>>> > if (action == "ok") this.showDetailsNDok(value);
>>> > break;
>>> > case 'Izdeliq':
>>> > if (action == "ok") this.showDetailsIzdeliq(value)**;
>>> > break;
>>> > case 'Ambalaz':
>>> > if (action == "ok") this.showDetailsAmbalaz(value)**;
>>> > break;
>>> > case 'Material':
>>> > if (action == "ok") this.showDetailsMaterial(**value);
>>> > break;
>>> > case 'Usluga':
>>> > if (action == "ok") this.showDetailsUsluga(value);
>>> > break;
>>> > }}
>>> > ------------------------------**------------------------------**
>>> ------------------------------**------------------------------**----
>>> > ClientMethod showDetailsKlienti(id1) [ Language = javascript ]
>>> > {
>>> > var controller = zen('ctrlParent');
>>> > var controller1 = zen('source1');
>>> > controller1.setProperty('**modelId',id1);
>>> > var nomer=controller1.**getDataByName('Nomer');
>>> > var name=controller1.**getDataByName('Name');
>>> > var danachenNomer=controller1.**getDataByName('DanachenNomer')**;
>>> > zen('NomerKlient').setValue(**nomer);
>>> > zen('NameKlient').setValue(**name);
>>> > zen('DanachenNomer').setValue(**danachenNomer);
>>> > controller.setDataByName('**Klient',id1);
>>> > controller.setDataByName('**NomerKlient',nomer);
>>> > controller.setDataByName('**NameKlient',name);
>>> > controller.setDataByName('**DanachenNomer',danachenNomer);
>>> > }
>>> > ClientMethod showDetailsNDok(id1) [ Language = javascript ]
>>> > {
>>> > var controller = zen('source11');
>>> > controller.setProperty('**modelId',id1);
>>> > var nomerNEK=controller.**getDataByName('NomerNEK');
>>> > var dataNEK=controller.**getDataByName('DataNEK');
>>> > zen('NomerDokument').setValue(**nomerNEK);
>>> > zen('DataDokument').setValue(**dataNEK);
>>> > var controller1 = zen('ctrlChildren3');
>>> > controller1.setDataByName('**IdNDok',id1);
>>> > alert('id1='+id1);
>>> > alert('ctrl1='+controller1.**getDataByName('IdNDok'));
>>> > controller1.setDataByName('**NomerDokument',nomerNEK);
>>> > controller1.setDataByName('**DataDokument',dataNEK);}
>>> > ------------------------------**------------------------------**
>>> ------------------------------**------------------------------**----------- -----
>>> > Here I call different methods like this.showDetailsKlienti(**value);
>>> > but they could be implemented in onPopupAction :
>>> > ------------------------------**------------------------------**
>>> ------------------------------**------------------------------**----------- -----
>>> > ClientMethod onPopupAction(popupName, action, value) [ Language =
>>> > javascript ]
>>> > {
>>> > switch(popupName) {
>>> > case 'Klienti':
>>> > if (action == "ok")
>>> > {var controller = zen('ctrlParent');
>>> > var controller1 = zen('source1');
>>> > controller1.setProperty('**modelId',value);
>>> > var nomer=controller1.**getDataByName('Nomer');
>>> > var name=controller1.**getDataByName('Name');
>>> > var danachenNomer=controller1.**getDataByName('DanachenNomer')**;
>>> > zen('NomerKlient').setValue(**nomer);
>>> > zen('NameKlient').setValue(**name);
>>> > zen('DanachenNomer').setValue(**danachenNomer);
>>> > controller.setDataByName('**Klient',value);
>>> > controller.setDataByName('**NomerKlient',nomer);
>>> > controller.setDataByName('**NameKlient',name);
>>> > controller.setDataByName('**DanachenNomer',danachenNomer);**}
>>> > break;
>>> > case 'NDok':
>>> > if (action == "ok") {....}
>>> > ........
>>> > ------------------------------**------------------------------**
>>> ------------------------------**------------------------------**------
>>> > ==============================**==============================**===
>>> > Also you can use ZenProxy Object to transfer all the data.
>>> > **Владо
>>> > On Friday, April 13, 2012 8:32:31 AM UTC-7, sebth wrote:
>>> > > Hi everybody,
>>> > > I have a popup which is displayed under different circumstances.
>>> This
>>> > > Popup return a Value of a user taken action. I´ve already
>>> > > "implemented" the onPopupAction(popupName, action, value). This
>>> works
>>> > > but setting a value into a page component is not that what i´d like
>>> to
>>> > > do.
>>> > > Event occurs -> Popup is Displayed -> User click on Button in the
>>> > > Popup -> the parent Window is notified on the PopupAction -> Capture
>>> > > the Value... here is an example of what i am think about.
>>> > > Method zenDoSomeThing() [ ZenMethod ] {
>>> > > If condition = true {
>>> > > &js<zenPage.jsOnShowDialog(**evt);>
>>> > > }
>>> > > }
>>> > > /// Display our own Dialog pass an Event
>>> > > ClientMethod jsOnShowDialog(evt) [ Language = javascript ]
>>> > > {
>>> > > var parms = new Object();
>>> > > parms.EVENT = 'FORMSAVECONFLICT';
>>> > > zenPage.launchPopupWindow(**zenLink('nwP.ZEN.Dialog.**UserDialog.cls'),
>>> > > 'FORMSAVECONFLICT','status,**scrollbars,resizable,width=**500,height=300',p arms);
>>> > > }
>>> > > /// if the event is received
>>> > > ClientMethod onPopupAction(popupName, action, value) [ Language =
>>> > > javascript ]
>>> > > {
>>> > > /// I dont want to call different methods based on the value wich
>>> is
>>> > > returned on the popupvalue
>>> > > }
>>> > > Is it possible to gather the Information onPopupAction() and use it
>>> > > direct in zenDoSomeThing()?
>>> > > Regards, Sebastian
>> --
>> You received this message because you are subscribed to the Google Groups
>> "InterSystems: Zen Community" group.
>> To post to this group, send email to InterSystems-ZEN@googlegroups.com
>> To unsubscribe from this group, send email to
>> InterSystems-ZEN-unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/InterSystems-ZEN?hl=en
>> Zen Community Terms and Conditions:
>> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...
> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to
> InterSystems-ZEN-unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:
> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...