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 java.util.Arrays; |
19 | |
|
20 | |
import javax.faces.component.StateHolder; |
21 | |
import javax.faces.context.FacesContext; |
22 | |
import javax.faces.el.ValueBinding; |
23 | |
|
24 | |
import org.seasar.teeda.core.JsfConstants; |
25 | |
import org.seasar.teeda.core.managedbean.ManagedBeanFactory; |
26 | |
import org.seasar.teeda.core.util.DIContainerUtil; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | 158 | public abstract class ValueBindingBase extends ValueBinding implements |
34 | |
StateHolder { |
35 | |
|
36 | |
static { |
37 | 1 | Arrays.sort(JsfConstants.JSF_IMPLICIT_OBJECTS); |
38 | 159 | }; |
39 | |
|
40 | |
protected abstract void setValueInScope(FacesContext context, String name, |
41 | |
Object newValue); |
42 | |
|
43 | |
public abstract Object getExpression(); |
44 | |
|
45 | |
protected final ManagedBeanFactory getManagedBeanFactory() { |
46 | 4 | return (ManagedBeanFactory) DIContainerUtil |
47 | 1 | .getComponent(ManagedBeanFactory.class); |
48 | |
} |
49 | |
|
50 | |
public static boolean isImplicitObject(String expressionString) { |
51 | 12 | return (Arrays.binarySearch(JsfConstants.JSF_IMPLICIT_OBJECTS, |
52 | |
expressionString) >= 0); |
53 | |
} |
54 | |
|
55 | |
} |