Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.renderkit
Class CalendarRendererBase

    java.lang.Object
      javax.faces.render.Renderer
          org.ajax4jsf.renderkit.RendererBase
              org.ajax4jsf.renderkit.HeaderResourcesRendererBase
                  org.richfaces.renderkit.TemplateEncoderRendererBase
                      org.richfaces.renderkit.CalendarRendererBase

All Implemented Interfaces:
  org.ajax4jsf.renderkit.ChameleonRenderer, org.ajax4jsf.renderkit.HeaderResourceProducer, org.ajax4jsf.renderkit.HeaderResourceProducer2, org.ajax4jsf.resource.ResourceProduser

Direct Known Subclasses:
  CalendarRenderer

    public class CalendarRendererBase

extends org.richfaces.renderkit.TemplateEncoderRendererBase

Author:
  Nick Belaevski - mailto:nbelaevski@exadel.com created 08.06.2007

Field Summary
`static java.lang.String` | `CALENDAR_BUNDLE`
`static java.lang.String` | `CURRENT_DATE_INPUT` The constant used to resolve id of hidden input placed on the page for storing current date in "MM/yyyy" format.
`static java.lang.String` | `CURRENT_DATE_PRELOAD`
`protected static java.lang.String` | `MARKUP_SUFFIX`
`protected static java.lang.String` | `MONTH_LABELS`
`protected static java.lang.String` | `MONTH_LABELS_SHORT`
`protected static java.lang.String` | `WEEK_DAY_LABELS`
`protected static java.lang.String` | `WEEK_DAY_LABELS_SHORT`

Fields inherited from class org.ajax4jsf.renderkit.RendererBase
`JAVASCRIPT_NAMESPACE`

Constructor Summary
`CalendarRendererBase()`

