public function registerLink(
            string $elmId, 
            string $uriPattern, 
            array  $uriParams, 
            string $event    = self::EVENT_CLIC, 
            string $targetId = null)
    {
        $selector = '$("#' . $elmId . '").';
        $replaces = [];
        foreach ($uriParams as $key => $value) {
            $replaces[] = "replace('" . $key . "', " . $selector . $value . ')';
        }
        $target = $targetId ? ", '" . $targetId . "'" : '';
        $callOptions = "'" . $uriPattern . "'." . implode('.', $replaces) . $target;
        $script  = $selector . $event;
        $script .= '(function(e){e.preventDefault();$.ajaxCall(' . $callOptions . ')});';
        return $this->registerScript($script);
    }