struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rene Gielen" <>
Subject [S2] Proposal: Povide an integrated reference link feature for UI tags
Date Fri, 17 Aug 2007 09:33:31 GMT
In many (but not only) CRUD applications you have to deal with referencing
model objects, which have an associated view as well. For example, if you
have an editContact view, you have a "company" select box in place
referencing the company model entity, which has it's own editCompany view.

A IMO common pattern in this case is to provide a direct link to the view
for the referenced model object. For example, you could provide a small
link symbol behind the select box, representing an <a href="..." /> to the
view for the referenced entity object.

Another common usecase could be to provide a complex selection popup with
sorting / filtering, if a simple select box would not be suitable. This
could happen with a not editable textbox, being filled from the popup
window you access from the link symbol beside the textbox.

Due to the structure of out templates, it might get quite complicated to
render such a link symbol outside the tag. If you use a table based
template for example, you would want to render the symbol within the <td>
encapsulating the <select> element.

I would propose the following extension to our UI tags:
1. provide a referenceLink attribute
2. provide a referenceSymbol attribute
3. provide a referenceText attribute

The rendering of a reference link would be triggered by the existence of a
referenceLink attribute. The refernceSymbol attribute could have a common
default pointing to a provided image, similar to tooltip. You could
optionally provide another symbol or the keyword "none" if you dont like
to have an image rendered.
If the referenceText attribute is given, it render as the alt tag of the
image, if not symbol attribute is set to none. In this case, it would be
the text presented by an alternatively rendered <a href="...">.
Our themes would provide a default view implementation of this feature,
leaving it open to users to easily customize it their own need with simple
template editing, since the needed attributes are provided in the tag

Comments highly appreciated.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message