Method Summary
`void` | `addPopupToAjaxRendered(javax.faces.context.FacesContext context, UICalendar component)`
`protected static javax.faces.convert.Converter` | `createDefaultConverter()` Creates default `DateTimeConverter` for the calendar
`void` | `dayCellClass(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`protected void` | `doDecode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`void` | `encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent calendar)`
`static java.lang.Object` | `formatDate(java.util.Date date)`
`static java.lang.Object` | `formatSelectedDate(java.util.TimeZone timeZone, java.util.Date date)`
`protected java.lang.Class<? extends javax.faces.component.UIComponent>` | `getComponentClass()`
`java.lang.Object` | `getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object submittedValue)`
`java.lang.Object` | `getCurrentDate(javax.faces.context.FacesContext context, UICalendar calendar, java.util.Date date)`
`java.lang.String` | `getCurrentDateAsString(javax.faces.context.FacesContext context, UICalendar calendar, java.util.Date date)`
`java.lang.String` | `getDayCellClass(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`org.ajax4jsf.javascript.JSReference` | `getDayStyleClass(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`protected java.util.Map<java.lang.String,java.lang.Object>` | `getDefaultSymbolsMap(UICalendar calendar)`
`protected java.lang.String` | `getFormattedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object currentValue)`
`protected java.lang.String` | `getFormattedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object currentValue, javax.faces.convert.Converter converter)` Overloads getFormattedValue to take a advantage of a previously obtained converter.
`java.lang.String` | `getInputValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`org.ajax4jsf.javascript.JSReference` | `getIsDayEnabled(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`java.util.Map<java.lang.String,java.lang.Object>` | `getLabels(javax.faces.context.FacesContext context, UICalendar calendar)`
`java.lang.String` | `getPreparedDefaultTime(UICalendar component)` Returns hours and minutes from "defaultTime" attribute as a String with special format: hours:"value_hours",minutes:"value_minutes"
`java.lang.Object` | `getSelectedDate(javax.faces.context.FacesContext context, UICalendar calendar)`
`java.lang.Object` | `getSubmitFunction(javax.faces.context.FacesContext context, UICalendar calendar)`
`protected java.util.Map<java.lang.String,java.lang.Object>` | `getSymbolsMap(javax.faces.context.FacesContext facesContext, UICalendar calendar)`
`protected static javax.faces.convert.Converter` | `setupDefaultConverter(javax.faces.convert.Converter converter, UICalendar calendar)` Setup the default converter provided by JSF API (`DateTimeConverter`) with the component settings
`void` | `writeDefaultSymbols(javax.faces.context.FacesContext facesContext, UICalendar calendar)`
`void` | `writeFacetMarkupScriptBody(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String facetName)`
`void` | `writeMarkupScriptBody(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, boolean children)`
`void` | `writeOptionalFacetMarkupScriptBody(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String facetName)`
`void` | `writePreloadBody(javax.faces.context.FacesContext context, UICalendar calendar)`

Methods inherited from class org.richfaces.renderkit.TemplateEncoderRendererBase
`createContentHandler, getRendersChildren, main, writeScriptBody, writeScriptBody`

Methods inherited from class org.ajax4jsf.renderkit.HeaderResourcesRendererBase
`encodeResourcesArray, encodeToHead, getHeaderScripts, getHeaderStyles, getScripts, getStyles`

Methods inherited from class org.ajax4jsf.renderkit.RendererBase
`addResource, decode, doEncodeBegin, doEncodeChildren, doEncodeEnd, encodeBegin, encodeEnd, getResource, getSkin, getUtils, preDecode, preEncodeBegin, renderChild, renderChildren`

Methods inherited from class javax.faces.render.Renderer
`convertClientId`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MONTH_LABELS_SHORT

    protected static final java.lang.String MONTH_LABELS_SHORT

See Also:
  Constant Field Values

### MONTH_LABELS

    protected static final java.lang.String MONTH_LABELS

See Also:
  Constant Field Values

### WEEK_DAY_LABELS_SHORT

    protected static final java.lang.String WEEK_DAY_LABELS_SHORT

See Also:
  Constant Field Values

### WEEK_DAY_LABELS

    protected static final java.lang.String WEEK_DAY_LABELS

See Also:
  Constant Field Values

### CURRENT_DATE_INPUT

    public static final java.lang.String CURRENT_DATE_INPUT

  The constant used to resolve id of hidden input placed on the page for storing current date in "MM/yyyy" format. Actual id of hidden input used on the page is #{clientId}InputCurrentDate

  See Also:
    Constant Field Values

### CURRENT_DATE_PRELOAD

    public static final java.lang.String CURRENT_DATE_PRELOAD

See Also:
  Constant Field Values

### MARKUP_SUFFIX

    protected static final java.lang.String MARKUP_SUFFIX

See Also:
  Constant Field Values

### CALENDAR_BUNDLE

    public static final java.lang.String CALENDAR_BUNDLE

See Also:
  Constant Field Values

Constructor Detail

### CalendarRendererBase

    public CalendarRendererBase()

Method Detail

### getComponentClass

    protected java.lang.Class<? extends javax.faces.component.UIComponent> getComponentClass()

  Specified by:
    `getComponentClass` in class `org.ajax4jsf.renderkit.RendererBase`

### addPopupToAjaxRendered

    public void addPopupToAjaxRendered(javax.faces.context.FacesContext context,
                                       UICalendar component)

### getConvertedValue

    public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
                                              javax.faces.component.UIComponent component,
                                              java.lang.Object submittedValue)
                                       throws javax.faces.convert.ConverterException

  Overrides:
    `getConvertedValue` in class `javax.faces.render.Renderer`
  Throws:
    `javax.faces.convert.ConverterException`

### getPreparedDefaultTime

    public java.lang.String getPreparedDefaultTime(UICalendar component)

  Returns hours and minutes from "defaultTime" attribute as a String with special format: hours:"value_hours",minutes:"value_minutes"

  Parameters:
    `calendar` - - UICalendar
  Returns:
    hours and minutes from "defaultTime" attribute

### getFormattedValue

    protected java.lang.String getFormattedValue(javax.faces.context.FacesContext context,
                                                 javax.faces.component.UIComponent component,
                                                 java.lang.Object currentValue,
                                                 javax.faces.convert.Converter converter)
                                          throws javax.faces.convert.ConverterException

  Overloads getFormattedValue to take a advantage of a previously obtained converter.

  Parameters:
    `context` - the FacesContext for the current request
    `component` - UIComponent of interest
    `currentValue` - the current value of `component`
    `converter` - the component's converter
  Returns:
    the currentValue after any associated Converter has been applied
  Throws:
    `javax.faces.convert.ConverterException` - if the value cannot be converted

### getFormattedValue

    protected java.lang.String getFormattedValue(javax.faces.context.FacesContext context,
                                                 javax.faces.component.UIComponent component,
                                                 java.lang.Object currentValue)
                                          throws javax.faces.convert.ConverterException

  Parameters:
    `context` - the FacesContext for the current request
    `component` - UIComponent of interest
    `currentValue` - the current value of `component`
  Returns:
    the currentValue after any associated Converter has been applied
  Throws:
    `javax.faces.convert.ConverterException` - if the value cannot be converted

### createDefaultConverter

    protected static javax.faces.convert.Converter createDefaultConverter()

  Creates default `DateTimeConverter` for the calendar

  Parameters:
    `calendar` - - calendar component
  Returns:
    created converter

### setupDefaultConverter

    protected static javax.faces.convert.Converter setupDefaultConverter(javax.faces.convert.Converter converter,
                                                                         UICalendar calendar)

  Setup the default converter provided by JSF API (`DateTimeConverter`) with the component settings

  Parameters:
    `converter` -
    `calendar` -
  Returns:

### doDecode

    protected void doDecode(javax.faces.context.FacesContext context,
                            javax.faces.component.UIComponent component)

  Overrides:
    `doDecode` in class `org.ajax4jsf.renderkit.RendererBase`

### encodeChildren

    public void encodeChildren(javax.faces.context.FacesContext context,
                               javax.faces.component.UIComponent calendar)
                        throws java.io.IOException

  Overrides:
    `encodeChildren` in class `org.richfaces.renderkit.TemplateEncoderRendererBase`
  Throws:
    `java.io.IOException`

### getIsDayEnabled

    public org.ajax4jsf.javascript.JSReference getIsDayEnabled(javax.faces.context.FacesContext context,
                                                               javax.faces.component.UIComponent component)

### getDayStyleClass

    public org.ajax4jsf.javascript.JSReference getDayStyleClass(javax.faces.context.FacesContext context,
                                                                javax.faces.component.UIComponent component)

### writeMarkupScriptBody

    public void writeMarkupScriptBody(javax.faces.context.FacesContext context,
                                      javax.faces.component.UIComponent component,
                                      boolean children)
                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeOptionalFacetMarkupScriptBody

    public void writeOptionalFacetMarkupScriptBody(javax.faces.context.FacesContext context,
                                                   javax.faces.component.UIComponent component,
                                                   java.lang.String facetName)
                                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### dayCellClass

    public void dayCellClass(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component)
                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### getDayCellClass

    public java.lang.String getDayCellClass(javax.faces.context.FacesContext context,
                                            javax.faces.component.UIComponent component)

### writeFacetMarkupScriptBody

    public void writeFacetMarkupScriptBody(javax.faces.context.FacesContext context,
                                           javax.faces.component.UIComponent component,
                                           java.lang.String facetName)
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### writePreloadBody

    public void writePreloadBody(javax.faces.context.FacesContext context,
                                 UICalendar calendar)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### getSubmitFunction

    public java.lang.Object getSubmitFunction(javax.faces.context.FacesContext context,
                                              UICalendar calendar)
                                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### getInputValue

    public java.lang.String getInputValue(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIComponent component)

### writeDefaultSymbols

    public void writeDefaultSymbols(javax.faces.context.FacesContext facesContext,
                                    UICalendar calendar)
                             throws java.io.IOException

  Throws:
    `java.io.IOException`

### getSymbolsMap

    protected java.util.Map<java.lang.String,java.lang.Object> getSymbolsMap(javax.faces.context.FacesContext facesContext,
                                                                             UICalendar calendar)

### getDefaultSymbolsMap

    protected java.util.Map<java.lang.String,java.lang.Object> getDefaultSymbolsMap(UICalendar calendar)

### getCurrentDateAsString

    public java.lang.String getCurrentDateAsString(javax.faces.context.FacesContext context,
                                                   UICalendar calendar,
                                                   java.util.Date date)
                                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### getCurrentDate

    public java.lang.Object getCurrentDate(javax.faces.context.FacesContext context,
                                           UICalendar calendar,
                                           java.util.Date date)
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### getSelectedDate

    public java.lang.Object getSelectedDate(javax.faces.context.FacesContext context,
                                            UICalendar calendar)
                                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### formatDate

    public static java.lang.Object formatDate(java.util.Date date)

### formatSelectedDate

    public static java.lang.Object formatSelectedDate(java.util.TimeZone timeZone,
                                                      java.util.Date date)

### getLabels

    public java.util.Map<java.lang.String,java.lang.Object> getLabels(javax.faces.context.FacesContext context,
                                                                      UICalendar calendar)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.