Package javax.el

Examples of javax.el.MethodExpression


        if (params == null)
        {
            params = new Class[0];
        }

        MethodExpression methodExpression;

        try
        {
            methodExpression = getExpressionFactory().createMethodExpression(threadELContext(), reference,
                                                                             Object.class, params);
View Full Code Here


        continue;
      }
    } 
    // Set filterMethod attribute
    if (_filterMethod != null) {
      MethodExpression mexpr = getFacesContext().getApplication()
          .getExpressionFactory().createMethodExpression(elContext,
              _filterMethod.getExpressionString(), Object.class,
              new Class[] { Object.class });
      ((HtmlColumn) component).setFilterMethod(mexpr);
    }
View Full Code Here

                        @Override
                        public void applyMetadata(FaceletContext context, Object object) {
              FacesContext facesContext = context.getFacesContext();
             
              MethodExpression expression = facesContext.getApplication().getExpressionFactory().
                createMethodExpression(facesContext.getELContext(), attribute.getValue(), boolean.class, new Class[]{Object.class});
              ((UIComponent) object).getAttributes().put(FILTER_METHOD, expression);
            }
          };
        }
View Full Code Here

          Date submittedCurrentDate = convertCurrentDate(currentDateString);
          dateChangeEvent.setCurrentDate(submittedCurrentDate);

          if (!submittedCurrentDate.equals(currentDate)) {
            updateCurrentDate(facesContext, submittedCurrentDate);
            MethodExpression methodExpression = getCurrentDateChangeListener();
            if (methodExpression != null) {
                methodExpression.invoke(facesContext.getELContext(), new Object[] { dateChangeEvent });
            }
          }
         
        } catch (Exception e) {
          // XXX nick - kaa - add log.debug(...)
View Full Code Here

  FacesContext context = getFacesContext();
 
  if (valueHolder != null) {
      String[] requestedValues = valueHolder.getRequestedValues();
      if (requestedValues != null) {
    MethodExpression suggestingAction = getSuggestionAction();
    if (suggestingAction != null) {
        int first = getFirst();
        int rows = getRows();
        int rowIndex = getRowIndex();
        Object value = getValue();

        setFirst(0);
        setRows(0);

        Map<String, Object> results = new HashMap<String, Object>();
        for (int i = 0; i < requestedValues.length; i++) {
      String requestedValue = requestedValues[i];
      if (requestedValue != null) {
          setValue(suggestingAction.invoke(
            context.getELContext(), new Object[]{requestedValue}));

          setRowIndex(-1);

          int j = 0;
View Full Code Here

  public void setupValue(FacesContext context) {
        SubmittedValue valueHolder = (SubmittedValue) getSubmitedValue();
        Object submittedValue = valueHolder != null ? valueHolder.getSuggestionValue() : null;
       
    MethodExpression suggestingAction = getSuggestionAction();
    if (null != suggestingAction) {
        setValue(suggestingAction.invoke(
                context.getELContext(), new Object[]{submittedValue}));
    }
  }
View Full Code Here

  if (this._filterMethod != null) {
    return this._filterMethod;
  }
  ValueExpression ve = getValueExpression("filterMethod");
  if (ve != null) {
      MethodExpression value = null;
     
      try {
      value = (MethodExpression) ve.getValue(getFacesContext().getELContext());
      } catch (ELException e) {
      throw new FacesException(e);
View Full Code Here

        // Wrap custom expression factory
        ExpressionFactory wrappedExpressionFactory = getCurrentManager().wrapExpressionFactory(new DummyExpressionFactory());

        // Create method expression and invoke it with supplied EL context (porting package)
        MethodExpression methodExpression = wrappedExpressionFactory.createMethodExpression(null, "foo.test", String.class,
                null);
        Object methodElResult = methodExpression.invoke(getCurrentConfiguration().getEl().createELContext(getCurrentManager()),
                null);
        assertNotNull(methodElResult);
        assertTrue(methodElResult instanceof Integer);
        assertEquals(methodElResult, Integer.valueOf(-1));
View Full Code Here

        continue;
      }
    } 
    // Set filterMethod attribute
    if (_filterMethod != null) {
      MethodExpression mexpr = getFacesContext().getApplication()
          .getExpressionFactory().createMethodExpression(elContext,
              _filterMethod.getExpressionString(), Object.class,
              new Class[] { Object.class });
      ((HtmlColumn) component).setFilterMethod(mexpr);
    }
View Full Code Here

this._accesskey = _accesskey;
}

@SuppressWarnings("deprecation")
public MethodBinding getAction(){
  MethodExpression expression = getActionExpression();
  if (expression instanceof org.richfaces.webapp.taglib.MethodExpressionMethodBindingAdaptor) {
    return ((org.richfaces.webapp.taglib.MethodExpressionMethodBindingAdaptor) expression).getBinding();
  } else if (expression != null) {
    return new org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor(expression);
  }
View Full Code Here

TOP

Related Classes of javax.el.MethodExpression

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.