[ 
https://issues.apache.org/jira/browse/WICKET-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15801456#comment-15801456
 ] 

Tomasz Dziurko commented on WICKET-6301:
----------------------------------------

The simplest form (without taking "Subject" part population) it looks really 
simple. Final version should have subject feature so it would become a little 
more complex.

Java code:


public class MailtoLink extends ExternalLink {

    private static String MAIL_TO_PREFIX = "mailto:";;

    public MailtoLink(String id, IModel<String> href) {
        super(id, new Model<String>() {
            @Override
            public String getObject() {
                return MAIL_TO_PREFIX + href.getObject();
            }
        }, href);
    }

}

Question is: do you want such component in Wicket codebase? Is so, I can work 
on a final version, it not that's also ok :) I simply do not want to spend time 
on a final version if there is no plan to incorporate it in the framework.

> MailtoLink component allowing to use mailto property in link HTML element.
> --------------------------------------------------------------------------
>
>                 Key: WICKET-6301
>                 URL: https://issues.apache.org/jira/browse/WICKET-6301
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Tomasz Dziurko
>            Priority: Minor
>
> I would like to add a new link-like component that allows to create empty 
> e-mail to given address e-mail specified in "mailto" element. It would 
> produce html similar to presented below:
> <a href="mailto:[email protected]?Subject=Hello%20again"; target="_top">Send 
> Mail</a>
> We have created something like this in our current project and I thought 
> about adding it to the Wicket components base.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to