| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.seasar.teeda.core.el; |
| 17 | |
|
| 18 | |
import javax.faces.component.StateHolder; |
| 19 | |
import javax.faces.context.FacesContext; |
| 20 | |
import javax.faces.el.EvaluationException; |
| 21 | |
import javax.faces.el.MethodBinding; |
| 22 | |
import javax.faces.el.MethodNotFoundException; |
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
public class SimpleMethodBinding extends MethodBinding implements StateHolder { |
| 30 | |
|
| 31 | |
private String outcome_; |
| 32 | |
|
| 33 | 2 | private boolean transient_ = false; |
| 34 | |
|
| 35 | 0 | public SimpleMethodBinding() { |
| 36 | 0 | } |
| 37 | |
|
| 38 | 2 | public SimpleMethodBinding(String outcome) { |
| 39 | 2 | outcome_ = outcome; |
| 40 | 2 | } |
| 41 | |
|
| 42 | |
public Object invoke(FacesContext context, Object args[]) |
| 43 | |
throws EvaluationException, MethodNotFoundException { |
| 44 | |
|
| 45 | 0 | return outcome_; |
| 46 | |
} |
| 47 | |
|
| 48 | |
public Class getType(FacesContext context) throws MethodNotFoundException { |
| 49 | 0 | return String.class; |
| 50 | |
} |
| 51 | |
|
| 52 | |
public Object saveState(FacesContext context) { |
| 53 | 0 | return outcome_; |
| 54 | |
} |
| 55 | |
|
| 56 | |
public void restoreState(FacesContext context, Object obj) { |
| 57 | 0 | outcome_ = (String) obj; |
| 58 | 0 | } |
| 59 | |
|
| 60 | |
public boolean isTransient() { |
| 61 | 0 | return transient_; |
| 62 | |
} |
| 63 | |
|
| 64 | |
public void setTransient(boolean b) { |
| 65 | 0 | transient_ = b; |
| 66 | 0 | } |
| 67 | |
} |