Thank you Selwyn for generating this new feature, which i tested well
meaning with session values defined in the dialog's onDialogInitialize event.
However, i can't seem to locate a function that would alter/refresh the button's text
assuming i made change to session variables via ajax call back & proven the values indeed changed.
i can't seem to find an client side event that i can call to fire/update my button's text with the
latest session.variable value. i use after reset ?, after ajax call back etc.
appreciate comment.
Ken Tjia
Dialog Component - Referencing Session Variables on the Client Side - The Grid Component allows you to 'publish' session variables to the client side so that your client side expressions (e.g. show/hide, calc fields, etc.) can reference session variables. The same concept of 'publishing' session variables to the client-side did not previously exist for the Dialog component. Now, the Dialog also allows you to 'publish' the value of session variables.
The Dialog Builder now has a new property: Properties, Other, Published Session Variables where you can define the session variables you want to publish.
When the Dialog is executes, the values of the published session variables are stored in the Dialog Objects' _vars object.
For example, if you publish a session variable called 'VAR1', you can use the following Javascript to read its value (the name is always uppercase):
{dialog.object}._vars.SESSION.VAR1
The following example shows how you can set the text of a button control in the Dialog to the value of a session variable (session.var1).
The following code is in the onRenderComplete client-side event:
var sVar1 = '';
//check to see
if(typeof {dialog.object}._vars.SESSION.VAR1 != 'undefined') {
sVar1 = {dialog.object}._vars.SESSION.VAR1;
}
//set the innerHTML of button 'button_1'
if(sVar1 != '') $('{dialog.componentname}.V.R1.BUTTON_1').innerHTML = sVar1;
meaning with session values defined in the dialog's onDialogInitialize event.
However, i can't seem to locate a function that would alter/refresh the button's text
assuming i made change to session variables via ajax call back & proven the values indeed changed.
i can't seem to find an client side event that i can call to fire/update my button's text with the
latest session.variable value. i use after reset ?, after ajax call back etc.
appreciate comment.
Ken Tjia
Dialog Component - Referencing Session Variables on the Client Side - The Grid Component allows you to 'publish' session variables to the client side so that your client side expressions (e.g. show/hide, calc fields, etc.) can reference session variables. The same concept of 'publishing' session variables to the client-side did not previously exist for the Dialog component. Now, the Dialog also allows you to 'publish' the value of session variables.
The Dialog Builder now has a new property: Properties, Other, Published Session Variables where you can define the session variables you want to publish.
When the Dialog is executes, the values of the published session variables are stored in the Dialog Objects' _vars object.
For example, if you publish a session variable called 'VAR1', you can use the following Javascript to read its value (the name is always uppercase):
{dialog.object}._vars.SESSION.VAR1
The following example shows how you can set the text of a button control in the Dialog to the value of a session variable (session.var1).
The following code is in the onRenderComplete client-side event:
var sVar1 = '';
//check to see
if(typeof {dialog.object}._vars.SESSION.VAR1 != 'undefined') {
sVar1 = {dialog.object}._vars.SESSION.VAR1;
}
//set the innerHTML of button 'button_1'
if(sVar1 != '') $('{dialog.componentname}.V.R1.BUTTON_1').innerHTML = sVar1;