Examples of TobagoConfigImpl


Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

    super.setUp();

    // Tobago specific extensions

    TobagoConfigImpl tobagoConfig = new TobagoConfigImpl();
    Theme theme = new MockTheme("default", "Default Mock Theme", Collections.<Theme>emptyList());
    Theme one = new MockTheme("one", "Mock Theme One", Arrays.asList(theme));
    Map<String, Theme> availableThemes = new HashMap<String, Theme>();
    availableThemes.put(theme.getName(), theme);
    availableThemes.put(one.getName(), one);
    tobagoConfig.setAvailableThemes(availableThemes);
    tobagoConfig.resolveThemes();
    tobagoConfig.initProjectState(servletContext);
    tobagoConfig.initDefaultValidatorInfo();
    servletContext.setAttribute(TobagoConfig.TOBAGO_CONFIG, tobagoConfig);

    final ClientProperties clientProperties = new ClientProperties();
    clientProperties.setTheme(one);
    clientProperties.setLocale(Locale.ENGLISH);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

public class ThemeParserTest {

  @Test
  public void test() throws IOException, SAXException {
    TobagoConfigImpl config = new TobagoConfigImpl();
    ThemeBuilder themeBuilder = new ThemeBuilder(config);
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    Enumeration<URL> urls = classLoader.getResources("theme-config.xml");

    ThemeParser parser = new ThemeParser();
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

      addDefaultValidators(context.getFacesContext(), (EditableValueHolder) component);
    }
  }

  public static void addDefaultValidators(FacesContext context, EditableValueHolder component) {
    TobagoConfigImpl tobagoConfig = (TobagoConfigImpl) TobagoConfig.getInstance(context);
    Map validatorInfoMap = tobagoConfig.getDefaultValidatorInfo();
    if (validatorInfoMap.isEmpty()) {
      return;
    }
    Validator[] validators = component.getValidators();
    if (validators.length > 0) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

      addDefaultValidators(context.getFacesContext(), (EditableValueHolder) component);
    }
  }

  public static void addDefaultValidators(FacesContext context, EditableValueHolder component) {
    TobagoConfigImpl tobagoConfig = (TobagoConfigImpl) TobagoConfig.getInstance(context);
    Map validatorInfoMap = tobagoConfig.getDefaultValidatorInfo();
    if (validatorInfoMap.isEmpty()) {
      return;
    }
    Validator[] validators = component.getValidators();
    if (validators.length > 0) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

public class ThemeParserUnitTest {

  @Test
  public void test() throws IOException, SAXException, ParserConfigurationException, URISyntaxException {
    final TobagoConfigImpl config = new TobagoConfigImpl();
    final ThemeBuilder themeBuilder = new ThemeBuilder(config);
    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    Enumeration<URL> urls = classLoader.getResources("theme-config.xml");

    final TobagoConfigParser parser = new TobagoConfigParser();
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

public class ThemeParserUnitTest {

  @Test
  public void test() throws IOException, SAXException, ParserConfigurationException, URISyntaxException {
    final TobagoConfigImpl config = new TobagoConfigImpl();
    final ThemeBuilder themeBuilder = new ThemeBuilder(config);
    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    Enumeration<URL> urls = classLoader.getResources("theme-config.xml");

    final TobagoConfigParser parser = new TobagoConfigParser();
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

    super.setUp();

    // Tobago specific extensions

    final TobagoConfigImpl tobagoConfig = new TobagoConfigImpl();
    final Theme theme = new MockTheme("default", "Default Mock Theme", Collections.<Theme>emptyList());
    final Theme one = new MockTheme("one", "Mock Theme One", Arrays.asList(theme));
    final Map<String, Theme> availableThemes = new HashMap<String, Theme>();
    availableThemes.put(theme.getName(), theme);
    availableThemes.put(one.getName(), one);
    tobagoConfig.setAvailableThemes(availableThemes);
    tobagoConfig.resolveThemes();
    tobagoConfig.initProjectState(servletContext);
    tobagoConfig.initDefaultValidatorInfo();
    servletContext.setAttribute(TobagoConfig.TOBAGO_CONFIG, tobagoConfig);

    final ClientProperties clientProperties = new ClientProperties();
    clientProperties.setTheme(one);
    clientProperties.setLocale(Locale.ENGLISH);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

      addDefaultValidators(context.getFacesContext(), (EditableValueHolder) component);
    }
  }

  public static void addDefaultValidators(final FacesContext context, final EditableValueHolder component) {
    final TobagoConfigImpl tobagoConfig = (TobagoConfigImpl) TobagoConfig.getInstance(context);
    final Map validatorInfoMap = tobagoConfig.getDefaultValidatorInfo();
    if (validatorInfoMap.isEmpty()) {
      return;
    }
    final Validator[] validators = component.getValidators();
    if (validators.length > 0) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

      addDefaultValidators(context.getFacesContext(), (EditableValueHolder) component);
    }
  }

  public static void addDefaultValidators(final FacesContext context, final EditableValueHolder component) {
    final TobagoConfigImpl tobagoConfig = (TobagoConfigImpl) TobagoConfig.getInstance(context);
    final Map validatorInfoMap = tobagoConfig.getDefaultValidatorInfo();
    if (validatorInfoMap.isEmpty()) {
      return;
    }
    final Validator[] validators = component.getValidators();
    if (validators.length > 0) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.config.TobagoConfigImpl

      addDefaultValidators(context.getFacesContext(), (EditableValueHolder) component);
    }
  }

  public static void addDefaultValidators(final FacesContext context, final EditableValueHolder component) {
    final TobagoConfigImpl tobagoConfig = (TobagoConfigImpl) TobagoConfig.getInstance(context);
    final Map validatorInfoMap = tobagoConfig.getDefaultValidatorInfo();
    if (validatorInfoMap.isEmpty()) {
      return;
    }
    final Validator[] validators = component.getValidators();
    if (validators.length > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.