[Webwork-devel] Updates
Brought to you by:
baldree,
rickardoberg
From: Rickard <ri...@xp...> - 2001-11-14 12:19:30
|
Hey A bunch of updates: * The RSS demo that Maurice put in has been vastly enhanced. Now it sports a pull down list that you can choose feed from. Three feeds currently. The RSS stuff now also properly handles the different versions of RSS. The initial version only handled 0.91, but I've added support for 1.0 as well (which is vastly superior to 0.91). The list of feeds is a RSS feed itself just "for the heck of it" :-) * (IMPORTANT!) All UI tags now have a "value" attribute that can be used to specify a WebWork expression where the selected value can be retrieved from. If it is not specified, then the "name" attribute is used as before. This will allow you to have one name for the field, while getting the value from somewhere else. Very useful. The UI components that already had a "value" attribute (select, checkbox, radiobutton) have been changed. The select/radiobutton attributes are now listKey/listValue instead, and checkbox now has a fieldValue attribute instead of the old value. Yes, this will break current code so be sure to update your JSP's accordingly. The requirement to have a separate value attribute was so great (IMHO) that this change was necessary before 1.0. * There's a new i18n tag, as outlined in previous post. It will allow you to specify a particular resource bundle to be used by the text tag. Example from text.jsp: <webwork:i18n name="'webwork.action.test.i18n.Shop'"> <webwork:text name="'main.title'"/> </webwork:i18n> So, even if the current action does not have the above bundle associated with it, you can still access it by using the i18n tag to "scope" the text tag. The primary use of this is to access resource bundles that are not associated with any particular action, i.e. view-specific bundles. The retrieval of the bundle will be done by first trying to evaluate "texts(<bundle name>)" on the stack, so if you have an action on the stack and it has a custom getTexts() implementation (such as reading bundles from a database), that will be used. Otherwise the usual ResourceBundle.getBundle() method will be used, although *through* ActionSupport.getTexts() so that the proper locale is used. I hope ya'll find these changes relevant and good. Let me know otherwise, or if you have any suggestions for improvement. /Rickard -- Rickard Öberg Software Development Specialist xlurc - Xpedio Linköping Ubiquitous Research Center Author of "Mastering RMI" Email: ri...@xp... |