Package javax.faces.event

Examples of javax.faces.event.MethodExpressionActionListener


                                        methodExpression2 = reWrapMethodExpression(context.getApplication().getExpressionFactory().
                                            createMethodExpression(elContext,
                                                    attributeExpressionString, Void.TYPE, EMPTY_CLASS_ARRAY), attributeNameValueExpression);

                                        actionListener = new MethodExpressionActionListener(methodExpression, methodExpression2);
                                    }
                                    ((ActionSource2)innerComponent).addActionListener(actionListener);
                                    mctx.addMethodExpressionTargeted(innerComponent, attributeName, actionListener);
                                }
                                else if ("validator".equals(attributeName))
View Full Code Here


            {
                actionListener = new PartialMethodExpressionActionListener(methodExpression, methodExpression2);
            }
            else
            {
                actionListener = new MethodExpressionActionListener(methodExpression, methodExpression2);
            }
        }
        ((ActionSource2) innerComponent).addActionListener(actionListener);
        mctx.addMethodExpressionTargeted(innerComponent, targetAttributeName, actionListener);
    }
View Full Code Here

                            methodExpression2 = reWrapMethodExpression(context.getApplication().getExpressionFactory().
                                createMethodExpression(elContext,
                                        attributeExpressionString, Void.TYPE, EMPTY_CLASS_ARRAY), attributeNameValueExpression);
                           
                            ((ActionSource2)innerComponent).addActionListener(
                                    new MethodExpressionActionListener(methodExpression, methodExpression2));
                        }
                        else if ("validator".equals(attributeName))
                        {
                            // target is EditableValueHolder
                            methodExpression = reWrapMethodExpression(context.getApplication().getExpressionFactory().
View Full Code Here

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

                                                                  ve.getExpressionString(),
                                                                  Void.TYPE,
                                                                  NO_ARGS);

                ((ActionSource2) target).addActionListener(
                      new MethodExpressionActionListener(
                            new ContextualCompositeMethodExpression(ve,
                                                                    me),
                            new ContextualCompositeMethodExpression(ve,
                                                                    noArg)));
View Full Code Here

 
  protected void setActionListenerProperty(UIComponent component, MethodExpression actionListener) {
    if (actionListener != null) {
      if (component instanceof ActionSource2) {
        ActionSource2 actionSource2 = (ActionSource2) component;
        actionSource2.addActionListener(new MethodExpressionActionListener(actionListener));
      } else {
        throw new IllegalArgumentException(Messages.getMessage(Messages.NO_ACTION_SOURCE2_ERROR, component.getClientId(getFacesContext())));
      }
    }
  }
View Full Code Here

            this.attr = attr;
        }

        public void applyMetadata(FaceletContext ctx, Object instance) {
            ((ActionSource2) instance)
                    .addActionListener(new MethodExpressionActionListener(
                            this.attr.getMethodExpression(ctx, null,
                                    ActionSourceRule.ACTION_LISTENER_SIG)));

        }
View Full Code Here

                                                                  ve.getExpressionString(),
                                                                  Void.TYPE,
                                                                  NO_ARGS);

                ((ActionSource2) target).addActionListener(
                      new MethodExpressionActionListener(
                            new ContextualCompositeMethodExpression(ve,
                                                                    me),
                            new ContextualCompositeMethodExpression(ve,
                                                                    noArg)));
View Full Code Here

        {
            comp.setValueExpression("ondblclick", _ondblclick);
        }
        if (_actionListener != null)
        {
            comp.addActionListener(new MethodExpressionActionListener(_actionListener));
        }
        if (_for != null)
        {
            comp.setValueExpression("for", _for);
        }
View Full Code Here

     button_save.setId("buttonSave"+metric.getInternalID());
     button_save.setValue("add config");
     Class[] parms3 = new Class[]{ActionEvent.class};
        MethodExpression mb4 = ef.createMethodExpression(FacesContext.getCurrentInstance().getELContext(),
                "#{AutoEvalSerUserConfigBean.command_saveMetricConfiguration}", null, parms3);
        MethodExpressionActionListener vcl4 = new MethodExpressionActionListener(mb4);
        button_save.addActionListener(vcl4);
     UIParameter p = new UIParameter();
     p.setId("param_save_button"+metric.getInternalID());
     p.setName("pConfigPanel");
     p.setValue(parent.getId());
View Full Code Here

TOP

Related Classes of javax.faces.event.MethodExpressionActionListener

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.