/** * @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. * <p> * 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. * <p> * The parameters parameter is also optional and is used for substitutions. * * @param resourceKey * The resource key for this string resource * @param model * The model to use for property substitutions * @param parameters * The parameters to substitute using a Java MessageFormat object */ @Deprecated @SuppressWarnings(value = "javadoc") public static StringResourceModel of(final String resourceKey, final IModel<?> model, final Object... parameters) { return new StringResourceModel(resourceKey).setModel(model).setParameters(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. <p> 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. <p> 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. <p> The parameters parameter * is also optional and is used for substitutions. * * @param resourceKey The resource key for this string resource * * @param component The component that the resource is relative to * * @param model The model to use for property substitutions * * @param parameters The parameters to substitute using a Java MessageFormat object */ @Deprecated @SuppressWarnings(value = "javadoc") public static StringResourceModel of(final String resourceKey, final Component component, final IModel<?> model, final Object... parameters) { return new StringResourceModel(resourceKey, component).setModel(model).setParameters( parameters); }
final String defaultValue, final Object... parameters) return new StringResourceModel(resourceKey).setModel(model) .setDefaultValue(defaultValue) .setParameters(parameters);
final IModel<?> model, final String defaultValue, final Object... parameters) return new StringResourceModel(resourceKey, component).setModel(model) .setDefaultValue(defaultValue) .setParameters(parameters);
protected ChallengeResponseDialog createOrGetResetDocumentDialog() { if (resetDocumentDialog == null) { IModel<String> documentNameModel = PropertyModel.of(getModel(), "document.name"); resetDocumentDialog = new ChallengeResponseDialog("resetDocumentDialog", new StringResourceModel("ResetDocumentDialog.title", this), new StringResourceModel("ResetDocumentDialog.text", this).setModel(getModel()) .setParameters(documentNameModel), documentNameModel); resetDocumentDialog.setConfirmAction(this::actionResetDocument); } return resetDocumentDialog; }
protected Label getOrCreatePositionInfoLabel() { if (numberOfPages == null) { numberOfPages = new Label("numberOfPages", new StringResourceModel("PositionInfo.text", this).setModel(getModel()) .setParameters( PropertyModel.of(getModel(), "firstVisibleUnitIndex"), PropertyModel.of(getModel(), "lastVisibleUnitIndex"), PropertyModel.of(getModel(), "unitCount"), LambdaModel.of(() -> getModelObject().getDocumentIndex() + 1), PropertyModel.of(getModel(), "numberOfDocuments"))) { private static final long serialVersionUID = 7176610419683776917L; { setOutputMarkupId(true); setOutputMarkupPlaceholderTag(true); } @Override protected void onConfigure() { super.onConfigure(); setVisible(getModelObject().getDocument() != null); } }; } return numberOfPages; }
new StringResourceModel("DeleteProjectDialog.title", this), new StringResourceModel("DeleteProjectDialog.text", this) .setModel(selectedProject).setParameters(projectNameModel), projectNameModel)); deleteProjectDialog.setConfirmAction((target) -> {
new StringResourceModel("DeleteProjectDialog.title", this), new StringResourceModel("DeleteProjectDialog.text", this) .setModel(selectedProject).setParameters(projectNameModel), projectNameModel)); deleteProjectDialog.setConfirmAction((target) -> {
remergeDocumentDialog = new ChallengeResponseDialog("remergeDocumentDialog", new StringResourceModel("RemergeDocumentDialog.title", this), new StringResourceModel("RemergeDocumentDialog.text", this).setModel(getModel()) .setParameters(documentNameModel), documentNameModel);
remergeDocumentDialog = new ChallengeResponseDialog("remergeDocumentDialog", new StringResourceModel("RemergeDocumentDialog.title", this), new StringResourceModel("RemergeDocumentDialog.text", this).setModel(getModel()) .setParameters(documentNameModel), documentNameModel);