Hi All,

the basic way to produce a link using struts seems to be to use the s:url
and s:a tags, e.g. to produce a link to a person you might use something
like

    <s:url var="personurl" action="showperson">
      <s:param name="personId" value="%{id}"/>
    </s:url>
    <s:a href="%{personurl}"><s:property value="%{firstname}"/></s:a>

This is ok but it does get repetitive if links to persons occur in many
JSPs, and if you want to change the format of these links (e.g. include
the lastname), you have to search and update all these repetitions.

Therefore, is it possible to factor out URL and link generation?

I suppose I could write a taglib with my own person element but that
seems a bit over the top to me.

Best regards, Jan
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |             email: j....@uea.ac.uk                                 |
 |             WWW:   http://www.cmp.uea.ac.uk/people/jtk             |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*

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

Reply via email to