protected function initData()
    {
        if (empty($this->data)) {
            return;
        }

        if (is_array($this->data) || $this->data instanceof JsExpression) {
            $this->clientOptions['data'] = $this->data;
        } elseif (is_string($this->data)) {
            $this->clientOptions['data'] = new JsExpression($this->data);
        } else {
            throw new InvalidConfigException('The "data" option can only be a string or an array');
        }
    }