public function isAjax($ajax=null)
    {
        if (isset($ajax)) {
            $this->ajax = (bool) $ajax;
            return $this;
        }
        else {
            return $this->ajax;
        }
    }