Issue Details (XML | Word | Printable)

Key: WW-1517
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Joe Germuska
Reporter: Ted Husted
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Struts 2

Streamlined link tag for single-parameter links

Created: 21/Nov/06 02:47 AM   Updated: 02/May/08 05:25 AM
Return to search
Component/s: Plugin - Tags
Affects Version/s: 2.0.1
Fix Version/s: Future

Issue Links:
Duplicate
 


 Description  « Hide
The url and param tags are very flexibile, but the most common case of a single parameter link.

        <s:url id="url" action="HelloWorld" includeContext="false">
            <s:param name="request_locale">en</s:param>
        </s:url>
        <s:a href="%{url}">English</s:a>

is verbose (to the point of being silly).

It is worthwhile to have a streamlined link tag, a al Struts 1, to cover the single-parameter case.

        <s:link action="HelloWorld" param="request_locale" paramValue="en">English</s:link>

In the interest of brevity, I would suggest that includeContext default to "false" for the single-parameter case.

Or, with a message resource key, from

<a href="<s:url action="Login_input"/>">%{getText('"sign_on"')}</a>

to

 <s:link action="login_input" key="sign_on" />



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.