mailto: URL's

Splash Forums Rewrite Users mailto: URL's

This topic contains 10 replies, has 3 voices, and was last updated by  fabmars 2 years, 12 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #24405

    fabmars
    Participant

    I noticed Rewrite 2.0.5 doesn’t support [h:outputLink value=”mailto:…”]. To be exact, and under the condition what’s after the mailto: is correctly URLencoded, the page will display with a link “mailto:null” !
    In the days of Rewrite 1.x, the string after the mailto: was kept.

    Of course, as usual I can work around it by using straight html in the facelet page [a href=”mailto:…]

    Though I had a look at the code, AddressBuilder creates a URI from what’s in the outputLink value.
    A mailto: is a valid URL, but it can’t be described as a URI (host, path, query, fragment are all null).

    So I’m wondering whether AddressBuilder shouldn’t just use URL’s and compile the AddressBuilder out of URLs {protocol, host, port, path, query, ref} instead of URIs {scheme, host, port, rawpath, rawquery, rawfragment}.

    WDYT?

    PS: note it’s remotely related to http://ocpsoft.org/support/topic/tel-scheme-telephone/ but it’s surprising the user didn’t stumble upon the same issue!

    #24472

    Hey Fabmars!

    I’d like to fix this, but I am about to get on a plane. I think that we should support this. Want to work on a patch to allow AddressBuilder to support these URLs?

    Please let me know. More soon!
    ~Lincoln

    #24574

    fabmars
    Participant

    Hi
    Sure BUT I have very litle time myself. The patch is obvious but I’m quite afraid of “unforeseen impacts”.
    I’ll try in the next days, but if there is no git pull req by August 23rd (start of my next hospitalization), you can consider I’ve failed to find time or a solution.

    #24575

    Hospitalization? I’m sorry, what’s going on? (if you feel like saying) – Feel free to submit the patch (pull request) at whatever state you’ve completed it, and we can try to continue.

    #24580

    fabmars
    Participant

    A leukemia. But I’m no usual patient, my two previous patches were submitted from the hospital already. Though this time is the last one and they’re gonna use the big guns on me, so I have to complete this patch before 🙂

    #24589

    Oh my goodness. I hope it goes well! I’ll be keeping you in my thoughts and sending you as much good energy as I can. You’ve been such a happy influence around here and I’m really appreciative of all your support and questions. I hope the big-guns means you’ll be OK afterwards!!

    #24607

    fabmars
    Participant

    I should be OK afterwards…
    OK patch done, that was easy. See pull request 124.

    #24622

    Hey Fabmars!

    That’s awesome! Thank you so much for your work on this. We will have a look at the pull request ASAP.

    Just some other side note: I really think that it would be a good idea to avoid using JSF components like h:outputLink where possible in such cases. Using them will increase you component tree size which impacts the overall performance of your application. You can typically use simple a links instead. However there are exceptions for that rule. Especially if you want to use the rendered attribute or something like this.

    However, thank you very much for you pull request. 🙂

    #24627

    Well, you could still use the <h:outputPanel> in the case of doing dynamic rendering. Thank you Fabien, and best of luck with your treatment! I’ll take care of this pull request ASAP.

    #24628

    BTW. Please let us know how it went 🙂

    #24642

    fabmars
    Participant

    @Christian: Yes sure, I am now avoiding useless JSF components where possible, but as I wrote previously, the codebase is a migration from JSF1.2 and I’m too lazy to review all the xhtmls 🙂 There’s no real customer behind this code. It’s for the website of the record label I founded, I’m the only programmer, I make it evolve on my free time and and even though I (used to) work for a major IT corp, I’m in the middle management and don’t “officially” code anymore…

    @lincoln: I should be “physically offline” most of September (I’m having a marrow transplant) and if I make it, I should be back with more Rewrite corner-cases by mid-October 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

Comments are closed.