diff --git a/xdocs/article2_4.xml b/xdocs/article2_4.xml index 7d447474f..bdf36b583 100644 --- a/xdocs/article2_4.xml +++ b/xdocs/article2_4.xml @@ -116,14 +116,13 @@ by format type) to ExtendedMessageFormat: new ExtendedMessageFormat("EIN: {0,ein}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory())); As expected, this will render a String EIN "AA-9999" as: "EIN: AA-9999". -
+

If we wanted to trigger the EIN masking code, we could trigger that in the format pattern:

 new ExtendedMessageFormat("EIN: {0,ein,#}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory()));
 
This should render "AA-9999" as: "EIN: AA-####". -

-

+

You can also use ExtendedMessageFormat to override any or all of the built-in formats supported by java.text.MessageFormat. Finally, note that because ExtendedMessageFormat extends MessageFormat it should work in most