Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WebWork has very advanced type conversion support thanks to XWork. This section should provide enough information to help you get started. For more details please consult Type Conversion for more information.

A Simple Example

Type conversion is great for situations where you need to turn a String in to a more complex object. Because the web is type-agnostic (everything is a String in HTTP), WebWork's type conversion features are very useful. For instance, if you were prompting a user to enter in coordinates in the form of a String ("3, 22"), you could have WebWork do the conversion both from String to Point and from Point to String.

...