Package org.apache.myfaces.extensions.cdi.jsf.api.config.view

Examples of org.apache.myfaces.extensions.cdi.jsf.api.config.view.InlineViewConfigRoot


    @Override
    public String getViewId()
    {
        Class<?> viewConfigRootMarker = ViewConfigCache.getInlineViewConfigRootMarker();
        InlineViewConfigRoot viewConfigRoot = viewConfigRootMarker.getAnnotation(InlineViewConfigRoot.class);

        if(!viewConfigRoot.basePath().endsWith("/*") && !".".equals(viewConfigRoot.basePath()))
        {
            this.basePath = viewConfigRoot.basePath();
        }

        if(viewConfigRoot.basePath().endsWith("/*"))
        {
            String packageName = viewConfigRoot.basePath();
            this.basePath = packageName.substring(0, packageName.length() - 2) + "/" + this.basePath;
        }

        if(".".equals(viewConfigRoot.basePath()))
        {
            String packageName = viewConfigRootMarker.getPackage().getName();
            this.basePath = "/" + packageName.substring(packageName.lastIndexOf('.') + 1) + "/" + this.basePath;
        }

        if(DEFAULT_PAGE_NAME.equals(this.pageName))
        {
            this.pageName = createPageName(this.viewDefinitionClass.getSimpleName());

            for(String postfix : viewConfigRoot.pageBeanPostfix())
            {
                if(this.pageName.endsWith(postfix))
                {
                    this.pageName = this.pageName.substring(0, this.pageName.length() - postfix.length());
                    break;
View Full Code Here


     */
    @Override
    public String getViewId()
    {
        Class<?> viewConfigRootMarker = ViewConfigCache.getInlineViewConfigRootMarker();
        InlineViewConfigRoot viewConfigRoot = viewConfigRootMarker.getAnnotation(InlineViewConfigRoot.class);

        if(!viewConfigRoot.basePath().endsWith("/*") && !".".equals(viewConfigRoot.basePath()))
        {
            this.basePath = viewConfigRoot.basePath();
        }

        if(viewConfigRoot.basePath().endsWith("/*"))
        {
            String packageName = viewConfigRoot.basePath();
            this.basePath = packageName.substring(0, packageName.length() - 2) + "/" + this.basePath;
        }

        if(".".equals(viewConfigRoot.basePath()))
        {
            String packageName = viewConfigRootMarker.getPackage().getName();
            this.basePath = "/" + packageName.substring(packageName.lastIndexOf('.') + 1) + "/" + this.basePath;
        }

        if(DEFAULT_PAGE_NAME.equals(this.pageName))
        {
            this.pageName = createPageName(this.viewDefinitionClass.getSimpleName());

            for(String postfix : viewConfigRoot.pageBeanPostfix())
            {
                if(this.pageName.endsWith(postfix))
                {
                    this.pageName = this.pageName.substring(0, this.pageName.length() - postfix.length());
                    break;
View Full Code Here

     */
    @Override
    public String getViewId()
    {
        Class<?> viewConfigRootMarker = ViewConfigCache.getInlineViewConfigRootMarker();
        InlineViewConfigRoot viewConfigRoot = viewConfigRootMarker.getAnnotation(InlineViewConfigRoot.class);

        if(!viewConfigRoot.basePath().endsWith("/*") && !".".equals(viewConfigRoot.basePath()))
        {
            this.basePath = viewConfigRoot.basePath();
        }

        if(viewConfigRoot.basePath().endsWith("/*"))
        {
            String packageName = viewConfigRoot.basePath();
            this.basePath = packageName.substring(0, packageName.length() - 2) + "/" + this.basePath;
        }

        if(".".equals(viewConfigRoot.basePath()))
        {
            String packageName = viewConfigRootMarker.getPackage().getName();
            this.basePath = "/" + packageName.substring(packageName.lastIndexOf('.') + 1) + "/" + this.basePath;
        }

        if(DEFAULT_PAGE_NAME.equals(this.pageName))
        {
            this.pageName = createPageName(this.viewDefinitionClass.getSimpleName());

            for(String postfix : viewConfigRoot.pageBeanPostfix())
            {
                if(this.pageName.endsWith(postfix))
                {
                    this.pageName = this.pageName.substring(0, this.pageName.length() - postfix.length());
                    break;
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.jsf.api.config.view.InlineViewConfigRoot

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.