Package javax.faces.event

Examples of javax.faces.event.ActionListener


                                    }
                                }
                                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
                                    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(attributeNameValueExpression);
                                    }
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

                                    }
                                }
                                else if ("actionListener".equals(targetAttributeName))
                                {
                                    //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(attributeNameValueExpression);
                                    }
View Full Code Here

                }
                throw e;
            }
        }

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

        ValueExpression b = null;
        if (this.binding != null)
        {
            b = this.binding.getValueExpression(faceletContext, ActionListener.class);
        }
        ActionListener listener = new LazyActionListener(this.listenerType, b);
        as.addActionListener(listener);
    }
View Full Code Here

            this.binding = binding;
        }

        public void processAction(ActionEvent event) throws AbortProcessingException
        {
            ActionListener instance = null;
            FacesContext faces = FacesContext.getCurrentInstance();
            if (faces == null)
            {
                return;
            }
            if (this.binding != null)
            {
                instance = (ActionListener) binding.getValue(faces.getELContext());
            }
            if (instance == null && this.type != null)
            {
                try
                {
                    instance = (ActionListener) ReflectionUtil.forName(this.type).newInstance();
                }
                catch (Exception e)
                {
                    throw new AbortProcessingException("Couldn't Lazily instantiate ValueChangeListener", e);
                }
                if (this.binding != null)
                {
                    binding.setValue(faces.getELContext(), instance);
                }
            }
            if (instance != null)
            {
                instance.processAction(event);
            }
        }
View Full Code Here

   
    public ActionListener getSubmitActionListener()
    {
        if (submitActionListener == null)
        {
            submitActionListener = new ActionListener(){
   
                public void processAction(ActionEvent actionEvent)
                        throws AbortProcessingException
                {
                    //System.out.println("Submit ActionListener executed");
View Full Code Here

   
    public ActionListener getCancelActionListener()
    {
        if (cancelActionListener == null)
        {
            cancelActionListener = new ActionListener()
            {
               
                public void processAction(ActionEvent actionEvent)
                        throws AbortProcessingException
                {
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

            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

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.