Stripes

Add setAnchor() to OnwardResolution

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: Release 1.5
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
    None

Description

UrlBuilder supports URL anchors but there is no possibility to set an anchor to a Resolution. I've added a setAnchor() method to OnwardResolution and the supplied anchor is passed to the UrlBuilder in OnwardResolution#getUrl(Locale).

I will attach a patch against 1.5b1 (as trivial as it is

Activity

Hide
Tim Fennell added a comment - 17/Apr/08 6:54 AM

My only question is whether this really belongs in OnwardResolution, or only down in RedirectResolution. It does no hard in Onward but can it make sense to Forward with an anchor?

Show
Tim Fennell added a comment - 17/Apr/08 6:54 AM My only question is whether this really belongs in OnwardResolution, or only down in RedirectResolution. It does no hard in Onward but can it make sense to Forward with an anchor?
Hide
Sebastian Beigel added a comment - 17/Apr/08 7:00 AM

I was wondering too I've never used parameters on the ForwardResolution either, so I thought it could be useful there. But the only place I'm using it is on RedirectResolutions.

Show
Sebastian Beigel added a comment - 17/Apr/08 7:00 AM I was wondering too I've never used parameters on the ForwardResolution either, so I thought it could be useful there. But the only place I'm using it is on RedirectResolutions.
Hide
Sebastian Beigel added a comment - 17/Apr/08 10:00 AM

One more thing: It would be great if there was a <s:anchor name="foo" /> to set/include an anchor to a link constructed with <s:link /> or <s:url />!

Show
Sebastian Beigel added a comment - 17/Apr/08 10:00 AM One more thing: It would be great if there was a <s:anchor name="foo" /> to set/include an anchor to a link constructed with <s:link /> or <s:url />!
Hide
Ben Gunter added a comment - 18/Apr/08 11:19 PM

Since the UrlBuilder and getUrl(Locale) are implemented in OnwardResolution, it was easiest to add [gs]etAnchor in the superclass. What I did is make them protected so that subclasses can override them and make them public if anchors make sense for that subclass. RedirectResolution does just that.

Show
Ben Gunter added a comment - 18/Apr/08 11:19 PM Since the UrlBuilder and getUrl(Locale) are implemented in OnwardResolution, it was easiest to add [gs]etAnchor in the superclass. What I did is make them protected so that subclasses can override them and make them public if anchors make sense for that subclass. RedirectResolution does just that.

People

Vote (0)
Watch (0)

Dates

  • Created:
    17/Apr/08 3:08 AM
    Updated:
    04/Jan/11 2:49 PM
    Resolved:
    18/Apr/08 11:19 PM