public class StringResourceModelMigration extends Object
StringResourceModel
's constructor:
new StringResourceModel(...);with the following snippet:
StringResourceModelMigration.of(...);and then use your IDE's Inline Method refactoring support to use the new fluent API.
Constructor and Description |
---|
StringResourceModelMigration() |
Modifier and Type | Method and Description |
---|---|
static StringResourceModel |
of(String resourceKey,
Component component,
IModel<?> model,
Object... parameters)
Deprecated.
use 'inline method' to get rid of the deprecation warning and complete the
migration to Wicket 7 API.
Original JavaDoc:
Creates a new string resource model using the supplied parameters.
The relative component parameter should generally be supplied, as without it resources can not be obtained from resource bundles that are held relative to a particular component or page. However, for application that use only global resources then this parameter may be null. The model parameter is also optional and only needs to be supplied if value substitutions are to take place on either the resource key or the actual resource strings. The parameters parameter is also optional and is used for substitutions. |
static StringResourceModel |
of(String resourceKey,
Component component,
IModel<?> model,
String defaultValue,
Object... parameters)
Deprecated.
use 'inline method' to get rid of the deprecation warning and complete the
migration to Wicket 7 API.
|
static StringResourceModel |
of(String resourceKey,
IModel<?> model,
Object... parameters)
Deprecated.
use 'inline method' to get rid of the deprecation warning and complete the
migration to Wicket 7 API.
|
static StringResourceModel |
of(String resourceKey,
IModel<?> model,
String defaultValue,
Object... parameters)
Deprecated.
use 'inline method' to get rid of the deprecation warning and complete the
migration to Wicket 7 API.
|
@Deprecated public static StringResourceModel of(String resourceKey, Component component, IModel<?> model, Object... parameters)
The relative component parameter should generally be supplied, as without it resources can not be obtained from resource bundles that are held relative to a particular component or page. However, for application that use only global resources then this parameter may be null.
The model parameter is also optional and only needs to be supplied if value substitutions are to take place on either the resource key or the actual resource strings.
The parameters parameter is also optional and is used for substitutions.
resourceKey
- The resource key for this string resourcecomponent
- The component that the resource is relative tomodel
- The model to use for property substitutionsparameters
- The parameters to substitute using a Java MessageFormat object@Deprecated public static StringResourceModel of(String resourceKey, Component component, IModel<?> model, String defaultValue, Object... parameters)
@Deprecated public static StringResourceModel of(String resourceKey, IModel<?> model, Object... parameters)
@Deprecated public static StringResourceModel of(String resourceKey, IModel<?> model, String defaultValue, Object... parameters)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.