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

Examples of org.apache.myfaces.extensions.cdi.core.api.config.view.View


     *
     * @param annotatedType current annotated type
     */
    private void addPageBean(AnnotatedType annotatedType)
    {
        View view = annotatedType.getAnnotation(View.class);

        if(!"".equals(view.inline()[0]))
        {
            //TODO move exceptions to util class
            throw new IllegalStateException("Definition error at: " + annotatedType.getJavaClass().getName() +
                    " it isn't allowed to define a class level @" + View.class.getName() +
                    " without a typesafe view config. Please don't use @View(inline=\"...\") for this use-case!");
        }

        String viewId;
        for(Class<? extends ViewConfig> viewConfigClass : view.value())
        {
            ViewConfigEntry viewConfigEntry = ViewConfigCache.getViewDefinition(viewConfigClass);

            if(viewConfigEntry == null)
            {
View Full Code Here


        if(!isObserverMethod(invocationContext))
        {
            return true;
        }

        View view = getViewAnnotation(invocationContext);

        String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();

        if(view.inline().length > 1 || !"".equals(view.inline()[0]))
        {
            return isMethodBoundToView(view.inline(), viewId);
        }
        return isMethodBoundToViewDefinition(view.value(), viewId);
    }
View Full Code Here

        return false;
    }

    private View getViewAnnotation(InvocationContext invocationContext)
    {
        View view;
        Method method = invocationContext.getMethod();
        if(method.isAnnotationPresent(View.class))
        {
            view = method.getAnnotation(View.class);
        }
View Full Code Here

     *
     * @param annotatedType current annotated type
     */
    private void addPageBean(AnnotatedType annotatedType)
    {
        View view = annotatedType.getAnnotation(View.class);

        if(!"".equals(view.inline()[0]))
        {
            //TODO move exceptions to util class
            throw new IllegalStateException("Definition error at: " + annotatedType.getJavaClass().getName() +
                    " it isn't allowed to define a class level @" + View.class.getName() +
                    " without a typesafe view config. Please don't use @View(inline=\"...\") for this use-case!");
        }

        String viewId;
        for(Class<? extends ViewConfig> viewConfigClass : view.value())
        {
            ViewConfigEntry viewConfigEntry = ViewConfigCache.getViewDefinition(viewConfigClass);

            if(viewConfigEntry == null)
            {
View Full Code Here

     *
     * @param annotatedType current annotated type
     */
    private void addPageBean(AnnotatedType annotatedType)
    {
        View view = annotatedType.getAnnotation(View.class);

        if(!"".equals(view.inline()[0]))
        {
            //TODO move exceptions to util class
            throw new IllegalStateException("Definition error at: " + annotatedType.getJavaClass().getName() +
                    " it isn't allowed to define a class level @" + View.class.getName() +
                    " without a typesafe view config. Please don't use @View(inline=\"...\") for this use-case!");
        }

        if(this.logger.isLoggable(Level.INFO))
        {
            this.logger.info(annotatedType.getJavaClass().getName() + " will be used as page-bean.");
        }

        for(Class<? extends ViewConfig> viewConfigClass : view.value())
        {
            ViewConfigEntry viewConfigEntry = ViewConfigCache.getViewDefinition(viewConfigClass);

            if(viewConfigEntry == null)
            {
View Full Code Here

        if(!isObserverMethod(invocationContext))
        {
            return true;
        }

        View view = getViewAnnotation(invocationContext);

        String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();

        if(view.inline().length > 1 || !"".equals(view.inline()[0]))
        {
            return isMethodBoundToView(view.inline(), viewId);
        }
        return isMethodBoundToViewDefinition(view.value(), viewId);
    }
View Full Code Here

        return false;
    }

    private View getViewAnnotation(InvocationContext invocationContext)
    {
        View view;
        Method method = invocationContext.getMethod();
        if(method.isAnnotationPresent(View.class))
        {
            view = method.getAnnotation(View.class);
        }
View Full Code Here

     *
     * @param annotatedType current annotated type
     */
    private void addPageBean(AnnotatedType annotatedType)
    {
        View view = annotatedType.getAnnotation(View.class);

        if(!"".equals(view.inline()[0]))
        {
            //TODO move exceptions to util class
            throw new IllegalStateException("Definition error at: " + annotatedType.getJavaClass().getName() +
                    " it isn't allowed to define a class level @" + View.class.getName() +
                    " without a typesafe view config. Please don't use @View(inline=\"...\") for this use-case!");
        }

        if(this.logger.isLoggable(Level.INFO))
        {
            this.logger.info(annotatedType.getJavaClass().getName() + " will be used as page-bean.");
        }

        for(Class<? extends ViewConfig> viewConfigClass : view.value())
        {
            ViewConfigDescriptor viewConfigDescriptor = ViewConfigCache.getViewConfigDescriptor(viewConfigClass);

            if(viewConfigDescriptor == null)
            {
View Full Code Here

        if(!isObserverMethod(invocationContext))
        {
            return true;
        }

        View view = getViewAnnotation(invocationContext);

        String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();

        if(view.inline().length > 1 || !"".equals(view.inline()[0]))
        {
            return isMethodBoundToView(view.inline(), viewId);
        }
        return isMethodBoundToViewDefinition(view.value(), viewId);
    }
View Full Code Here

        return false;
    }

    private View getViewAnnotation(InvocationContext invocationContext)
    {
        View view;
        Method method = invocationContext.getMethod();
        if(method.isAnnotationPresent(View.class))
        {
            view = method.getAnnotation(View.class);
        }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.core.api.config.view.View

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.