<HTML:SELECT/> tag: What are "title" and "titleKey" attributes for?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jerome_Iffrig
Posted On:   Wednesday, August 7, 2002 12:52 AM

Hi,


Struts HTML tags documentation describes the attributes “title” and “titleKey referes” as “The advisory title for the element”.

Does this mean they represent the empty option which would be chosen by default (e.g. “[PLEASE SELECT]”).


Basically is it the same as doing the following:
...



[PLEASE SELECT]

...



...


If not can anyone what are those attributes for? As I tried them out but cannot see where they are used


Thanks!

Re: <HTML:SELECT/> tag: What are "title" and "titleKey" attributes for?

Posted By:   Roeland_Lengers  
Posted On:   Wednesday, August 7, 2002 06:30 AM

Take a look at http://www.w3.org/TR/REC-html40/struct/global.html#adef-title. It explains that the title attirbute can be used for most HTML-elements to give "hints".

The attribute "title" just passes this on to the generated HTML, whilst the "titleKey" attribute will first retrieve the I18N message from a resourcebundle with key=titleKey, before passing the resulting 'title="localised hint"' to the browser.



Note that these attributes are not supported in struts 1.0.2.



Hope this helps.
About | Sitemap | Contact