You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ted Husted <hu...@apache.org> on 2007/08/17 21:03:36 UTC

Re: [S2] Proposal: Povide an integrated reference link feature for UI tags

If I understand the use case, in my own applications, we done things
like add a separate button to the page to do things like edit or add a
company. (Are we distinguishing between insert and update?) It is a
common UI need.

In the case of select controls, some applications handle this sort of
thing with a meta-item, like "add new item" that is part of the list.
I can remember elder versions of Quicken doing this, though I note
later versions have moved to buttons and menu bar items for adding or
editing items.

I can see how adding the feature to the template might be useful.
Though, in the case of editing items in an enterprise application, the
notion of user roles can come into play. Some users might be
authorized to add items, and others might not.

-Ted.

On 8/17/07, Rene Gielen <gi...@it-neering.net> wrote:
> 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
> model.
>
> Comments highly appreciated.
>
> Regards,
> Rene

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [S2] Proposal: Povide an integrated reference link feature for UI tags

Posted by Rene Gielen <gi...@it-neering.net>.
Ted,

The usecase I was thinking of originally is actually a little different
from the one you described below, but both would be accessible through a
technical solution as described by the proposal.

My usecase could be titled "fast navigation", simply helping the user to
access related entities in either view or edit mode with a single click.
If you think of an CRM app, if you view a contact it is very likely the
next thing you want to do is view it's company information detail, found
in another view. And of course, since finally tabbed browsing has hit
the massed, you may want to have the reference a "real" html link, for
accessing the "open in new tab" feature of your browser.

There are even more usecases to think of, e.g. a complex chooser popup
if a select box / autocompleter is not detailed or flexible enough. Or
simply opening a detailed help popup.

Since the the referenceLink attribute would be processed as an
expression, you could easily provide the actual link by an action
property, based on context, role or whatever.

Regard,
- Rene

Ted Husted schrieb:
> If I understand the use case, in my own applications, we done things
> like add a separate button to the page to do things like edit or add a
> company. (Are we distinguishing between insert and update?) It is a
> common UI need.
> 
> In the case of select controls, some applications handle this sort of
> thing with a meta-item, like "add new item" that is part of the list.
> I can remember elder versions of Quicken doing this, though I note
> later versions have moved to buttons and menu bar items for adding or
> editing items.
> 
> I can see how adding the feature to the template might be useful.
> Though, in the case of editing items in an enterprise application, the
> notion of user roles can come into play. Some users might be
> authorized to add items, and others might not.
> 
> -Ted.
> 
> On 8/17/07, Rene Gielen <gi...@it-neering.net> wrote:
>> 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
>> model.
>>
>> Comments highly appreciated.
>>
>> Regards,
>> Rene
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org