util.js

util.js contains a number of utility functions to help you update your web pages with javascript data (such as might be returned from the server).

You can use it outside of DWR because (with the exception of useLoadingMessage()) it does not depend on the rest of DWR to function. You can download a DWR Util with the DWR war file and then extract it from /dwr/dwr/util.js.

All engine.js functions have the dwr.util prefix.

The 4 basic page manipulation functions: getValue[s]() and setValue[s]() work on most HTML elements except tables, lists and images. getText() works with select lists.

To edit tables see addRows() and removeAllRows(). To edit lists (both select lists and ul, ol lists) see addOptions() and removeAllOptions().

There is also a page of utilities that didn't make it into dwr.util proper. They may evolve into something more useful, they may solve a niche need that you have, but they're not general purpose enough to warrant the network time for everyone.

The complete list of utilities looks like this: