FR
Hello,
I added optionbuttons in my page, but unfortunatly this doesn"t seems to work...
Like said in the ARIS Script Help, I've added an OptionGroup before the options buttons, but no matter what I do, I can't select the one which is not selected by default...
I can't find anything helping in the forum or in the scripting help, so if anyone know how to switch from an optionbutton to another, I'll be very grateful !
Here is an example of script I use to test the scripting possibilities
var loc = Context.getSelectedLanguage(); var user = ArisData.getActiveUser(); var db = ArisData.getActiveDatabase(); var filter = ArisData.ActiveFilter(); // Filtre actif var filter_guid = filter.GUID(); // GUID du filtre actif var result = Dialogs.showDialog(new myDialog(), Constants.DIALOG_TYPE_WIZARD, "Création/Suppression de relations"); ////////////////////////////////////////////// Fonctions ////////////////////////////////////// function myDialog() { // all member functions except for getPages can access the property "dialog" of the dialog class. Type is "UserDialog" (see help). // examples: // - Get the page with the specified index (e.g. 0): this.dialog.getPage(0) // - Define the list of visible wizard pages (e.g. 0,1): this.dialog.setActiveWizardPages([0,1]) // returns DialogTemplate[] // non-optional var createRelationObjectName; var symbList = new Array(); symbList[0] = ["Function","Cluster"]; symbList[1] = ["obj1","obj2"];//[["obj1","obj2","obj3"],["obj4","obj5","obj6"]]; this.getPages = function() { /********* 1er écran *********/ var iDialogTemplate1 = Dialogs.createNewDialogTemplate(600, 200, "Creation of a relation"); iDialogTemplate1.ComboBox(10, 120, 200, 40, symbList[0], "SYMB_LIST_1"); iDialogTemplate1.OptionGroup("OPTIONGROUP"); iDialogTemplate1.OptionButton(10,30,400,30,"create","OPTION_0"); iDialogTemplate1.OptionButton(220,30,400,30,"delete","OPTION_1"); //actions iDialogTemplate1.CancelButton(); /********* 2nd écran *********/ var iDialogTemplate2 = Dialogs.createNewDialogTemplate(400, 200, "Validation"); iDialogTemplate2.Text(10, 30, 1600, 40, "", "TEXT_2_2"); //actions iDialogTemplate2.CancelButton(); iDialogTemplate2.PushButton(10, 170, 200, 28, "add a new relation", "BUTTON_NEW"); return [iDialogTemplate1, iDialogTemplate2]; } // initialize dialog pages (are already created and pre-initialized with static data from XML or template) // parameter: Array of DialogPage // see Help: DialogPage // user can set control values // optional this.init = function(aPages) { } // returns true if the page is in a valid state. In this case "Ok", "Finish", or "Next" is enabled. // called each time a dialog value is changed by the user (button pressed, list selection, text field value, table entry, radio button,...) // pageNumber: the current page number, 0-based this.isInValidState = function(pageNumber) { return true; } // called when the page is displayed // pageNumber: the current page number, 0-based // optional this.onActivatePage = function(pageNumber) { } // returns true if the "Finish" or "Ok" button should be visible on this page. // pageNumber: the current page number, 0-based // optional. if not present: always true this.canFinish = function(pageNumber) { return true; } // returns true if the user can switch to another page. // pageNumber: the current page number, 0-based // optional. if not present: always true this.canChangePage = function(pageNumber) { return true; } // returns true if the user can switch to next page. // called when the "Next" button is pressed and thus not suitable for activation/deactivation of this button // can prevent the display of the next page // pageNumber: the current page number, 0-based // optional. if not present: always true this.canGotoNextPage = function(pageNumber) { return true; } // returns true if the user can switch to previous page. // called when the "Back" button is pressed and thus not suitable for activation/deactivation of this button // can prevent the display of the previous page // pageNumber: the current page number, 0-based // optional. if not present: always true this.canGotoPreviousPage = function(pageNumber) { return true; } // called after "Ok"/"Finish" has been pressed and the current state data has been applied // can be used to update your data // pageNumber: the current page number // bOK: true=Ok/finish, false=cancel pressed // optional this.onClose = function(pageNumber, bOk) { } // the result of this function is returned as result of Dialogs.showDialog(). Can be any object. // optional this.getResult = function() { return null; } this.OPTIONGROUP_selChanged = function(dlgValue) { //try something } this.SYMB_LIST_1_selChanged = function() { var symbListRange = this.dialog.getPage(0).getDialogElement("SYMB_LIST_1").getValue(); createRelationObjectName = symbList[1][symbListRange]; this.dialog.getPage(1).getDialogElement("TEXT_2_2").setText("selected object : "+createRelationObjectName); } this.BUTTON_NEW_pressed = function() { //this.dialog.setDlgFocus(0); KO //this.dialog.getPage(0).setDlgFocus(0); KO this.dialog.setActiveWizardPages([0]); } }