Examples of RendererFactory


Examples of org.apache.isis.viewer.json.viewer.representations.RendererFactory

        final RepresentationType representationType = RepresentationType.TYPE_LIST;
        init(representationType);

        final Collection<ObjectSpecification> allSpecifications = getSpecificationLoader().allSpecifications();

        final RendererFactory rendererFactory = rendererFactoryRegistry.find(representationType);

        final TypeListReprRenderer renderer = (TypeListReprRenderer) rendererFactory.newRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.with(allSpecifications).includesSelf();

        return responseOfOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.representations.RendererFactory

        final RepresentationType representationType = RepresentationType.DOMAIN_TYPE;
        init(representationType);

        final ObjectSpecification objectSpec = getSpecificationLoader().loadSpecification(domainType);

        final RendererFactory rendererFactory = rendererFactoryRegistry.find(representationType);

        final DomainTypeReprRenderer renderer = (DomainTypeReprRenderer) rendererFactory.newRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.with(objectSpec).includesSelf();

        return responseOfOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.representations.RendererFactory

        if (objectMember == null || objectMember.isOneToManyAssociation()) {
            throw JsonApplicationException.create(HttpStatusCode.NOT_FOUND);
        }
        final OneToOneAssociation property = (OneToOneAssociation) objectMember;

        final RendererFactory rendererFactory = rendererFactoryRegistry.find(representationType);

        final PropertyDescriptionReprRenderer renderer = (PropertyDescriptionReprRenderer) rendererFactory.newRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.with(new ParentSpecAndProperty(parentSpec, property)).includesSelf();

        return responseOfOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.representations.RendererFactory

        if (objectMember == null || objectMember.isOneToOneAssociation()) {
            throw JsonApplicationException.create(HttpStatusCode.NOT_FOUND);
        }
        final OneToManyAssociation collection = (OneToManyAssociation) objectMember;

        final RendererFactory rendererFactory = rendererFactoryRegistry.find(representationType);

        final CollectionDescriptionReprRenderer renderer = (CollectionDescriptionReprRenderer) rendererFactory.newRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        renderer.with(new ParentSpecAndCollection(parentSpec, collection)).includesSelf();

        return responseOfOk(renderer, Caching.ONE_DAY).build();
    }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.RendererFactory

  private void _logNoRenderer(UIXRenderingContext context)
  {
    if (_LOG.isWarning())
    {
      RendererManager manager = context.getRendererManager();
      RendererFactory factory = manager.getFactory(getNamespaceURI());

      if (factory == null)
      {
        _LOG.warning("No RendererFactory registered for components in namespace"
                     + getNamespaceURI());
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.RendererFactory

    @Override
    public RendererFactory getFactory(String namespace)
    {
      // First, check to see if we have already created a
      // proxy RendererFactory for this namespace
      RendererFactory factory = (RendererFactory)ArrayMap.get(_proxyFactories,
                                                              namespace);
      if (factory != null)
        return factory;

      // If we don't have a factory yet, see if the
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.RendererFactory

  private void _logNoRenderer(UIXRenderingContext context)
  {
    if (_LOG.isWarning())
    {
      RendererManager manager = context.getRendererManager();
      RendererFactory factory = manager.getFactory(getNamespaceURI());

      if (factory == null)
      {
        _LOG.warning("NO_RENDERERFACTORY_REGISTERED_COMPONENT", getNamespaceURI());
      }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.RendererFactory

    @Override
    public RendererFactory getFactory(String namespace)
    {
      // First, check to see if we have already created a
      // proxy RendererFactory for this namespace
      RendererFactory factory = (RendererFactory)ArrayMap.get(_proxyFactories,
                                                              namespace);
      if (factory != null)
        return factory;

      // If we don't have a factory yet, see if the
View Full Code Here

Examples of org.apache.tiles.renderer.RendererFactory

        TilesRequestContextFactory requestContextFactory =
            (TilesRequestContextFactory) createFactory(configuration,
                REQUEST_CONTEXT_FACTORY_INIT_PARAM);
        requestContextFactory.init(configuration);

        RendererFactory rendererFactory =
            (RendererFactory) createFactory(configuration,
                RENDERER_FACTORY_INIT_PARAM);

        AttributeEvaluator evaluator = (AttributeEvaluator) createFactory(
                configuration, ATTRIBUTE_EVALUATOR_INIT_PARAM);

        if (evaluator instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) evaluator)
                    .setApplicationContext(context);
        }

        if (evaluator instanceof TilesContainerAware) {
            ((TilesContainerAware) evaluator).setContainer(container);
        }

        evaluator.init(configuration);

        if (rendererFactory instanceof TilesRequestContextFactoryAware) {
            ((TilesRequestContextFactoryAware) rendererFactory)
                    .setRequestContextFactory(requestContextFactory);
        }

        if (rendererFactory instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) rendererFactory)
                    .setApplicationContext(context);
        }

        if (rendererFactory instanceof TilesContainerAware) {
            ((TilesContainerAware) rendererFactory).setContainer(container);
        }

        if (rendererFactory instanceof AttributeEvaluatorAware) {
            ((AttributeEvaluatorAware) rendererFactory).setEvaluator(evaluator);
        }
        rendererFactory.init(initParameters);

        PreparerFactory prepFactory =
            (PreparerFactory) createFactory(configuration,
                PREPARER_FACTORY_INIT_PARAM);
View Full Code Here

Examples of org.apache.tiles.renderer.RendererFactory

        TilesRequestContextFactory requestContextFactory =
            (TilesRequestContextFactory) createFactory(configuration,
                REQUEST_CONTEXT_FACTORY_INIT_PARAM);
        requestContextFactory.init(configuration);

        RendererFactory rendererFactory =
            (RendererFactory) createFactory(configuration,
                RENDERER_FACTORY_INIT_PARAM);

        AttributeEvaluator evaluator = (AttributeEvaluator) createFactory(
                configuration, ATTRIBUTE_EVALUATOR_INIT_PARAM);

        if (evaluator instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) evaluator)
                    .setApplicationContext(context);
        }

        if (evaluator instanceof TilesContainerAware) {
            ((TilesContainerAware) evaluator).setContainer(container);
        }

        evaluator.init(configuration);

        if (rendererFactory instanceof TilesRequestContextFactoryAware) {
            ((TilesRequestContextFactoryAware) rendererFactory)
                    .setRequestContextFactory(requestContextFactory);
        }

        if (rendererFactory instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) rendererFactory)
                    .setApplicationContext(context);
        }

        if (rendererFactory instanceof TilesContainerAware) {
            ((TilesContainerAware) rendererFactory).setContainer(container);
        }

        if (rendererFactory instanceof AttributeEvaluatorAware) {
            ((AttributeEvaluatorAware) rendererFactory).setEvaluator(evaluator);
        }
        rendererFactory.init(initParameters);

        PreparerFactory prepFactory =
            (PreparerFactory) createFactory(configuration,
                PREPARER_FACTORY_INIT_PARAM);
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.