Yes, I believe the document should be updated to add an anchor example.  As 
Dave mentioned, I'll file a JIRA ticket for that.

Explaining my other sentence, I saw that the extended class also supported the 
"location" and "parse" parameters in addition to "anchor."
However, the constructor for the ServletActionRedirectResult doesn't look at 
these, so I'm not sure if they're usable in <param> elements -- especially 
since "location" is the same thing as "actionName."

I just meant that these other parameters ought to be mentioned in the docs too, 
IF it turns out that they're usable.
Maybe a section could be added entitled:

Additional Parameters (Inherited from ServletRedirectResult)
* location - same as actionName (do not use).  The location to go to after 
execution.
* parse - boolean, true by default.  If set to false, the location param will 
not be parsed for Ognl expressions
* anchor - optional.  Also known as "fragment" or colloquially as "hash."  You 
can specify an anchor for a result.

On Jun 1, 2011, at 12:24 PM, Jason Pyeron - jpye...@pdinc.us wrote:

>> -----Original Message-----
>> From: struts....@spamgourmet.com
>> Sent: Wednesday, June 01, 2011 12:59
>> To: user@struts.apache.org
>> Subject: Re: Hash tags
>> 
>> I tried that first, but it yields 
>> "viewuser#userPreferences.action."  I found the answer by 
>> diving into the source code.  The key insight is that this is 
>> called an "anchor" (not a hash).
>> This works:
>> 
>> <result name="success" type="redirectAction">
>>  <param name="actionName">viewuser</param>
>>  <param name="anchor">userPreferences</param>
>> </result>
>> 
>> This document should be updated:
>> http://struts.apache.org/2.2.3/docs/redirect-action-result.html
> 
> To add an anchor example?
> 
>> 
>> The example at the bottom is clearly intended to be a 
>> "complete" example, but ignores the attributes supported by 
>> the extended class:
>> 
> http://struts.apache.org/2.2.3/struts2-core/apidocs/org/apache/struts2/dispatche
> r/ServletRedirectResult.html
> 
> Could you explain that statement?
> 
> 
> 
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -                                                               -
> - Jason Pyeron                      PD Inc. http://www.pdinc.us -
> - Principal Consultant              10 West 24th Street #100    -
> - +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
> -                                                               -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to