diff --git a/src/asciidoc/web-mvc.adoc b/src/asciidoc/web-mvc.adoc index 95e471bc73..7ac6035da6 100644 --- a/src/asciidoc/web-mvc.adoc +++ b/src/asciidoc/web-mvc.adoc @@ -2039,7 +2039,7 @@ The following example demonstrates the use of `@InitBinder` to configure a public class MyFormController { **@InitBinder** - public void initBinder(WebDataBinder binder) { + protected void initBinder(WebDataBinder binder) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); @@ -2062,7 +2062,7 @@ controller-specific tweaking of the binding rules. public class MyFormController { **@InitBinder** - public void initBinder(WebDataBinder binder) { + protected void initBinder(WebDataBinder binder) { binder.addCustomFormatter(new DateFormatter("yyyy-MM-dd")); } diff --git a/src/asciidoc/web-portlet.adoc b/src/asciidoc/web-portlet.adoc index 91d7560857..9f0e95c9ad 100644 --- a/src/asciidoc/web-portlet.adoc +++ b/src/asciidoc/web-portlet.adoc @@ -1462,8 +1462,8 @@ The following example demonstrates the use of `@InitBinder` for configuring a public class MyFormController { @InitBinder - public void initBinder(WebDataBinder binder) { - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + protected void initBinder(WebDataBinder binder) { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); }