
/*

  SmartClient Ajax RIA system
  Version v9.0p_2021-05-01/LGPL Deployment (2021-05-01)

  Copyright 2000 and beyond Isomorphic Software, Inc. All rights reserved.
  "SmartClient" is a trademark of Isomorphic Software, Inc.

  LICENSE NOTICE
     INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF
     ISOMORPHIC SOFTWARE LICENSE TERMS. If you have received this file
     without an accompanying Isomorphic Software license file, please
     contact licensing@isomorphic.com for details. Unauthorized copying and
     use of this software is a violation of international copyright law.

  DEVELOPMENT ONLY - DO NOT DEPLOY
     This software is provided for evaluation, training, and development
     purposes only. It may include supplementary components that are not
     licensed for deployment. The separate DEPLOY package for this release
     contains SmartClient components that are licensed for deployment.

  PROPRIETARY & PROTECTED MATERIAL
     This software contains proprietary materials that are protected by
     contract and intellectual property law. You are expressly prohibited
     from attempting to reverse engineer this software or modify this
     software for human readability.

  CONTACT ISOMORPHIC
     For more information regarding license rights and restrictions, or to
     report possible license violations, please contact Isomorphic Software
     by email (licensing@isomorphic.com) or web (www.isomorphic.com).

*/
isc.defineClass("RobotServerPicker", "Window").addProperties({

autoCenter: true,
autoSize: true, 
isModal: true,
title: "Select Robot Server",


formConstructor: "DynamicForm",
formDefaults: {
    width: 300,
    numCols: 2,
    colWidths: [150, "*"],
    defaultItems: [
        {name: "robotServerURL", title: "Robot Server URL", defaultValue: "http://127.0.0.1:50080"},
//        {name: "robotServerURL", title: "Robot Server URL", defaultValue: "http://10.10.1.161:50080"},
        {name: "next", type: "button", title: "Next", click : "form.creator.nextClick()", startRow: true},
        {name: "cancel", type: "button", title: "Cancel", click: "form.creator.hide()", endRow: false, startRow: false}
    ]
},

myAutoChildren: ["form"],

initWidget : function () {
    this.Super("initWidget", arguments);
    this.form = this.createAutoChild("form");
    this.addItem(this.form);
},

nextClick : function () {
    var robotServerURL = this.form.getValue("robotServerURL");
    window.robotServerURL = robotServerURL;
    this.hide();
    this.fireCallback("robotServerSelected", "robotServerURL", [robotServerURL]);
}

});
isc.RobotServerPicker.registerStringMethods({
    robotServerSelected: "robotServerURL"
});
