Package org.apache.struts.util

Examples of org.apache.struts.util.MessageResourcesFactory


  protected MessageResources resources;

  @BeforeMethod
  public void beforeClass()
  {
    MessageResourcesFactory factory = new PropertyMessageResourcesFactory();
    resources = factory.createResources("org.strecks.web.form.ApplicationMessages");
  }
View Full Code Here


  protected MessageResources resources;

  @BeforeMethod
  public void beforeClass()
  {
    MessageResourcesFactory factory = new PropertyMessageResourcesFactory();
    resources = factory.createResources("org.strecks.message.TestMessageResources");
  }
View Full Code Here

  }

  protected MessageResources getMessageResources(String bundleName) {
    MessageResources mr = (MessageResources) CoreServlet.getServlet().getServletContext().getAttribute(getBundle());
    if(mr == null) {
      MessageResourcesFactory fact = new ExceptionMessageResourcesFactory();
      mr = fact.createResources("com.adito.errors.ApplicationResources");
    }
    return mr;
  }
View Full Code Here

        /*
         * Load the application store resources - these may be changed by the
         * application store when new descriptors are loaded
         */

        MessageResourcesFactory messageResourcesFactory = new CoreMessageResourcesFactory(getClass().getClassLoader());
        applicationStoreResources = (CoreMessageResources) messageResourcesFactory
                        .createResources("com.adito.applications.store.ApplicationResources");
        applicationStoreResources.setReturnNull(false);

        // finally setup the scheduler
        this.getServletContext().setAttribute(StoppableTimer.NAME, new StoppableTimer());
View Full Code Here

            String factory = mrcs[i].getFactory();

            MessageResourcesFactory.setFactoryClass(factory);

            MessageResourcesFactory factoryObject =
                MessageResourcesFactory.createFactory();

            factoryObject.setConfig(mrcs[i]);

            MessageResources resources =
                factoryObject.createResources(mrcs[i].getParameter());

            resources.setReturnNull(mrcs[i].getNull());
            resources.setEscape(mrcs[i].isEscape());
            getServletContext().setAttribute(mrcs[i].getKey()
                + config.getPrefix(), resources);
View Full Code Here

        this.pageContext = null;
        this.request = null;
    }

    protected void putBundleInScope(int scope, boolean returnNull) {
        MessageResourcesFactory factory =
            MessageResourcesFactory.createFactory();
        MessageResources messageResources =
            new PropertyMessageResources(factory,
                "org.apache.struts.taglib.sample");
View Full Code Here

    private MessageResources createMessageResources() {
        MessageResources messageResources;
        MessageResourcesConfig messageResConfig = new MessageResourcesConfig();
        String factory = messageResConfig.getFactory();
        MessageResourcesFactory.setFactoryClass(factory);
        MessageResourcesFactory factoryObject = MessageResourcesFactory.createFactory();
        messageResources = factoryObject.createResources("ApplicationResources.properties");
        return messageResources;
    }
View Full Code Here

  try {
            String oldFactory =
                MessageResourcesFactory.getFactoryClass();     
            if (factory != null)
                MessageResourcesFactory.setFactoryClass(factory);
            MessageResourcesFactory factoryObject =
                MessageResourcesFactory.createFactory();
            application = factoryObject.createResources(value);
            MessageResourcesFactory.setFactoryClass(oldFactory);
      value = getServletConfig().getInitParameter("null");
      if (value == null)
    value = "true";
      if (value.equalsIgnoreCase("true") ||
View Full Code Here

  try {
            String oldFactory =
                MessageResourcesFactory.getFactoryClass();     
            if (factory != null)
                MessageResourcesFactory.setFactoryClass(factory);
            MessageResourcesFactory factoryObject =
                MessageResourcesFactory.createFactory();
            application = factoryObject.createResources(value);
            MessageResourcesFactory.setFactoryClass(oldFactory);
      value = getServletConfig().getInitParameter("null");
      if (value == null)
    value = "true";
      if (value.equalsIgnoreCase("true") ||
View Full Code Here

  try {
            String oldFactory =
                MessageResourcesFactory.getFactoryClass();     
            if (factory != null)
                MessageResourcesFactory.setFactoryClass(factory);
            MessageResourcesFactory factoryObject =
                MessageResourcesFactory.createFactory();
            application = factoryObject.createResources(value);
            MessageResourcesFactory.setFactoryClass(oldFactory);
      value = getServletConfig().getInitParameter("null");
      if (value == null)
    value = "true";
      if (value.equalsIgnoreCase("true") ||
View Full Code Here

TOP

Related Classes of org.apache.struts.util.MessageResourcesFactory

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.