Package javax.faces.application

Examples of javax.faces.application.ResourceHandler.createResource()


        String resourceName = componentResource.getResourceName();
        if (resourceName.endsWith(".xhtml")) {
            resourceName = resourceName.substring(0,
                    resourceName.length() - 6) + ".groovy";
            ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
            result = resourceHandler.createResource(resourceName,
                    componentResource.getLibraryName());
        }
       
        return result;
    }
View Full Code Here


            String libraryName = getCompositeComponentLibraryName(this.ns);
            if (null != libraryName) {
                String ccName = localName + ".xhtml";
                // PENDING: there has to be a cheaper way to test for existence
                ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
                ccResource = resourceHandler.
                        createResource(ccName, libraryName);
            }
        }
        return ccResource;
    }
View Full Code Here

        String resourceName = componentResource.getResourceName();
        if (resourceName.endsWith(".xhtml")) {
            resourceName = resourceName.substring(0,
                    resourceName.length() - 6) + ".groovy";
            ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
            result = resourceHandler.createResource(resourceName,
                    componentResource.getLibraryName());
        }
       
        return result;
    }
View Full Code Here

            String libraryName = getCompositeComponentLibraryName(this.ns);
            if (null != libraryName) {
                String ccName = localName + ".xhtml";
                // PENDING: there has to be a cheaper way to test for existence
                ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
                ccResource = resourceHandler.
                        createResource(ccName, libraryName);
            }
        }
        return ccResource;
    }
View Full Code Here

            return;
        }
        // Since we've now determined that it's not in the page, we need to add it.

        ResourceHandler handler = context.getApplication().getResourceHandler();
        Resource resource = handler.createResource(name, library);
        ResponseWriter writer = context.getResponseWriter();
        writer.write('\n');
        writer.startElement("script", null);
        writer.writeAttribute("type", "text/javascript", null);
        writer.writeAttribute("src", ((resource != null) ? resource.getRequestPath() : ""), null);
View Full Code Here

        String resName = (String) component.getAttributes().get("name");
        ResourceHandler handler = context.getApplication().getResourceHandler();
        if (resName != null) {
            String libName = (String) component.getAttributes().get("library");
            Resource res = handler.createResource(resName, libName);
            if (res == null) {
                if (context.isProjectStage(ProjectStage.Development)) {
                    String msg = "Unable to find resource " + resName;
                    context.addMessage(component.getClientId(context),
                                       new FacesMessage(FacesMessage.SEVERITY_ERROR,
View Full Code Here

public class PushRendererBase extends Renderer {
    private static final String PUSH_URL_ENCODED_ATTRIBUTE = PushRendererBase.class.getName();

    protected String getPushResourceUrl(FacesContext context) {
        ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
        Resource pushResource = resourceHandler.createResource(PushResource.class.getName());

        return pushResource.getRequestPath();
    }

    protected String getPushHandlerUrl(FacesContext context) {
View Full Code Here

    public static String getResourcePath(FacesContext context, String library, String resourceName) {
        String path = null;
        if (resourceName != null) {
            ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
            Resource resource = (library != null) ? resourceHandler.createResource(resourceName, library) : resourceHandler
                    .createResource(resourceName);
            if (resource != null) {
                path = resource.getRequestPath();
            }
        }
View Full Code Here

    public static String getResourcePath(FacesContext context, String library, String resourceName) {
        String path = null;
        if (resourceName != null) {
            ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
            Resource resource = (library != null) ? resourceHandler.createResource(resourceName, library) : resourceHandler
                    .createResource(resourceName);
            if (resource != null) {
                path = resource.getRequestPath();
            }
        }
View Full Code Here

            final String libraryName = (String) component.getAttributes().get(
                    JSFAttr.LIBRARY_ATTR);
            if ((libraryName != null) && (libraryName.length() > 0))
            {
                resource = resourceHandler.createResource(resourceName,
                        libraryName);
            }
            else
            {
                resource = resourceHandler.createResource(resourceName);
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.