jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@voyager.apg.more.net>
Subject Re: common naming for referential attributes
Date Tue, 16 Oct 2001 02:56:04 GMT
How about "fooId", its short and to the point.

Tim Dawson wrote:
> 
> When you have an attribute in a tag whose value is used as a reference key
> passed to "findAttribute()", what should we call that tag's attribute?
> 
> In the i18n taglib, I've used both "fooAttribute" and "fooRef".  I've also
> seen "fooKey" suggested.
> 
> For example, the bundle tag allows a locale to be defined. This can be
> defined with a runtime expression value, or with a key to look up (often in
> the user's session).  If a runtime expression, this could look like:
> 
> <i18n:bundle locale="<%= Locale.US %>" basename="foo.bar.baz" />
> 
> (though of course it woudn't be hardcoded in a real app)
> 
> For the key, this currently reads:
> 
> <i18n:bundle localeAttribute="user.locale" basename="foo.bar.baz" />
> 
> but could just as easily read
> 
> <i18n:bundle localeRef="user.locale" basename="foo.bar.baz" />
> 
> or
> 
> <i18n:bundle localeKey="user.locale" basename="foo.bar.baz" />
> 
> I had originally started using the "ref" suffix with the message tag.
> 
> <i18n:bundle id="baz" basename="foo.bar.baz"/>
> <i18n:message bundleRef="baz" key="blah" />
> 
> But I see now this is inconsistent with what I set up for localeAttribute.
> 
> Any suggestions as to what the standard should be?
> 
> Thanks,
> 
> Tim

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

Mime
View raw message