1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
package org.apache.myfaces.taglib.html; |
22 | |
|
23 | |
import javax.faces.component.UIComponent; |
24 | |
import javax.el.ValueExpression; |
25 | |
import javax.el.MethodExpression; |
26 | |
import javax.faces.component.UIComponent; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public class HtmlPanelGroupTag |
34 | |
extends javax.faces.webapp.UIComponentELTag |
35 | |
{ |
36 | |
public HtmlPanelGroupTag() |
37 | 0 | { |
38 | 0 | } |
39 | |
|
40 | |
@Override |
41 | |
public String getComponentType() |
42 | |
{ |
43 | 0 | return "javax.faces.HtmlPanelGroup"; |
44 | |
} |
45 | |
|
46 | |
public String getRendererType() |
47 | |
{ |
48 | 0 | return "javax.faces.Group"; |
49 | |
} |
50 | |
|
51 | |
private ValueExpression _layout; |
52 | |
|
53 | |
public void setLayout(ValueExpression layout) |
54 | |
{ |
55 | 0 | _layout = layout; |
56 | 0 | } |
57 | |
private ValueExpression _style; |
58 | |
|
59 | |
public void setStyle(ValueExpression style) |
60 | |
{ |
61 | 0 | _style = style; |
62 | 0 | } |
63 | |
private ValueExpression _styleClass; |
64 | |
|
65 | |
public void setStyleClass(ValueExpression styleClass) |
66 | |
{ |
67 | 0 | _styleClass = styleClass; |
68 | 0 | } |
69 | |
|
70 | |
@Override |
71 | |
protected void setProperties(UIComponent component) |
72 | |
{ |
73 | 0 | if (!(component instanceof javax.faces.component.html.HtmlPanelGroup )) |
74 | |
{ |
75 | 0 | throw new IllegalArgumentException("Component "+ |
76 | |
component.getClass().getName() +" is no javax.faces.component.html.HtmlPanelGroup"); |
77 | |
} |
78 | |
|
79 | 0 | javax.faces.component.html.HtmlPanelGroup comp = (javax.faces.component.html.HtmlPanelGroup) component; |
80 | |
|
81 | 0 | super.setProperties(component); |
82 | |
|
83 | |
|
84 | 0 | if (_layout != null) |
85 | |
{ |
86 | 0 | comp.setValueExpression("layout", _layout); |
87 | |
} |
88 | 0 | if (_style != null) |
89 | |
{ |
90 | 0 | comp.setValueExpression("style", _style); |
91 | |
} |
92 | 0 | if (_styleClass != null) |
93 | |
{ |
94 | 0 | comp.setValueExpression("styleClass", _styleClass); |
95 | |
} |
96 | 0 | } |
97 | |
|
98 | |
@Override |
99 | |
public void release() |
100 | |
{ |
101 | 0 | super.release(); |
102 | 0 | _layout = null; |
103 | 0 | _style = null; |
104 | 0 | _styleClass = null; |
105 | 0 | } |
106 | |
} |