Package org.springframework.context.support

Examples of org.springframework.context.support.DefaultMessageSourceResolvable


        this.formModel = formModel;
        this.messageSource = messageSource;
    }

    protected void processComponent(String propertyName, JTextComponent textComponent) {
        String prompt = messageSource.getMessage(new DefaultMessageSourceResolvable(getMessageKeys(formModel,
                propertyName), ""), Locale.getDefault());

        if (StringUtils.hasText(prompt)) {
            PromptSupport.setFontStyle(Font.ITALIC, textComponent);
            PromptSupport.setPrompt(prompt, textComponent);
View Full Code Here


      }
    }
  }

  protected String fetchExtraText(MessageSource messageSource, String propertyName) {
    return messageSource.getMessage(new DefaultMessageSourceResolvable(getExtraTextKeys(propertyName), propertyName
        + "." + textKey), Locale.getDefault());
  }
View Full Code Here

  public Object postProcessAfterInitialization(Object bean, String name) throws BeansException {
    if (bean instanceof LabelConfigurable) {
      LabelConfigurable configurable = (LabelConfigurable) bean;

      try {
        String label = messageSource.getMessage(new DefaultMessageSourceResolvable(name + "." + LABEL_KEY),
            Locale.getDefault());

        if (StringUtils.hasText(label)) {
          configurable.setLabelInfo(LabelInfo.valueOf(label));
        }
View Full Code Here

  public Object postProcessAfterInitialization(Object bean, String name) throws BeansException {
    if (bean instanceof TitleConfigurable) {
      TitleConfigurable configurable = (TitleConfigurable) bean;

      try {
        String title = messageSource.getMessage(new DefaultMessageSourceResolvable(name + "." + TITLE_KEY),
            Locale.getDefault());

        if (StringUtils.hasText(title)) {
          configurable.setTitle(title);
        }
View Full Code Here

    }

   
    public String resolveExceptionCaption(Throwable throwable) {
        String[] messagesKeys = getMessagesKeys(throwable, ".caption");
        return messageSourceAccessor.getMessage(new DefaultMessageSourceResolvable(
                messagesKeys, messagesKeys[0]));
    }
View Full Code Here

    public Object createExceptionContent(Throwable throwable) {
        String[] messagesKeys = getMessagesKeys(throwable, ".description");
        String[] parameters = new String[]{
            formatMessage(throwable.getMessage())
        };
        return messageSourceAccessor.getMessage(new DefaultMessageSourceResolvable(
                messagesKeys, parameters, messagesKeys[0]));
    }
View Full Code Here

            messageKeyList.add(getId() + keySuffix);
        }
        messageKeyList.add("jdicEmailNotifierErrorReporter" + keySuffix);
        messageKeyList.add("emailNotifierErrorReporter" + keySuffix);
        String[] messagesKeys = messageKeyList.toArray(new String[messageKeyList.size()]);
        return messageSourceAccessor.getMessage(new DefaultMessageSourceResolvable(
                messagesKeys, params, messagesKeys[0]));
    }
View Full Code Here

            {
                this.headerKeys = new String[2];
                this.headerKeys[0] = getPropertyName() + ".header";
                this.headerKeys[1] = getPropertyName();
            }
            this.header = RcpSupport.getMessage(new DefaultMessageSourceResolvable(this.headerKeys, null,
                    this.headerKeys[this.headerKeys.length - 1]));
        }
        // JTableHeader has a reusable defaultHeaderRenderer on which the default height must be correct.
        // when painting, the columns headers are processed in order and height is being calculated,
        // if label is null or empty string header height is 4 and thus leaves us with a very small
View Full Code Here

    add(getMessageCode(e.getConstraint()),
        new Object[] { e.getParameter() }, e.toString());
  }

  public void add(String code, Object[] args, String defaultMessage) {
    MessageSourceResolvable resolvable = new DefaultMessageSourceResolvable(
        new String[] { code }, args, defaultMessage);
    if (logger.isDebugEnabled()) {
      logger.debug("Adding resolvable: " + resolvable);
    }
    this.args.add(resolvable);
View Full Code Here

    visitorSupport.invokeVisit(this, c.getPredicate());
  }

  private MessageSourceResolvable handleParameterizedBinaryPredicate(
      ParameterizedBinaryConstraint p) {
    MessageSourceResolvable resolvable = new DefaultMessageSourceResolvable(
        new String[] { getMessageCode(p.getConstraint()) },
        new Object[] { p.getParameter() }, p.toString());
    return resolvable;
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.support.DefaultMessageSourceResolvable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.