On 11/16/05, Brian Sayatovic/AMIG <[EMAIL PROTECTED]> wrote: > > What is the "id" attribute in TagSupport for. Some have guessed its for > the HTML ID attribute, but nothign in TagSupport renders it. IN fact, when > Struts' own taglib needs to set the HTML ID attribute, the "styleId" > attribute of the tag is set instead. Why not use the inherited "id" > attribute instead? I can't find any documentation that says what it's used > for, nor why someone else shouldn't leverage it.
You're gonna love this one :-). In the very early days of Struts, different implementations of JSP (and particularly TagSupport) were buggy around how they dealt with the "id" attribute -- partially because the early specs were more than a little fuzzy on the required behavior. To guarantee consistent behavior, we had to use some other attribute instead, and chose to use "styleId" as a complement to "styleClass". Now, of course, the implementations are much more consistent -- but backwards compatibility breakage would occur if we tried to change the behavior of the tags. Regards, > Brian. Craig