Quick search:


How to make edit feedback in a differen language

When a peanut is created or updated using an EditDetailsPage, the SaveAction will try to convert the edited strings back to the internal data formats using stringconverters. If that does not fail, it lets the peanut validate the data. Eventual Error messages are displayed as edit feedback in the InformationPart.

You can override stringconversion error messages used by all stringconverters in all applications in the class StingConverter in the root classFolder. Or you can copy this class to an application classFolder to override it for that application only. For an example of the last, see example 10.

To override the stringconverters used for a specific page or part you can override the getStingConverter method. You probably first need to subclass the page or part class, see how to specialize a part of a page. Then you can instantiate a specific StringConverter subclass in the overriding method. It will also be used by all parts of the page or part.

Validation done by the peanut is usually delegated to a validator. You can override validator error messages used by all validators in all applications in the class ValueValidator in the root classFolder. Or you can copy this class to an application classFolder to override it for that application only. For an example of the last, see example 10.

Specific validation error messages may need to be factored out of the peanuts validateGetErrorString method and then overridden. This may require a code management scheme, see how to keep your application code separated from customization code.