/** * Gets the string that this string resource model currently represents. * <p> * Note: This method is used only if this model is used directly without assignment to a * component, it is not called by the assignment wrapper returned from * {@link #wrapOnAssignment(Component)}. */ @Override protected final String load() { return getString(); }
/** * Gets the string that this string resource model currently represents. * <p> * Note: This method is used only if this model is used directly without assignment to a * component, it is not called by the assignment wrapper returned from * {@link #wrapOnAssignment(Component)}. */ @Override protected final String load() { return getString(); }
/** * Gets the string currently represented by this model. The string that is returned may vary for * each call to this method depending on the values contained in the model and an the parameters * that were passed when this string resource model was created. * * @return The string */ public final String getString() { return getString(component); }
/** * Gets the string currently represented by this model. The string that is returned may vary for * each call to this method depending on the values contained in the model and an the parameters * that were passed when this string resource model was created. * * @return The string */ public final String getString() { return getString(component); }
@Override protected String getTitleText() { return new StringResourceModel("label.title.delete.draft").getString(); } }
@Override protected String load() { if (StringResourceModel.this.component != null) { // ignore assignment if component was specified explicitly return StringResourceModel.this.getObject(); } else { return getString(component); } }
public static void addErrorMessage(Component component, String messageKey, IModel<?> messageModel) { if (messageKey != null && component != null) { component.error(new StringResourceModel(messageKey, messageModel).getString()); } logger.error("Obrigatório informar component e messageKey em addErrorMessage, ignorando chamada..."); }
public PageExpiredErrorPage() { super(); info(new StringResourceModel("session-expired", this, null).getString()); } }
@Override public Serializable getSettings() { settings.addTranslation("select.files.link", settings.isAllowMultipleFiles() ? new StringResourceModel("select.files.link", getComponent(), null).getString() : settings.isUploadAfterSelect() ? new StringResourceModel("upload.file.link", getComponent(), null).getString() : new StringResourceModel("select.file.link", getComponent(), null).getString() ); return settings; }
public Object getDisplayValue(Object object) { return new StringResourceModel( ((OverviewPolicy) object).name(), WCSAdminPage.this, null) .getString(); }
public Object getDisplayValue(Object object) { final String name = ((TargetLayout) object).name(); return new StringResourceModel("tl." + name, WCSRequestBuilderPanel.this, null) .getString(); }
@Override protected void onComponentTag(ComponentTag tag) { tag.put("title", downTitle.getString()); if (items.indexOf(entry) == items.size() - 1) { tag.put("style", "visibility:hidden"); } else { tag.put("style", "visibility:visible"); } } };
@Override protected void definePluginSettings(StringBuffer buffer) { super.definePluginSettings(buffer); String saveCallback = behavior.getSaveCallback(); String cancelCallback = behavior.getCancelCallback(); buffer.append(",\n\tsave_onwicketsavecallback: " + saveCallback); buffer.append(",\n\tsave_onwicketcancelcallback: " + cancelCallback); buffer.append(",\n\twicket_updating_mess: '" + JavaScriptUtils.escapeQuotes(saveMessage.getString()) + "'"); } }
@Override protected void onComponentTag(ComponentTag tag) { tag.put("title", upTitle.getString()); if (items.indexOf(entry) == 0) { tag.put("style", "visibility:hidden"); } else { tag.put("style", "visibility:visible"); } } };
public OAuthPage() { String notStarted = new StringResourceModel("oAuth.notStarted", this, null).getString(); add(new PopupCloseLink<String>("close")); add(new Label("oAuthResultLabel", notStarted)); }
private static String translateType(Component component, String type) { JcrNodeTypeModel nodeTypeModel = new JcrNodeTypeModel(type); if (nodeTypeModel.getObject() != null) { return new TypeTranslator(nodeTypeModel).getTypeName().getObject(); } else if (component != null) { return new StringResourceModel(type, component, null, type).getString(); } else { return type; } }
@Override public Object getDisplayValue(final String type) { JcrNodeTypeModel nodeTypeModel = new JcrNodeTypeModel(type); if (nodeTypeModel.getObject() != null) { return new TypeTranslator(nodeTypeModel).getTypeName().getObject(); } else { return new StringResourceModel(type, component, null, type).getString(); } }
public String getDisplayObject() { String categoryLabel = new StringResourceModel("add-category", PermissionsFolderWorkflowPlugin.this, null, new ResourceBundleModel(HIPPO_TEMPLATES_BUNDLE_NAME, this.getObject())).getString(); return String.format("%s (%s)", categoryLabel, this.getObject()); //categoryLabel;// }
@Override public void validate(Form<?> form) { if (adminGroupChoice.isEnabled()) { adminGroupChoice.updateModel(); if (adminGroupChoice.getModelObject().isEmpty()) { form.error(new StringResourceModel("noAdminGroups", getPage(), null).getString()); } } } }
private void postInit() { if (!isAuthenticatedAsAdmin() && !isNew) { // global layer groups only editable by full admin if (getPublishedInfo().getWorkspace() == null) { // disable all form components but cancel setInputEnabled(false); info(new StringResourceModel("globalLayerGroupReadOnly", this, null).getString()); } } }