Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.1, 5.0.18
    • Fix Version/s: 5.1.0.2
    • Component/s: None
    • Labels:
      None

      Description

      Tapestry should provide some way, configured via Tapestry-IoC, to provide URL rewriting.

        Activity

        Hide
        Thiago H. de Paula Figueiredo added a comment -

        Reopened because it needs to handle page link generation too. Thanks Andreas Andreou for warning me.

        Show
        Thiago H. de Paula Figueiredo added a comment - Reopened because it needs to handle page link generation too. Thanks Andreas Andreou for warning me.
        Hide
        Thiago H. de Paula Figueiredo added a comment -

        Added the missing link rewriting part. The same rules used for rewriting incoming requests are also used to rewrite links generated by ComponentEventLinkEncoder (i.e. any one using regular Tapestry link creationg like ComponentResources.create*Link()).

        Show
        Thiago H. de Paula Figueiredo added a comment - Added the missing link rewriting part. The same rules used for rewriting incoming requests are also used to rewrite links generated by ComponentEventLinkEncoder (i.e. any one using regular Tapestry link creationg like ComponentResources.create*Link()).
        Hide
        Thiago H. de Paula Figueiredo added a comment -

        Issue implemented and documented.

        Show
        Thiago H. de Paula Figueiredo added a comment - Issue implemented and documented.
        Hide
        Andreas Andreou added a comment -

        I fear there's a slight issue, because in my mind incoming request will need
        different RewriteRules than those used in linkencoder - and usually, those rules
        will have opposite effects and so they'll cancel each other...

        So, I took a look at the implementation and since no such distinction is being made
        all the rules are always applied

        PS. T4 split the process by having an encode and decode method - this isn't needed
        here (assuming that it will be possible to define different RewriteRules for each case)

        Show
        Andreas Andreou added a comment - I fear there's a slight issue, because in my mind incoming request will need different RewriteRules than those used in linkencoder - and usually, those rules will have opposite effects and so they'll cancel each other... So, I took a look at the implementation and since no such distinction is being made all the rules are always applied PS. T4 split the process by having an encode and decode method - this isn't needed here (assuming that it will be possible to define different RewriteRules for each case)
        Hide
        Thiago H. de Paula Figueiredo added a comment -

        Each rule will be applied, but each one can decide to really rewrite the URL/link or not. If you take a look at the tests (app5.services.AppModule), you see rules that only apply to incoming URL requests and ignore the others and rules that only apply only for generated links. And there is even one rule that applies to a single URL.

        I thought that it would be easier to have the same rewriting mechanism for both incoming URLs and generated links. As Tapestry 5.1.0.x is still an alpha, this can be changed if we decide otherwise.

        Show
        Thiago H. de Paula Figueiredo added a comment - Each rule will be applied, but each one can decide to really rewrite the URL/link or not. If you take a look at the tests (app5.services.AppModule), you see rules that only apply to incoming URL requests and ignore the others and rules that only apply only for generated links. And there is even one rule that applies to a single URL. I thought that it would be easier to have the same rewriting mechanism for both incoming URLs and generated links. As Tapestry 5.1.0.x is still an alpha, this can be changed if we decide otherwise.

          People

          • Assignee:
            Thiago H. de Paula Figueiredo
            Reporter:
            Thiago H. de Paula Figueiredo
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development