If JSTL (along with EL) had not happened then I agree that developing the <bean:message> tag would be a good idea - simplest solution would have been a <bean:arg> tag so that you could do something like the following...
<html:message key="msg.hello"> <bean:arg> <bean:write name="user" property="userName"/> </bean:arg> </html:message> However much of the functionality in the bean and logic tags is now provided by JSTL - including messages with the above type of functionality... <fmt:message key="msg.hello"> <fmt:param> <bean:write name="user" property="userName"/> </fmt:param> </fmt:message> As you also point out you can also use "EL" to achieve what you want with the <bean:message> tag without having to resort to scriptlets.In my mind theres a difference not developing further tags whose functionality have been replaced by JSTL (mostly bean and logic) and the those which haven't (html, tiles, nested). These two examples both come in that category. Niall ----- Original Message ----- From: "Leon Rosenberg" <[EMAIL PROTECTED]> Sent: Monday, August 29, 2005 6:37 PM > James Mitchell wrote: > > Well, the taglibs are more or less feature complete. So > any changes > > are really "extensions" or "nice-to-have". > > I think this is the part of the equation I don't necessarily agree > with... I think saying they are feature-complete in terms of what they > were meant to be years ago *is* accurate. > They do what was set out to provide, After some reasoning, I must say that I must disagree with James statement. A very simple example. I need to greet the user in his language. I will help a message like this in my messages_en.properties: msg.hello=Hello {0} And in messages_de.properties msg.hello=Hallo {0} Now I have my page, the right locale and the user object. Without EL, how can I ever right the proper greeting? The only way today would be: <bean:define id="username" type="java.lang.String" name="user" property="userName" toScope="page"/> <bean:message key="msg.hello" arg0="<%=username%>"/> Imho the taglib can't be considered complete, as long as there are <%= %> in the jsp. It would be so simple to provider the message tag with argXName/argXProperty similar to name/property attributes it already has and parallel to arg0-arg5 it already has. <bean:message key="msg.hello" arg0Name="user" arg0Property="userName"/> Would it hurt someone? I don't think so. And there are a lot of examples where really simple functionality is missing in struts tags. For example compare tags don't allow second bean/property as value. Other thing. How many struts-tags actually do log? Maybe 20%? Shouldn't it be unified? If there are people, who are ready to implement this, why wouldn't you let them? :-) Regards Leon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]