1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.internal.taglib.component;
21
22 import org.apache.myfaces.tobago.apt.annotation.Behavior;
23 import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
24 import org.apache.myfaces.tobago.apt.annotation.Facet;
25 import org.apache.myfaces.tobago.apt.annotation.Markup;
26 import org.apache.myfaces.tobago.apt.annotation.Tag;
27 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
28 import org.apache.myfaces.tobago.component.ClientBehaviors;
29 import org.apache.myfaces.tobago.component.Facets;
30 import org.apache.myfaces.tobago.component.RendererTypes;
31 import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
32 import org.apache.myfaces.tobago.internal.taglib.declaration.HasAction;
33 import org.apache.myfaces.tobago.internal.taglib.declaration.HasActionListener;
34 import org.apache.myfaces.tobago.internal.taglib.declaration.HasConfirmation;
35 import org.apache.myfaces.tobago.internal.taglib.declaration.HasFragment;
36 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
37 import org.apache.myfaces.tobago.internal.taglib.declaration.HasImage;
38 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
39 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLink;
40 import org.apache.myfaces.tobago.internal.taglib.declaration.HasOutcome;
41 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTabIndex;
42 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTarget;
43 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
44 import org.apache.myfaces.tobago.internal.taglib.declaration.IsDefaultCommand;
45 import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabledBySecurity;
46 import org.apache.myfaces.tobago.internal.taglib.declaration.IsImmediateCommand;
47 import org.apache.myfaces.tobago.internal.taglib.declaration.IsOmit;
48 import org.apache.myfaces.tobago.internal.taglib.declaration.IsTransition;
49 import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
50
51 import javax.faces.component.UICommand;
52
53
54
55
56 @Tag(name = "button")
57 @BodyContentDescription(anyTagOf = "facestag")
58 @UIComponentTag(
59 uiComponent = "org.apache.myfaces.tobago.component.UIButton",
60 uiComponentFacesClass = "javax.faces.component.UICommand",
61 interfaces = {
62 "org.apache.myfaces.tobago.component.SupportsAccessKey"
63 },
64 componentFamily = UICommand.COMPONENT_FAMILY,
65 rendererType = RendererTypes.BUTTON,
66 allowedChildComponenents = "NONE",
67 facets = {
68 @Facet(
69 name = Facets.CONFIRMATION,
70 description = "Contains a UIOutput instance with the confirmation message.",
71 allowedChildComponenents = "org.apache.myfaces.tobago.Out")
72 },
73 behaviors = {
74 @Behavior(
75 name = ClientBehaviors.CLICK,
76 description = "Behavior of a click event.",
77 isDefault = true),
78 @Behavior(
79 name = ClientBehaviors.DBLCLICK),
80 @Behavior(
81 name = ClientBehaviors.FOCUS),
82 @Behavior(
83 name = ClientBehaviors.BLUR)
84 },
85 markups = {
86 @Markup(
87 name = org.apache.myfaces.tobago.context.Markup.STRING_PRIMARY,
88 description = "Set button color to primary color of the theme."
89 ),
90 @Markup(
91 name = org.apache.myfaces.tobago.context.Markup.STRING_SECONDARY,
92 description = "Set button color to secondary color of the theme."
93 ),
94 @Markup(
95 name = org.apache.myfaces.tobago.context.Markup.STRING_SUCCESS,
96 description = "Set button color to success color of the theme."
97 ),
98 @Markup(
99 name = org.apache.myfaces.tobago.context.Markup.STRING_DANGER,
100 description = "Set button color to danger color of the theme."
101 ),
102 @Markup(
103 name = org.apache.myfaces.tobago.context.Markup.STRING_WARNING,
104 description = "Set button color to warning color of the theme."
105 ),
106 @Markup(
107 name = org.apache.myfaces.tobago.context.Markup.STRING_INFO,
108 description = "Set button color to info color of the theme."
109 ),
110 @Markup(
111 name = org.apache.myfaces.tobago.context.Markup.STRING_LIGHT,
112 description = "Set button color to light color of the theme."
113 ),
114 @Markup(
115 name = org.apache.myfaces.tobago.context.Markup.STRING_DARK,
116 description = "Set button color to dark color of the theme."
117 ),
118 @Markup(
119 name = org.apache.myfaces.tobago.context.Markup.STRING_NONE,
120 description = "Colorless button."
121 ),
122 @Markup(
123 name = org.apache.myfaces.tobago.context.Markup.STRING_BADGE,
124 description = "Display the button as a badge."
125 ),
126 @Markup(
127 name = org.apache.myfaces.tobago.context.Markup.STRING_PILL,
128 description = "Make badges more rounded if button is displayed as a badge."
129 )
130 })
131 public interface ButtonTagDeclaration
132 extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
133 HasLink, HasOutcome, HasFragment, IsTransition, HasTarget, IsDisabledBySecurity,
134 IsOmit, IsVisual, HasLabel, HasAccessKey, HasTip, HasImage,
135 IsDefaultCommand, HasTabIndex {
136 }