Package org.richfaces.component

Examples of org.richfaces.component.UICalendar


      String newValue = (String) submittedValue;
      // if we have no local value, try to get the valueExpression.
      ValueExpression valueExpression = component.getValueExpression("value");
      Converter converter = null;
     
      UICalendar calendar = (UICalendar) component;
      converter = calendar.getConverter();
     
      if ((converter == null) && (valueExpression != null)) {
    Class<? extends Object> converterType = valueExpression.getType(context.getELContext());
    if((converterType != null) && (converterType != Object.class)) {
        // if getType returns a type for which we support a default
View Full Code Here


    if (currentValue != null) {
        return currentValue.toString();
    }
    return null;
      }
      UICalendar calendar = (UICalendar) component;
     
      // if value is null and no converter attribute is specified, then
      // return a zero length String.
      if(currentValue == null) {
    return "";
      }
     
      if (converter == null) {
    // If there is a converter attribute, use it to to ask application
    // instance for a converter with this identifier.
    converter = calendar.getConverter();
      }
     
      if (converter == null) {
    // Do not look for "by-type" converters for Strings
    if (currentValue instanceof String) {
View Full Code Here

  }

  public void writeClass(FacesContext context, UIComponent component)
      throws IOException {

    UICalendar calendar = (UICalendar) component;
    String styleClass = (String) calendar.getAttributes().get("styleClass");
    if (styleClass != null && styleClass.length() != 0) {
      ResponseWriter writer = context.getResponseWriter();
      writer.writeText(",\n className: '" + styleClass + "'", null);
    }
  }
View Full Code Here

  }

  public void writeDayStyleClass(FacesContext context, UIComponent component)
      throws IOException {

    UICalendar calendar = (UICalendar) component;
    String dayStyleClass = (String) calendar.getAttributes().get(
        "dayStyleClass");
    if (dayStyleClass != null && dayStyleClass.length() != 0) {
      ResponseWriter writer = context.getResponseWriter();
      writer.writeText(",\n dayStyleClass: " + dayStyleClass, null);
    }
View Full Code Here

  }

  public void writeIsDayEnabled(FacesContext context, UIComponent component)
      throws IOException {
    UICalendar calendar = (UICalendar) component;
    String isDayEnabled = (String) calendar.getAttributes().get(
        "isDayEnabled");
    if (isDayEnabled != null && isDayEnabled.length() != 0) {
      ResponseWriter writer = context.getResponseWriter();
      writer.writeText(",\n isDayEnabled: " + isDayEnabled, null);
    }
View Full Code Here

          + onEventDefinition.toScript(), null);
    }
  }

  public String getInputValue(FacesContext context, UIComponent component) {
    UICalendar calendar = (UICalendar) component;
    // Fix for myFaces 1.1.x RF-997
    String returnValue = null;
    Object value = calendar.getSubmittedValue();
    if (value != null) {
        try {
      returnValue =  getFormattedValue(context, calendar, value);
        } catch (Exception e) {
      if (log.isDebugEnabled()) {
          log.debug(" InputValue: " + e.toString(), e);
      }
      returnValue = (String)value;
        }
          } else {
              returnValue =  getFormattedValue(context, calendar, calendar.getValue())
          }
   
    return returnValue;
  }
View Full Code Here

      String newValue = (String) submittedValue;
      // if we have no local value, try to get the valueExpression.
      ValueExpression valueExpression = component.getValueExpression("value");
      Converter converter = null;
     
      UICalendar calendar = (UICalendar) component;
      converter = calendar.getConverter();
     
      if ((converter == null) && (valueExpression != null)) {
    Class<? extends Object> converterType = valueExpression.getType(context.getELContext());
    if((converterType != null) && (converterType != Object.class)) {
        // if getType returns a type for which we support a default
View Full Code Here

    if (currentValue != null) {
        return currentValue.toString();
    }
    return null;
      }
      UICalendar calendar = (UICalendar) component;
     
      // if value is null and no converter attribute is specified, then
      // return a zero length String.
      if(currentValue == null) {
    return "";
      }
     
      if (converter == null) {
    // If there is a converter attribute, use it to to ask application
    // instance for a converter with this identifier.
    converter = calendar.getConverter();
      }
     
      if (converter == null) {
    // Do not look for "by-type" converters for Strings
    if (currentValue instanceof String) {
View Full Code Here

      throws IOException {

  }

  public JSReference getIsDayEnabled(FacesContext context, UIComponent component) {
    UICalendar calendar = (UICalendar) component;
    String isDayEnabled = (String) calendar.getAttributes().get(
        "isDayEnabled");
    if (isDayEnabled != null && isDayEnabled.length() != 0) {
      return new JSReference(isDayEnabled); //new JSFunction(isDayEnabled);
    }
   
View Full Code Here

   
    return null;
  }
 
  public JSReference getDayStyleClass(FacesContext context, UIComponent component) {
    UICalendar calendar = (UICalendar) component;
    String dayStyleClass = (String) calendar.getAttributes().get(
        "dayStyleClass");
    if (dayStyleClass != null && dayStyleClass.length() != 0) {
      return new JSReference(dayStyleClass);
    }
   
View Full Code Here

TOP

Related Classes of org.richfaces.component.UICalendar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.