Package org.richfaces.resource

Examples of org.richfaces.resource.ResourceLibrary


            if (resourceKey.getResourceName().endsWith(ResourceLibraryRenderer.RESOURCE_LIBRARY_EXTENSION)) {

                String libraryName = resourceKey.getLibraryName();
                String resourceName = resourceKey.getResourceName().substring(0,
                        resourceKey.getResourceName().length() - ResourceLibraryRenderer.RESOURCE_LIBRARY_EXTENSION.length());
                ResourceLibrary resourceLibrary = factory.getResourceLibrary(resourceName, libraryName);

                if (resourceLibrary == null) {
                    throw new IllegalArgumentException("Resource library is null: " + libraryName + ":" + resourceName);
                }

                for (ResourceKey expandedKey : resourceLibrary.getResources()) {
                    expandedResources.add(expandedKey);
                }

            } else {
                expandedResources.add(resourceKey);
View Full Code Here


    protected void encodeDependentResources(FacesContext context, UIComponent component, Collection<Object> scripts)
        throws IOException {
        for (Object script : scripts) {
            if (script instanceof ResourceLibrary) {
                ResourceLibrary library = (ResourceLibrary) script;
                for (ResourceKey resource : library.getResources()) {
                    encodeResource(component, context, resource);
                }
            }
        }
    }
View Full Code Here

        name = name.substring(0, name.length() - RESOURCE_LIBRARY_EXTENSION.length());

        String library = (String) attributes.get("library");

        ResourceLibraryFactory factory = ServiceTracker.getService(ResourceLibraryFactory.class);
        ResourceLibrary resourceLibrary = factory.getResourceLibrary(name, library);

        if (resourceLibrary == null) {
            LOGGER.error("Resource library is null: " + COLON_JOINER.join(library, name));
            return;
        }

        for (ResourceKey resourceKey : resourceLibrary.getResources()) {
            encodeResource(component, context, resourceKey);
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.resource.ResourceLibrary

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.