    //@include lib_Class.js

    importPackage(Packages.de.elo.ix.client);

    /**
     * Tool to execute registered functions.
     *
     *
     * @author ELO Digital Office GmbH
     *
     * @elojc
     *
     */
    sol.define("sol.dev.jc.ExecuteRf", {
      singleton: true,

      /**
       * @private
       * @property {de.elo.client.scripting.dialog.GridDialog} dialog
       */

      /**
       * @private
       * @property {de.elo.client.scripting.dialog.TextField} rfName
       */

      /**
       * @private
       * @property {de.elo.client.scripting.dialog.TextArea} rfParams
       */

      /**
       * Excecuted from button event
       */
      execute: function () {
        var me = this,
            rfName, rfParams, result;

        rfName = archive.getUserOption("EloJ.S.Script.sol.dev.jc.ExecuteRf.rfName", "");
        rfParams = archive.getUserOption("EloJ.S.Script.sol.dev.jc.ExecuteRf.rfParams", "");

        if (me.showDlg(rfName, rfParams)) {
          archive.setUserOption("EloJ.S.Script.sol.dev.jc.ExecuteRf.rfName", me.rfName.text);
          archive.setUserOption("EloJ.S.Script.sol.dev.jc.ExecuteRf.rfParams", me.rfParams.text);

          result = sol.common.IxUtils.execute(me.rfName.text, me.getParamsAsObject());
          if (result) {
            //resultStr = JSON.stringify(result, null, 2);
            //resultStr = resultStr.replace(/(?:\r\n|\r|\n)/g, '<br/>');
            //workspace.showInfoBox(me.getText("sol.dev.jc.ExecuteRf.resultTitle"), resultStr);
            me.showResponseDlg(result);
          }
        }
      },

      /**
       * @private
       * @param {String} rfName
       * @param {String} rfParams
       * @return {Object}
       */
      showDlg: function (rfName, rfParams) {
        var me = this,
            panel;

        me.dialog = workspace.createGridDialog(me.getText("sol.dev.jc.ExecuteRf.dialogTitle"), 10, 12);
        me.dialog.dialogId = "sol.dev.jc.ExecuteRf.dialog";

        panel = me.dialog.gridPanel;

        panel.addLabel(1, 2, 3, me.getText("sol.dev.jc.ExecuteRf.labelName"));
        panel.addLabel(1, 4, 3, me.getText("sol.dev.jc.ExecuteRf.labelParam"));
        me.rfName = panel.addTextField(4, 2, 7);
        me.rfParams = panel.addTextArea(4, 4, 7, 8);

        panel.setGrowing(null, [4]);

        me.rfName.text = rfName;
        me.rfParams.text = rfParams;

        me.rfName.addChangeEvent("solDevJcExecuteInputChanged");
        me.rfParams.addChangeEvent("solDevJcExecuteInputChanged");

        me.checkInput();

        return me.dialog.show();
      },

      /**
       * @private
       * @param {Object} response
       */
      showResponseDlg: function (response) {
        var me = this,
            dlg = workspace.createGridDialog(me.getText("sol.dev.jc.ExecuteRf.resultTitle"), 10, 12),
            responseStr = JSON.stringify(response, null, 2),
            textarea;

        dlg.dialogId = "sol.dev.jc.ExecuteRf.response";
        dlg.gridPanel.setGrowing([1], [1]);
        textarea = dlg.gridPanel.addTextArea(1, 1, 10, 12);
        textarea.text = responseStr;
        textarea.setEditable(false);

        dlg.show();
      },

      /**
       * @private
       * @param {String} key
       * @return {String}
       */
      getText: function (key) {
        return utils.getText("sol.dev.client", key);
      },

      /**
       * @private
       * @return {Object}
       */
      getParamsAsObject: function () {
        var me = this;

        if (!me.rfParams.text || (me.rfParams.text.trim().length() <= 0)) {
          return {};
        }

        try {
          return JSON.parse(String(me.rfParams.text));
        } catch (ex) {

        }
        return null;
      },

      /**
       * @private
       */
      checkInput: function () {
        var me = this,
            validName = me.checkRfName(),
            validParams = me.checkRfParams();

        if (validName && validParams) {
          me.dialog.setStatusNormal("");
        } else if (!validName) {
          me.dialog.setStatusRed(me.getText("sol.dev.jc.ExecuteRf.notEmptyName"));
        } else if (!validParams) {
          me.dialog.setStatusRed(me.getText("sol.dev.jc.ExecuteRf.notValidParams"));
        }
      },

      /**
       * @private
       * @return {Boolean}
       */
      checkRfName: function () {
        var me = this;
        return (me.rfName.text && (me.rfName.text.trim().length() > 0));
      },

      /**
       * @private
       * @return {Boolean}
       */
      checkRfParams: function () {
        var me = this,
            obj = me.getParamsAsObject();

        return !!obj;
      }

    });

    /**
     * @private
     * @member sol.dev.jc.ExecuteRf
     */
    function solDevJcExecuteInputChanged() {
      sol.dev.jc.ExecuteRf.checkInput();
    }