Class UIStars
- java.lang.Object
-
- javax.faces.component.UIComponent
-
- javax.faces.component.UIComponentBase
-
- javax.faces.component.UIOutput
-
- javax.faces.component.UIInput
-
- org.apache.myfaces.tobago.internal.component.AbstractUIStars
-
- org.apache.myfaces.tobago.component.UIStars
-
- All Implemented Interfaces:
EventListener
,javax.faces.component.behavior.ClientBehaviorHolder
,javax.faces.component.EditableValueHolder
,javax.faces.component.PartialStateHolder
,javax.faces.component.StateHolder
,javax.faces.component.ValueHolder
,javax.faces.event.ComponentSystemEventListener
,javax.faces.event.FacesListener
,javax.faces.event.SystemEventListenerHolder
,SupportFieldId
,SupportsLabelLayout
,Visual
@Generated("component.stg") public class UIStars extends AbstractUIStars
Renders a star rating component. UIComponent class, generated from templatecomponent.stg
with classStarsTagDeclaration
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_FAMILY
static String
COMPONENT_TYPE
-
Constructor Summary
Constructors Constructor Description UIStars()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomClass
getCustomClass()
Sets a CSS class in its parent, if the parent supports it.String
getDefaultEventName()
Collection<String>
getEventNames()
String
getFamily()
String
getLabel()
A localized user presentable label for this component.LabelLayout
getLabelLayout()
Defines the position of the label relative to the field.Markup
getMarkup()
Integer
getMax()
The maximum value must be > '0'.Double
getPlaceholder()
The placeholder value is displayed if no star is set by the user.Integer
getTabIndex()
Controls the navigation of the focus through the input controls on a page with the Tab-Key.String
getTip()
Text value to display as tooltip.boolean
isDisabled()
Flag indicating that this element is disabled.boolean
isFocus()
Flag indicating this component should receive the focus.boolean
isReadonly()
Flag indicating that this component will prohibit changes by the user.void
restoreState(javax.faces.context.FacesContext context, Object state)
void
setCustomClass(CustomClass customClass)
void
setDisabled(boolean disabled)
void
setFocus(boolean focus)
void
setLabel(String label)
void
setLabelLayout(LabelLayout labelLayout)
void
setMarkup(Markup markup)
void
setMax(Integer max)
void
setPlaceholder(Double placeholder)
void
setReadonly(boolean readonly)
void
setTabIndex(Integer tabIndex)
void
setTip(String tip)
-
Methods inherited from class org.apache.myfaces.tobago.internal.component.AbstractUIStars
getFieldId, getRangeMax, getRangeValue, isLabelLayoutSkip, processEvent
-
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue
-
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
-
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
-
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors
-
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
-
Methods inherited from interface org.apache.myfaces.tobago.component.Visual
getRendererType, isPlain
-
-
-
-
Field Detail
-
COMPONENT_TYPE
public static final String COMPONENT_TYPE
-
COMPONENT_FAMILY
public static final String COMPONENT_FAMILY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEventNames
public Collection<String> getEventNames()
- Specified by:
getEventNames
in interfacejavax.faces.component.behavior.ClientBehaviorHolder
- Overrides:
getEventNames
in classjavax.faces.component.UIComponentBase
-
getDefaultEventName
public String getDefaultEventName()
- Specified by:
getDefaultEventName
in interfacejavax.faces.component.behavior.ClientBehaviorHolder
- Overrides:
getDefaultEventName
in classjavax.faces.component.UIComponentBase
-
getFamily
public String getFamily()
- Overrides:
getFamily
in classjavax.faces.component.UIInput
-
getMarkup
public Markup getMarkup()
-
setMarkup
public void setMarkup(Markup markup)
-
getMax
public Integer getMax()
The maximum value must be > '0'. Default is '5'. To split stars, set a higher maximum value. E.g. set '10' for half stars, set '20' for quarter stars.- Specified by:
getMax
in classAbstractUIStars
-
setMax
public void setMax(Integer max)
-
getLabelLayout
public LabelLayout getLabelLayout()
Defines the position of the label relative to the field. The default is flexLeft, if the label is set, or none, if the label isn't set. Set to 'skip' to avoid surrounding label container. Hint for tc:out: set also compact=true to render only text (without html tags).
-
setLabelLayout
public void setLabelLayout(LabelLayout labelLayout)
-
isFocus
public boolean isFocus()
Flag indicating this component should receive the focus.
Default:false
- Specified by:
isFocus
in classAbstractUIStars
-
setFocus
public void setFocus(boolean focus)
-
getTabIndex
public Integer getTabIndex()
Controls the navigation of the focus through the input controls on a page with the Tab-Key. The navigation starts from the element with the lowest tabIndex value to the element with the highest value. Elements that have identical tabIndex values should be navigated in the order they appear in the character stream Elements that are disabled or with a negative tabIndex do not participate in the tabbing order.- Specified by:
getTabIndex
in classAbstractUIStars
-
setTabIndex
public void setTabIndex(Integer tabIndex)
-
getLabel
public String getLabel()
A localized user presentable label for this component.
-
setLabel
public void setLabel(String label)
-
isReadonly
public boolean isReadonly()
Flag indicating that this component will prohibit changes by the user.
Default:false
- Specified by:
isReadonly
in classAbstractUIStars
-
setReadonly
public void setReadonly(boolean readonly)
-
getCustomClass
public CustomClass getCustomClass()
Sets a CSS class in its parent, if the parent supports it. Which this feature it is possible to put a CSS class name into a component with the <tc:style> tag. Example:<tc:in> <tc:style customClass="my-emphasized"/> </tc:in>
One capability is, to used external CSS libs.
This feature should not be used imprudent. Because it might be unstable against changes in the renderered HTML code.
-
setCustomClass
public void setCustomClass(CustomClass customClass)
-
isDisabled
public boolean isDisabled()
Flag indicating that this element is disabled.
Default:false
- Specified by:
isDisabled
in classAbstractUIStars
-
setDisabled
public void setDisabled(boolean disabled)
-
getTip
public String getTip()
Text value to display as tooltip.
-
setTip
public void setTip(String tip)
-
getPlaceholder
public Double getPlaceholder()
The placeholder value is displayed if no star is set by the user. Value must be between '0' and '5'. The placeholder can show values which are not selectable by the user. E.g. if only full stars are available for the user, the placeholder can show a 4.6 star rating.- Specified by:
getPlaceholder
in classAbstractUIStars
-
setPlaceholder
public void setPlaceholder(Double placeholder)
-
restoreState
public void restoreState(javax.faces.context.FacesContext context, Object state)
- Specified by:
restoreState
in interfacejavax.faces.component.StateHolder
- Overrides:
restoreState
in classjavax.faces.component.UIInput
-
-