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

Nathan Bubna commented on VELTOOLS-143:
---------------------------------------

Everything runs through the URI class now.  The URI class has one constructor 
for opaque urls that accepts a scheme (mailto), scheme-specific part (the email 
address) and a fragment (#foo).  And URIs are immutable, of course, so to set a 
query for an opaque URI, you will probably have to use the URI.create factory 
method, which takes the URL in string form, which negates a fair bit of the 
benefit of using the URI class under the covers.  That is probably best done in 
the if (opaque) section of LinkTool.createURI.   I don't favor it, but it's the 
best solution i can think of for now.  Maybe you can come up with a better idea?

Also, feel free to add a convenience method like $link.mailto($email), that 
creates an instance with mailto as the scheme, the $email as the 
scheme-specific part (stored as the path within LinkTool), and of course opaque 
set to true.  That would look a lot cleaner than $link.uri("mailto:$email";).
                
> LinkTool.uri() causes mailto: links to ignore parameters added using param() 
> method
> -----------------------------------------------------------------------------------
>
>                 Key: VELTOOLS-143
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-143
>             Project: Velocity Tools
>          Issue Type: Bug
>          Components: GenericTools
>    Affects Versions: 2.0
>         Environment: Velocity 1.7, Velocity Tools 2.0
>            Reporter: Christopher Schultz
>            Priority: Minor
>
> This worked in Velocity Tools 1.4.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to