Package org.springframework.springfaces

Examples of org.springframework.springfaces.FacesWrapperFactory


    orderdBeans.addAll(BeanFactoryUtils
        .beansOfTypeIncludingAncestors(applicationContext, FacesWrapperFactory.class).entrySet());
    Collections.sort(orderdBeans, new OrderedMapEntryComparator());
    T rtn = delegate;
    for (Map.Entry<String, FacesWrapperFactory> entry : orderdBeans) {
      FacesWrapperFactory factory = entry.getValue();
      if (isFactorySupported(factory)) {
        T wrapper = (T) factory.newWrapper(this.typeClass, rtn);
        if (wrapper != null) {
          Assert.isInstanceOf(this.typeClass, wrapper, "FacesWrapperFactory " + entry.getValue()
              + " returned incorrect type ");
          if (this.logger.isDebugEnabled()) {
            this.logger.debug("Wrapping " + this.typeClass.getSimpleName() + " with " + wrapper.getClass()
View Full Code Here


  @SuppressWarnings({ "unchecked", "rawtypes" })
  public void shouldWrapInOrder() throws Exception {
    FacesContextSetter.setCurrentInstance(this.facesContext);
    setupApplicationContext(this.applicationContext);

    FacesWrapperFactory f1 = mock(FacesWrapperFactory.class, withSettings().extraInterfaces(Ordered.class));
    FacesWrapperFactory f2 = mock(FacesWrapperFactory.class, withSettings().extraInterfaces(Ordered.class));
    FacesWrapperFactory f3 = mock(FacesWrapperFactory.class, withSettings().extraInterfaces(Ordered.class));
    given(((Ordered) f1).getOrder()).willReturn(1);
    given(((Ordered) f2).getOrder()).willReturn(2);
    given(((Ordered) f3).getOrder()).willReturn(3);

    // Insert in reverse order
View Full Code Here

TOP

Related Classes of org.springframework.springfaces.FacesWrapperFactory

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.