Package javax.faces.component.behavior

Examples of javax.faces.component.behavior.Behavior


            throw new NullPointerException("event");
        }
       
        if (event instanceof BehaviorEvent && event.getComponent() == this)
        {
            Behavior behavior = ((BehaviorEvent) event).getBehavior();
            behavior.broadcast((BehaviorEvent) event);
        }

        if (_facesListeners == null)
        {
            return;
View Full Code Here


        assertTrue("Behavior not added", _application.getBehaviorIds()
                .hasNext());
        assertEquals(behaviorId, _application.getBehaviorIds().next());

        Behavior createdBehavior = _application.createBehavior(behaviorId);
        assertNotNull("Behavior not created", createdBehavior);
    }
View Full Code Here

                            + behaviorId);
        }

        try
        {
            final Behavior behavior = (Behavior) behaviorClass.newInstance();
            _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), behaviorClass);           
            return behavior;
        }
        catch (Exception e)
        {
View Full Code Here

            throw new FacesException("Could not find any registered behavior-class for behaviorId : " + behaviorId);
        }
       
        try
        {
            Behavior behavior = (Behavior)behaviorClass.newInstance();
            FacesContext facesContext = FacesContext.getCurrentInstance();
            _handleAttachedResourceDependencyAnnotations(facesContext, behavior);

            if (behavior instanceof ClientBehaviorBase)
            {
View Full Code Here

            throw new NullPointerException("event");
        }
       
        if (event instanceof BehaviorEvent && event.getComponent() == this)
        {
            Behavior behavior = ((BehaviorEvent) event).getBehavior();
            behavior.broadcast((BehaviorEvent) event);
        }

        if (_facesListeners == null)
        {
            return;
View Full Code Here

    }

    @Override
    public Behavior createBehavior(String behaviorId) throws FacesException
    {
        Behavior result = wrapped.createBehavior(behaviorId);

        if (DEACTIVATE_AJAX_ACTION_BASED_GROUP_VALIDATION)
        {
            return result;
        }

        if (result != null && result.getClass().equals(AjaxBehavior.class)) //don't use instanceof
        {
            return new ExtValAjaxBehavior();

        }
        return result;
View Full Code Here

            throw new FacesException("Could not find any registered behavior-class for behaviorId : " + behaviorId);
        }
       
        try
        {
            Behavior behavior = behaviorClass.newInstance();
            FacesContext facesContext = FacesContext.getCurrentInstance();
            _handleAttachedResourceDependencyAnnotations(facesContext, behavior);

            if (behavior instanceof ClientBehaviorBase)
            {
View Full Code Here

     * @see javax.faces.application.Application#createBehavior(String)
     */
    public Behavior createBehavior(String behaviorId) throws FacesException {

        Util.notNull("behaviorId", behaviorId);
        Behavior returnVal = (Behavior) newThing(behaviorId, behaviorMap);
        if (returnVal == null) {
            Object[] params = {behaviorId};
            if (LOGGER.isLoggable(Level.SEVERE)) {
                LOGGER.log(Level.SEVERE,
                        "jsf.cannot_instantiate_behavior_error", params);
View Full Code Here

            throw new FacesException("Could not find any registered behavior-class for behaviorId : " + behaviorId);
        }
       
        try
        {
            Behavior behavior = (Behavior)behaviorClass.newInstance();

            _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), behavior);

            if (behavior instanceof ClientBehaviorBase)
            {
View Full Code Here

            throw new FacesException("Could not find any registered behavior-class for behaviorId : " + behaviorId);
        }
       
        try
        {
            Behavior behavior = (Behavior)behaviorClass.newInstance();

            _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), behavior);

            if (behavior instanceof ClientBehaviorBase)
            {
View Full Code Here

TOP

Related Classes of javax.faces.component.behavior.Behavior

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.