1 package org.apache.myfaces.tobago.taglib.sandbox;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE_PREVIEW;
21 import static org.apache.myfaces.tobago.TobagoConstants.FACET_LAYOUT;
22 import org.apache.myfaces.tobago.component.ComponentUtil;
23 import org.apache.myfaces.tobago.taglib.component.TextInputTag;
24
25 import javax.faces.component.UIComponent;
26 import javax.servlet.jsp.JspException;
27
28 /**
29 * TODO: under construction
30 */
31 public class RichTextEditorTag extends TextInputTag
32 implements org.apache.myfaces.tobago.taglib.sandbox.RichTextEditorTagDeclaration {
33
34 private String statePreview;
35
36
37 public int doEndTag() throws JspException {
38
39 int result = super.doEndTag();
40 getComponentInstance().getFacets().remove(FACET_LAYOUT);
41 return result;
42 }
43
44 protected void setProperties(UIComponent component) {
45 super.setProperties(component);
46 ComponentUtil.setBooleanProperty(component, ATTR_STATE_PREVIEW, statePreview);
47 }
48
49 public void release() {
50 super.release();
51 statePreview = null;
52 }
53
54 public String getStatePreview() {
55 return statePreview;
56 }
57
58 public void setStatePreview(String statePreview) {
59 this.statePreview = statePreview;
60 }
61 }