Return-Path: Delivered-To: apmail-incubator-click-dev-archive@minotaur.apache.org Received: (qmail 62893 invoked from network); 22 May 2009 08:46:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 May 2009 08:46:57 -0000 Received: (qmail 79035 invoked by uid 500); 22 May 2009 08:47:10 -0000 Delivered-To: apmail-incubator-click-dev-archive@incubator.apache.org Received: (qmail 78999 invoked by uid 500); 22 May 2009 08:47:10 -0000 Mailing-List: contact click-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: click-dev@incubator.apache.org Delivered-To: mailing list click-dev@incubator.apache.org Received: (qmail 78989 invoked by uid 99); 22 May 2009 08:47:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 08:47:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 08:47:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 89C82234C004 for ; Fri, 22 May 2009 01:46:45 -0700 (PDT) Message-ID: <813675809.1242982005552.JavaMail.jira@brutus> Date: Fri, 22 May 2009 01:46:45 -0700 (PDT) From: "Adrian A. (JIRA)" To: click-dev@incubator.apache.org Subject: [jira] Commented: (CLK-543) SimpleLink control. In-Reply-To: <744381139.1241091870663.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CLK-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711996#action_12711996 ] Adrian A. commented on CLK-543: ------------------------------- >How about developing some conventions about appending the context path to ExternalLink and updating the >Javadoc to make it more generalised. Most important of course, would be the functionality, so if it includes the above snippet than it would be an improvement to the actual situation. Because of the "historical naming" however, many users won't "guess" to use it. Of course, a much better approach would be to refactor e.g. AbstractLink to Link (and make it non-abstract). Since it's abstract, users don't use it directly, so most of them won't be affected. IMHO Click should be as intuitive as possible, and in the case of a link, there's nothing more intuitive than "Link" :). > SimpleLink control. > ------------------- > > Key: CLK-543 > URL: https://issues.apache.org/jira/browse/CLK-543 > Project: Click > Issue Type: New Feature > Components: extras > Reporter: Adrian A. > > There doesn't seem to be any "simple link" control in Click to be able to point to an arbitrary URL (internal but external too). > There's now the ExternalLink but it's just too specific :( - extending it would conflict with it's name (maybe a rename would be better). > In many cases there's no distinction in the application between an internal an external URL (e.g. because the external might be a subdomain). > Another problem is that AbstractLink is can't be used directly for these simple cases (being abstract). > Basically a SimpleLink code would look like ExternalLink, but it would have this additional snippet after L:106: > > String ctxPath = getContext().getRequest().getContextPath(); > if(!getTargetPath().contains("://")) { > buffer.append(ctxPath); > } > > This would allow to use only one control, and in the application logic, depending on the target, to let the control itself render the required context path if needed. > Thank you, > A. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.