Class YuiDatePicker
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.hippoecm.frontend.plugins.yui.AbstractYuiBehavior
-
- org.hippoecm.frontend.plugins.yui.datetime.YuiDatePicker
-
- All Implemented Interfaces:
Serializable
,org.apache.wicket.IComponentAwareEventSink
,org.apache.wicket.markup.html.IComponentAwareHeaderContributor
,org.apache.wicket.util.io.IClusterable
public class YuiDatePicker extends AbstractYuiBehavior
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description YuiDatePicker(YuiDatePickerSettings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeaderContribution(IYuiContext helper)
Override this method to get access to the IYuiContextvoid
afterRender(org.apache.wicket.Component component)
void
bind(org.apache.wicket.Component component)
protected String
getDatePattern()
Gets the date pattern to use for putting selected values in the coupled component.protected String
getEscapedComponentMarkupId()
Gets the escaped DOM id that the calendar widget will get attached to.protected Icon
getIcon()
Gets theIcon
for the popup button.protected String
getIconId()
Gets the id of the icon that triggers the popup.protected String
getIconStyle()
Gets the style of the icon that triggers the popup.protected Locale
getLocale()
Gets the locale that should be used to configure this widget.protected boolean
renderOnLoad()
Indicates whether the calendar should be rendered after it has been loaded.-
Methods inherited from class org.hippoecm.frontend.plugins.yui.AbstractYuiBehavior
getComponent, onRenderHead, renderHead
-
-
-
-
Constructor Detail
-
YuiDatePicker
public YuiDatePicker(YuiDatePickerSettings settings)
-
-
Method Detail
-
addHeaderContribution
public void addHeaderContribution(IYuiContext helper)
Description copied from class:AbstractYuiBehavior
Override this method to get access to the IYuiContext- Overrides:
addHeaderContribution
in classAbstractYuiBehavior
- Parameters:
helper
- The IYuiContext this behavior can use to register YUI-modules and the likes.
-
afterRender
public void afterRender(org.apache.wicket.Component component)
- Overrides:
afterRender
in classorg.apache.wicket.behavior.Behavior
-
renderOnLoad
protected boolean renderOnLoad()
Indicates whether the calendar should be rendered after it has been loaded.- Returns:
true
if the calendar should be rendered after it has been loaded.
false
(default) if it's initially hidden.
-
getEscapedComponentMarkupId
protected final String getEscapedComponentMarkupId()
Gets the escaped DOM id that the calendar widget will get attached to. All non word characters (\W) will be removed from the string.- Returns:
- The DOM id of the calendar widget - same as the component's markup id + 'Dp'}
-
getIconId
protected final String getIconId()
Gets the id of the icon that triggers the popup.- Returns:
- The id of the icon
-
getIconStyle
protected String getIconStyle()
Gets the style of the icon that triggers the popup.- Returns:
- The style of the icon, e.g. 'cursor: point' etc.
-
getIcon
protected Icon getIcon()
Gets theIcon
for the popup button. Users can override to provide their own icon.- Returns:
- the icon to use for the popup button
-
getLocale
protected Locale getLocale()
Gets the locale that should be used to configure this widget.- Returns:
- By default, the locale of the bound component.
-
bind
public void bind(org.apache.wicket.Component component)
- Overrides:
bind
in classAbstractYuiBehavior
-
getDatePattern
protected String getDatePattern()
Gets the date pattern to use for putting selected values in the coupled component.- Returns:
- The date pattern
-
-