It would be useful to have an 'alt' attribute on <bean:message> tag. eg.

  <bean:message key="blah" alt="DefaultLabel"/>

There are two uses:
  • In case Struts fails to find the message/resource, it can display the default label (and display a warning on the console).
  • For design-time tools (eg. Dreamweaver), it will be easier for the tools to display some meaningful mock-up labels at design-time.
Similarly, for <bean:write>, we can have
 
  <bean:write name="blah" property="blah" mock="MockLabel"/>

What do you think?

--
John Yu                       Scioworks Technologies
e: [EMAIL PROTECTED]         w: +(65) 873 5989
w: http://www.scioworks.com  m: +(65) 9782 9610

Reply via email to