Package org.apache.beehive.controls.api.context

Examples of org.apache.beehive.controls.api.context.ControlContainerContext


                         InvocationTargetException
    {
        //
        // Obtain the current active control container context
        //
        ControlContainerContext context = ControlThreadContext.getContext();
        if (context == null)
            throw new IllegalStateException("No active control container context");

        //
        // Dispatch the event using it.
        //
        return context.dispatchEvent(target, event, args);
    }
View Full Code Here


     */
    final protected ServletBeanContext getServletBeanContext()
    {
        if (_beanContext == null)
        {
            ControlContainerContext ccc = ControlThreadContext.getContext();
            if (! (ccc instanceof ServletBeanContext))
                throw new IllegalStateException("No ServletBeanContext available");

            _beanContext = (ServletBeanContext)ccc;
        }
View Full Code Here

     */
    final protected ServletBeanContext getServletBeanContext()
    {
        if (_beanContext == null)
        {
            ControlContainerContext ccc = ControlThreadContext.getContext();
            if (! (ccc instanceof ServletBeanContext))
                throw new IllegalStateException("No ServletBeanContext available");

            _beanContext = (ServletBeanContext)ccc;
        }
View Full Code Here

     */
    final protected ServletBeanContext getServletBeanContext()
    {
        if (_beanContext == null)
        {
            ControlContainerContext ccc = ControlThreadContext.getContext();
            if (! (ccc instanceof ServletBeanContext))
                throw new IllegalStateException("No ServletBeanContext available");

            _beanContext = (ServletBeanContext)ccc;
        }
View Full Code Here

    // search for fields with @Control annotations
    for (Field field : cls.getFields()) {
      if (null != field.getAnnotation(Control.class)) {

        // attempt to load using client initializer.
        ControlContainerContext ccc = ControlThreadContext.getContext();
        if (null == ccc) {
          throw new Exception("no control container context found");
        }
        Class clientInitializer = cls.getClassLoader().loadClass(
            cls.getName() + "ClientInitializer");
View Full Code Here

        // search for fields with @Control annotations
        for (Field field : cls.getFields()) {
            if (null != field.getAnnotation(Control.class)) {
       
                //attempt to load using client initializer.
                ControlContainerContext ccc = ControlThreadContext.getContext();
                if (null == ccc) {
                    throw new Exception("no control container context found");
                }
                Class clientInitializer = cls.getClassLoader().loadClass(cls.getName() + "ClientInitializer");
                Method init = clientInitializer.getMethod("initialize", ControlBeanContext.class, cls);
View Full Code Here

        getControlContainerContextManager().endContext();
    }

    protected ControlContainerContextManager getControlContainerContextManager() {
        if(_controlContainerContextManager == null) {
            ControlContainerContext ccc = initializeControlContainerContext();

            if(ccc == null)
                throw new ControlTestException("Could not instantiate a ControlContainerContextManager as the control container context was null");

            _controlContainerContextManager = ControlContainerContextManagerFactory.getInstance(ccc);
View Full Code Here

        throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
    {
        //
        // Obtain the current active control container context
        //
        ControlContainerContext context = ControlThreadContext.getContext();
        if (context == null)
            throw new IllegalStateException("No active control container context");

        //
        // Dispatch the event using it.
        //
        return context.dispatchEvent(target, event, args);
    }
View Full Code Here

        }

        // if the page flow isn't a shared flow then we must begin context on that also
        if (pfmo instanceof PageFlowController || pfmo instanceof FacesBackingBean) {

            ControlContainerContext cbc = getControlContainerContext(pfmo);
            if (cbc != null) {
                if (cbc instanceof ServletBeanContext) {
                    ((ServletBeanContext) cbc).beginContext(servletContext,request,response);
                }
                else {
                    cbc.beginContext();
                }
            }
        }
    }
View Full Code Here

        // You must reverse the order of the begin because the low level stuff uses a stack for
        // this.  We also do this with a try/finally so that we make sure to free up the lock.
        try {
            if (flowController instanceof PageFlowController || flowController instanceof FacesBackingBean) {

                ControlContainerContext cbc = getControlContainerContext(flowController);
                if (cbc != null) {
                    cbc.endContext();
                }
            }
        }
        finally {
            if (_sharedContext != null) {
View Full Code Here

TOP

Related Classes of org.apache.beehive.controls.api.context.ControlContainerContext

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.