Package org.springframework.richclient.core

Examples of org.springframework.richclient.core.TitleConfigurable


    this.messageSource = messageSource;
  }

  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);
        }
      }
      catch (NoSuchMessageException e) {
        throw new BeanInitializationException("Unable to initialize bean " + name, e);
      }
View Full Code Here


    String messageCode = objectName + ".title";
    String message = "bogusTitle";

    EasyMock.expect(messageSource.getMessage(messageCode, null, Locale.getDefault())).andReturn(message);

    TitleConfigurable configurable = (TitleConfigurable) EasyMock.createMock(TitleConfigurable.class);
    configurable.setTitle(message);

    EasyMock.replay(messageSource);
    EasyMock.replay(configurable);

    configurer.configure(configurable, objectName);
View Full Code Here

    String objectName = "bogusTitleable";
    String messageCode = objectName + ".title";

    EasyMock.expect(messageSource.getMessage(messageCode, null, Locale.getDefault())).andReturn(null);

    TitleConfigurable configurable = (TitleConfigurable) EasyMock.createMock(TitleConfigurable.class);

    EasyMock.replay(messageSource);
    EasyMock.replay(configurable);

    configurer.configure(configurable, objectName);
View Full Code Here

TOP

Related Classes of org.springframework.richclient.core.TitleConfigurable

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.