1 package com.netpotlet.cove.el;
2
3 import javax.faces.context.FacesContext;
4 import javax.faces.el.EvaluationException;
5 import javax.faces.el.MethodBinding;
6 import javax.faces.el.MethodNotFoundException;
7
8 public class ConstantMethodBinding extends MethodBinding {
9 private String outcome;
10
11 public ConstantMethodBinding(String outcome) {
12 this.outcome = outcome;
13 }
14
15 public Object invoke(FacesContext facescontext, Object aobj[])
16 throws EvaluationException, MethodNotFoundException {
17 return outcome;
18 }
19
20 public Class getType(FacesContext facescontext)
21 throws MethodNotFoundException {
22 return String.class;
23 }
24 }