cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Easy Calling of XUI Dialogs

spunzmann1
3-Visitor

Easy Calling of XUI Dialogs


Hi everybody,



I was wondering if there is a easy way to call XUI dialogs directly from ACL? Currently I'm using the "_xmldlg" package. But if I try to get the selected value of a combo box or something, then only the initial value will be returned, so it seems as if the "_xmldlg::getDialogDocument" only return the initial document! Any Idea to fix this, or an easier way to call and recieve values from an XUI dialog?



Thanks in advance



Sascha
2 REPLIES 2

Hi Sascha--


I usually handle this by setting an ACL variable in my XUI
script code using the Acl AOM object. For example you might have something like
this:


<button label="OK">

<script type="text/javascript" <br="/>ev:event="DOMActivate">

// get dlg doc so we can access
the user specified value to return

dlgdoc =
Application.event.target.ownerDocument;


// set ACL variable for later
use

Acl.execute("$somefield = " +
dlgdoc.getElementById("someField").firstChild.nodeValue +
");


// close
dialog

var dlgwin =
Application.event.view.window;

dlgwin.close();

</script>

</button>

This will set the ACL variable $somefield to the text found
in the textbox with the ID "someField". After the dialog closes, that variable
should be available to other ACL scripts.



--Clay






From: Sascha Punzmann

Sent: Friday, March 10, 2006 5:20
AM
To: adepters@arbortext.com
Subject: Easy Calling of XUI
Dialogs



Hi everybody,

face=sans-serif size=2>I was wondering if there is a easy way to call XUI
dialogs directly from ACL? Currently I'm using the "_xmldlg" package. But if I
try to get the selected value of a combo box or something, then only the initial
value will be returned, so it seems as if the "_xmldlg::getDialogDocument" only
return the initial document! Any Idea to fix this, or an easier way to call and
recieve values from an XUI dialog?


Thanks in advance

Sascha
>> To unsubscribe from the list, send an email to
listmanager@maillist.arbortext.com with the following in the body: unsubscribe
adepters - For additional information on the adepters list (how to subscribe or
unsubscribe etc), send an email to: listmanager@maillist.arbortext.com with the
following in the body: info Adepters - You may also go to forums.arbortext.com,
enter the Adepters folder and change your subscription options and
preferences.>>

Don't know whether it's easier and better but when using a XUI from ACL
this is what I normally do

1. open the XUI file using xuiDoc = doc_open(xuiFile, ...)
2. create the XUI window from the file you opened using
xuiWin=window_create('xui', 0, xuiDoc);
3. close the XUI file (set modified=off for not getting prompted for
save) using doc_close(xuiDoc);
4. now you have a handle to the window and you can:
5. add callbacks using window_add_callback(xuiWindow, "destroy",
"windowDestroyCallback");
6. add callbacks to buttons in the winddow using
dlgitem_add_callback(xuiWindow, "btnOK", "btnPressedCallback");
7. get and set values from any control in your xui using dlgitem*
routines. These actually work along the lines of the old VR-files. See
Epic Help on dlgitem* routines for more information.

If you need better example code, let me know, I can send you a small
sample.

Rob
+---------------------------+
| Rob In der Maur |
| Principal Consultant |
| Global Services Arbortext |
| PTC The Netherlands |
| Office: +31 346 56 02 07 |
| Mobile: +31 646 32 42 49 |
+---------------------------+
Announcements