All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.myfaces.custom.date.HtmlInputDateTag Maven / Gradle / Ivy

// WARNING: This file was automatically generated. Do not edit it directly,
//          or you will lose your changes.
/*
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 * 
 *  http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */
package org.apache.myfaces.custom.date;

import javax.faces.component.UIComponent;
import javax.faces.el.ValueBinding;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.el.MethodBinding;


public class HtmlInputDateTag
    extends org.apache.myfaces.shared_tomahawk.taglib.html.HtmlInputTextTag
{
    public HtmlInputDateTag()
    {    
    }
    
    public String getComponentType()
    {
        return "org.apache.myfaces.HtmlInputDate";
    }

    public String getRendererType()
    {
        return "org.apache.myfaces.Date";
    }

 
    private String _timeZone;
    
    public void setTimeZone(String timeZone)
    {
        _timeZone = timeZone;
    }
 
    private String _type;
    
    public void setType(String type)
    {
        _type = type;
    }
 
    private String _ampm;
    
    public void setAmpm(String ampm)
    {
        _ampm = ampm;
    }
 
    private String _popupCalendar;
    
    public void setPopupCalendar(String popupCalendar)
    {
        _popupCalendar = popupCalendar;
    }
 
    private String _emptyMonthSelection;
    
    public void setEmptyMonthSelection(String emptyMonthSelection)
    {
        _emptyMonthSelection = emptyMonthSelection;
    }
 
    private String _emptyAmpmSelection;
    
    public void setEmptyAmpmSelection(String emptyAmpmSelection)
    {
        _emptyAmpmSelection = emptyAmpmSelection;
    }
 
    private String _enabledOnUserRole;
    
    public void setEnabledOnUserRole(String enabledOnUserRole)
    {
        _enabledOnUserRole = enabledOnUserRole;
    }
 
    private String _visibleOnUserRole;
    
    public void setVisibleOnUserRole(String visibleOnUserRole)
    {
        _visibleOnUserRole = visibleOnUserRole;
    }
 
    private String _forceId;
    
    public void setForceId(String forceId)
    {
        _forceId = forceId;
    }
 
    private String _forceIdIndex;
    
    public void setForceIdIndex(String forceIdIndex)
    {
        _forceIdIndex = forceIdIndex;
    }
 
    private String _align;
    
    public void setAlign(String align)
    {
        _align = align;
    }

    protected void setProperties(UIComponent component)
    {
        if (!(component instanceof org.apache.myfaces.custom.date.HtmlInputDate))
        {
            throw new IllegalArgumentException("Component "+
                component.getClass().getName() +" is no org.apache.myfaces.custom.date.HtmlInputDate");
        }
        
        org.apache.myfaces.custom.date.HtmlInputDate comp = (org.apache.myfaces.custom.date.HtmlInputDate) component;
        
        super.setProperties(component);
        
        FacesContext context = getFacesContext();

        if (_timeZone != null)
        {
            if (isValueReference(_timeZone))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_timeZone);
                comp.setValueBinding("timeZone", vb);
            }
            else
            {
                comp.getAttributes().put("timeZone", _timeZone);
            }
        } 
        if (_type != null)
        {
            if (isValueReference(_type))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_type);
                comp.setValueBinding("type", vb);
            }
            else
            {
                comp.getAttributes().put("type", _type);
            }
        } 
        if (_ampm != null)
        {
            if (isValueReference(_ampm))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_ampm);
                comp.setValueBinding("ampm", vb);
            }
            else
            {
                comp.getAttributes().put("ampm", Boolean.valueOf(_ampm));
            }
        } 
        if (_popupCalendar != null)
        {
            if (isValueReference(_popupCalendar))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_popupCalendar);
                comp.setValueBinding("popupCalendar", vb);
            }
            else
            {
                comp.getAttributes().put("popupCalendar", Boolean.valueOf(_popupCalendar));
            }
        } 
        if (_emptyMonthSelection != null)
        {
            if (isValueReference(_emptyMonthSelection))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_emptyMonthSelection);
                comp.setValueBinding("emptyMonthSelection", vb);
            }
            else
            {
                comp.getAttributes().put("emptyMonthSelection", _emptyMonthSelection);
            }
        } 
        if (_emptyAmpmSelection != null)
        {
            if (isValueReference(_emptyAmpmSelection))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_emptyAmpmSelection);
                comp.setValueBinding("emptyAmpmSelection", vb);
            }
            else
            {
                comp.getAttributes().put("emptyAmpmSelection", _emptyAmpmSelection);
            }
        } 
        if (_enabledOnUserRole != null)
        {
            if (isValueReference(_enabledOnUserRole))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_enabledOnUserRole);
                comp.setValueBinding("enabledOnUserRole", vb);
            }
            else
            {
                comp.getAttributes().put("enabledOnUserRole", _enabledOnUserRole);
            }
        } 
        if (_visibleOnUserRole != null)
        {
            if (isValueReference(_visibleOnUserRole))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_visibleOnUserRole);
                comp.setValueBinding("visibleOnUserRole", vb);
            }
            else
            {
                comp.getAttributes().put("visibleOnUserRole", _visibleOnUserRole);
            }
        } 
        if (_forceId != null)
        {
            comp.getAttributes().put("forceId", Boolean.valueOf(_forceId));
        } 
        if (_forceIdIndex != null)
        {
            comp.getAttributes().put("forceIdIndex", Boolean.valueOf(_forceIdIndex));
        } 
        if (_align != null)
        {
            if (isValueReference(_align))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_align);
                comp.setValueBinding("align", vb);
            }
            else
            {
                comp.getAttributes().put("align", _align);
            }
        } 
    }

    public void release()
    {
        super.release();
        _timeZone = null;
        _type = null;
        _ampm = null;
        _popupCalendar = null;
        _emptyMonthSelection = null;
        _emptyAmpmSelection = null;
        _enabledOnUserRole = null;
        _visibleOnUserRole = null;
        _forceId = null;
        _forceIdIndex = null;
        _align = null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy