DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36037





------- Additional Comments From [EMAIL PROTECTED]  2005-12-01 18:16 -------
I'm glad I searched the enhancement bugs before I added me own! I've written a
class that I use for exactly the same thing, except that it wraps an existing
ActionForward object, and so it's IMO less intrusive than the existing proposal.

I'm going to attach my utility class. Feel free to do whatever you want with
it... I'd really like to see something like this in the org.apache.struts.util
package.

My class extends ActionForward and you can create a new one using a constructor
which takes an existing ActionForward. It adds the methods "addQueryData" and
"setAnchor" (similar to the VelocityTools' LinkTool). Finally, it overrides the
getPath method to return the appropriate String.

A typical usage would be something like this:

return new ForwardBuilder(mapping.findForward("success"))
           .addQueryData("id", myObj.getId())
           .setAnchor("actions")
           ;

It handles mappings that already contain query strings, user-specified encoding,
etc.

Let me know what you guys think.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to