|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.markup.html.WebComponent
org.apache.wicket.extensions.yui.calendar.AbstractCalendar
public abstract class AbstractCalendar
Abstract calendar component based on the YUI (Yahoo User Interface library) javascript widget.
Although this component by itself is fully functional, it doesn't do much other than just displaying the calendar. Hence, this class is abstract.
An easy way to build upon this component is to override
appendToInit(String, String, String, StringBuffer)
and add event handlers etc. in the
YUI widget's initialization function.
DatePicker
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
Field Summary | |
---|---|
static DateFormat |
FORMAT_DATE
Format to be used when configuring YUI calendar. |
static DateFormat |
FORMAT_PAGEDATE
For specifying which page (month/year) to show in the calendar, use this format for the date. |
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
AbstractCalendar(String id)
Construct. |
|
AbstractCalendar(String id,
boolean contributeDependencies)
Construct. |
Method Summary | |
---|---|
protected void |
appendToInit(String markupId,
String javascriptId,
String javascriptWidgetId,
StringBuffer b)
Append javascript to the initialization function for the YUI widget. |
protected void |
configureWidgetProperties(Map<Object,Object> widgetProperties)
Gives overriding classes the option of adding (or even changing/ removing) configuration properties for the javascript widget. |
String |
getJavascriptId()
Gets the id of the javascript widget. |
String |
getJavascriptWidgetId()
The name spaced id of the widget. |
Methods inherited from class org.apache.wicket.markup.html.WebComponent |
---|
onRender |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DateFormat FORMAT_DATE
public static final DateFormat FORMAT_PAGEDATE
Constructor Detail |
---|
public AbstractCalendar(String id)
id
- The component idpublic AbstractCalendar(String id, boolean contributeDependencies)
id
- The component idcontributeDependencies
- Whether to contribute the packaged dependencies. Pass false in case you want to
include the dependencies manually in your own page, e.g. when you want to keep
them in your web application dir. To contribute yourself (in case you want to pass
false), your page header should look like:
<script type="text/javascript" src="yahoo.js"></script> <script type="text/javascript" src="dom.js"></script> <script type="text/javascript" src="event.js"></script> <script type="text/javascript" src="calendar.js"></script> <link rel="stylesheet" type="text/css" href="calendar.css" />
Method Detail |
---|
public final String getJavascriptId()
getJavascriptWidgetId()
.
getJavascriptWidgetId()
public final String getJavascriptWidgetId()
getJavascriptId()
protected void appendToInit(String markupId, String javascriptId, String javascriptWidgetId, StringBuffer b)
markupId
- The markup id of the calendar componentjavascriptId
- the non-name spaced javascript id of the widgetjavascriptWidgetId
- the name space id of the widgetb
- the buffer to append the script toprotected void configureWidgetProperties(Map<Object,Object> widgetProperties)
super.configureWidgetProperties(properties)
.
widgetProperties
- the current widget properties
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |