Package javax.faces.event

Examples of javax.faces.event.ActionListener


      else
      {
        broadcastToMethodBinding(event, getNextActionListener());
      }

      ActionListener defaultActionListener =
                             context.getApplication().getActionListener();

      if (defaultActionListener != null)
        defaultActionListener.processAction((ActionEvent) event);
    }
  }
View Full Code Here


        // Notify the specified action listener method (if any),
        // and the default action listener
        broadcastToMethodBinding(event, getActionListener());

        FacesContext context = getFacesContext();
        ActionListener defaultActionListener =
          context.getApplication().getActionListener();
        if (defaultActionListener != null)
        {
          defaultActionListener.processAction((ActionEvent) event);
        }
      }
      finally
      {
        afContext.getDialogService().setCurrentLaunchSource(null);
View Full Code Here

      FacesContext context = getFacesContext();
      MethodBinding mb = getActionListener();
      if (mb != null)
        mb.invoke(context, new Object[] { event });

      ActionListener defaultActionListener =
        context.getApplication().getActionListener();
      if (defaultActionListener != null)
      {
        defaultActionListener.processAction((ActionEvent) event);
      }
    }
  }
View Full Code Here

                                    ((ActionSource2)innerComponent).setActionExpression(methodExpression);
                                }
                                else if ("actionListener".equals(attributeName))
                                {
                                    //First try to remove any prevous target if any
                                    ActionListener o = (ActionListener) mctx.removeMethodExpressionTargeted(innerComponent, attributeName);
                                    if (o != null)
                                    {
                                        ((ActionSource2)innerComponent).removeActionListener(o);
                                    }
                                   
                                    // target is ActionSource2
                                    methodExpression = reWrapMethodExpression(context.getApplication().getExpressionFactory().
                                            createMethodExpression(elContext,
                                                    attributeExpressionString, Void.TYPE, ACTION_LISTENER_SIGNATURE), attributeNameValueExpression);
                                   
                                    methodExpression2 = reWrapMethodExpression(context.getApplication().getExpressionFactory().
                                        createMethodExpression(elContext,
                                                attributeExpressionString, Void.TYPE, EMPTY_CLASS_ARRAY), attributeNameValueExpression);
                                   
                                    ActionListener actionListener = new MethodExpressionActionListener(methodExpression, methodExpression2);
                                    ((ActionSource2)innerComponent).addActionListener(actionListener);
                                    mctx.addMethodExpressionTargeted(innerComponent, attributeName, actionListener);
                                }
                                else if ("validator".equals(attributeName))
                                {
View Full Code Here

    if (facesEvent instanceof TabChangeEvent && facesEvent.getComponent() == this) {
      FacesUtils.invokeMethodBinding(getFacesContext(), getTabChangeListener(), facesEvent);

      FacesUtils.invokeMethodBinding(getFacesContext(), getActionListener(), facesEvent);
      if (!isSwitchTypeClient()) {
        ActionListener defaultActionListener = getFacesContext().getApplication().getActionListener();
        if (defaultActionListener != null) {
          defaultActionListener.processAction((ActionEvent) facesEvent);
        }
      }
      Integer index = ((TabChangeEvent) facesEvent).getNewTabIndex();
      if (FacesUtils.hasValueBindingOrValueExpression(this, Attributes.SELECTED_INDEX)) {
        FacesUtils.setValueOfBindingOrExpression(getFacesContext(), index, this, Attributes.SELECTED_INDEX);
View Full Code Here

    {
        Application application = ((ApplicationFactory)
                FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();

        FacesConfigData dispenser = getDispenser();
        ActionListener actionListener = ClassUtils.buildApplicationObject(ActionListener.class,
                dispenser.getActionListenerIterator(), null);
        _callInjectAndPostConstruct(actionListener);
        application.setActionListener(actionListener);

        if (dispenser.getDefaultLocale() != null)
View Full Code Here

            String attributeExpressionString,
            ValueExpression attributeNameValueExpression,
            boolean ccAttrMeRedirection)
    {
        //First try to remove any prevous target if any
        ActionListener o = (ActionListener)
                mctx.removeMethodExpressionTargeted(innerComponent, targetAttributeName);
        if (o != null)
        {
            ((ActionSource2) innerComponent).removeActionListener(o);
        }

        // target is ActionSource2
        ActionListener actionListener = null;
        // If it is a redirection, a wrapper is used to locate the right instance and call
        //it properly.
        if (ccAttrMeRedirection)
        {
            actionListener = new RedirectMethodExpressionValueExpressionActionListener(
View Full Code Here

            String attributeExpressionString,
            ValueExpression attributeNameValueExpression,
            boolean ccAttrMeRedirection)
    {
        //First try to remove any prevous target if any
        ActionListener o = (ActionListener)
                mctx.removeMethodExpressionTargeted(innerComponent, targetAttributeName);
        if (o != null)
        {
            ((ActionSource2) innerComponent).removeActionListener(o);
        }

        // target is ActionSource2
        ActionListener actionListener = null;
        // If it is a redirection, a wrapper is used to locate the right instance and call
        //it properly.
        if (ccAttrMeRedirection)
        {
            actionListener = new RedirectMethodExpressionValueExpressionActionListener(
View Full Code Here

    }

    private ActionListener _createActionListener()
    {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ActionListener listener = null;
        // type and/or binding must be specified
        try
        {
            if (null != _binding)
            {
View Full Code Here

    {
        Application application = ((ApplicationFactory)
                FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();

        FacesConfigData dispenser = getDispenser();
        ActionListener actionListener = ClassUtils.buildApplicationObject(ActionListener.class,
                dispenser.getActionListenerIterator(), null);
        _callInjectAndPostConstruct(actionListener);
        application.setActionListener(actionListener);

        if (dispenser.getDefaultLocale() != null)
View Full Code Here

TOP

Related Classes of javax.faces.event.ActionListener

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.