Package javax.el

Examples of javax.el.MethodExpression.invoke()


   public Object invokeMethod(final FacesContext context, final String expression, Class<?>[] argumentTypes,
         Object[] argumentValues) throws ELException
   {
      ExpressionFactory ef = context.getApplication().getExpressionFactory();
      MethodExpression me = ef.createMethodExpression(context.getELContext(), expression, Object.class, argumentTypes);
      return me.invoke(context.getELContext(), argumentValues);
   }

   public boolean isEl(final String viewId)
   {
      if (viewId == null)
View Full Code Here


      FacesContext facesContext = getFacesContext();
      ELContext elContext = facesContext.getELContext();
      ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
      MethodExpression methodExpression = expressionFactory.createMethodExpression(elContext, el,
               Object.class, new Class[values.length]);
      return methodExpression.invoke(elContext, values);
   }

   /**
    * Creates an {@link ValueExpression} for the supplied EL expression
    */
 
View Full Code Here

   
    if(event instanceof org.primefaces.event.CloseEvent) {
      MethodExpression closeMe = getCloseListener();
     
      if(closeMe != null) {
        closeMe.invoke(facesContext.getELContext(), new Object[] {event});
      }
    } else if(event instanceof org.primefaces.event.ToggleEvent) {
      MethodExpression toggleMe = getToggleListener();
     
      if(toggleMe != null) {
View Full Code Here

      }
    } else if(event instanceof org.primefaces.event.ToggleEvent) {
      MethodExpression toggleMe = getToggleListener();
     
      if(toggleMe != null) {
        toggleMe.invoke(facesContext.getELContext(), new Object[] {event});
      }
    }
  }
 
  private Menu optionsMenu;
View Full Code Here

   
    FacesContext facesContext = FacesContext.getCurrentInstance();
    MethodExpression me = getSelectListener();
   
    if (me != null && event instanceof org.primefaces.event.DateSelectEvent) {
      me.invoke(facesContext.getELContext(), new Object[] {event});
    }
  }

  protected FacesContext getFacesContext() {
    return FacesContext.getCurrentInstance();
View Full Code Here

   
    FacesContext facesContext = FacesContext.getCurrentInstance();
    MethodExpression me = getCloseListener();
   
    if (me != null) {
      me.invoke(facesContext.getELContext(), new Object[] {event});
    }
  }

  protected FacesContext getFacesContext() {
    return FacesContext.getCurrentInstance();
View Full Code Here

    else if(event instanceof DateSelectEvent) me = getDateSelectListener();
    else if(event instanceof ScheduleEntryMoveEvent) me = getEventMoveListener();
    else if(event instanceof ScheduleEntryResizeEvent) me = getEventResizeListener();
   
    if (me != null) {
      me.invoke(facesContext.getELContext(), new Object[] {event});
    }
  }
 
  public ScheduleEventDialog getEventDialog() {
    if(eventDialog == null) {
View Full Code Here

    } else if(event instanceof NodeCollapseEvent) {
      me = getNodeCollapseListener();
    }
   
    if (me != null) {
      me.invoke(facesContext.getELContext(), new Object[] {event});
    }
  }
 
  public UITreeNode getUITreeNodeByType(String type) {
    if(nodes == null) {
View Full Code Here

    response.setContentType("application/json");
   
    MethodExpression me = autoComplete.getCompleteMethod();
    String query = facesContext.getExternalContext().getRequestParameterMap().get(clientId + "_query");
   
    List results = (List) me.invoke(facesContext.getELContext(), new Object[]{query});
    writer.write("{");
    writer.write("\"results\" : [");
   
    for(Iterator iterator = results.iterator(); iterator.hasNext();) {
      Object result = iterator.next();
View Full Code Here

   
    FacesContext facesContext = FacesContext.getCurrentInstance();
    MethodExpression me = getFileUploadListener();
   
    if (me != null) {
      me.invoke(facesContext.getELContext(), new Object[] {event});
    }
  }
 
  String getInputFileId(FacesContext facesContext) {
    if(inputFileId == null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.