Package javax.el

Examples of javax.el.MethodExpression.invoke()


      ELContext context = facesContext.getELContext();
      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value,
              String.class, new Class<?>[]
              {});
      value = (String) methodExpression.invoke(context, null);
    }

    // Post me as the selected Node for the request
    postSelectedNode(this);
View Full Code Here


      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value, Void.TYPE,
              new Class<?>[]
              { ActionEvent.class });
      methodExpression.invoke(context, new Object[]{ event });
    }

  }
 
  /**
 
View Full Code Here

      ELContext context = facesContext.getELContext();
      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value,
              String.class, new Class<?>[]
              {});
      value = (String) methodExpression.invoke(context, null);
    }

    // Post me as the selected Node for the request
    postSelectedNode(this);
View Full Code Here

          hsr.setHeader("Content-Disposition",
                        "attachment; filename=" + MimeUtility.encodeHTTPHeader(filename, !isGecko));
        }
        MethodExpression method = getMethod();
        OutputStream out = new BufferedOutputStream(hsr.getOutputStream());
        method.invoke(context.getELContext(), new Object[]{context, out});
        out.close();
        
      }
      catch (Exception e)
      {
View Full Code Here

      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value, Void.TYPE,
              new Class<?>[]
              { ActionEvent.class });
      methodExpression.invoke(context, new Object[]
      { event });
    }

  }
View Full Code Here

      ELContext context = facesContext.getELContext();
      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value,
              String.class, new Class<?>[]
              {});
      value = (String) methodExpression.invoke(context, null);
    }

    // Post me as the selected Node for the request
    postSelectedNode(this);
View Full Code Here

                        "attachment; filename=\""+encodeHTTPHeaderFilename + "\"");

        }
        MethodExpression method = getMethod();
        OutputStream out = new BufferedOutputStream(new OnDemandOutputStream(hsr));
        method.invoke(context.getELContext(), new Object[]{context, out});
        out.close();
        
      }
      catch (Exception e)
      {
View Full Code Here

        assertEquals("B", me1.invoke(context, null));
        assertEquals("Hello JUnit from B", me2.invoke(context, null));
        assertEquals("Hello JUnit from B",
                me2.invoke(context, new Object[] { "JUnit2" }));
        assertEquals("Hello JUnit2 from B",
                me3.invoke(context, new Object[] { "JUnit2" }));
        assertEquals("Hello JUnit from B",
                me2.invoke(context, new Object[] { null }));
        assertEquals("Hello null from B",
                me3.invoke(context, new Object[] { null }));
    }
View Full Code Here

        assertEquals("Hello JUnit2 from B",
                me3.invoke(context, new Object[] { "JUnit2" }));
        assertEquals("Hello JUnit from B",
                me2.invoke(context, new Object[] { null }));
        assertEquals("Hello null from B",
                me3.invoke(context, new Object[] { null }));
    }

    public void testInvokeWithSuper() {
        MethodExpression me = factory.createMethodExpression(context,
                "${beanA.setBean(beanBB)}", null ,
View Full Code Here

    public void testInvokeWithSuper() {
        MethodExpression me = factory.createMethodExpression(context,
                "${beanA.setBean(beanBB)}", null ,
                new Class<?>[] { TesterBeanB.class });
        me.invoke(context, null);
        ValueExpression ve = factory.createValueExpression(context,
                "${beanA.bean.name}", String.class);
        Object r = ve.getValue(context);
        assertEquals("BB", r);
    }
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.