001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.taglib.ui;
022:
023: import com.liferay.taglib.util.IncludeTag;
024:
025: import javax.servlet.ServletRequest;
026: import javax.servlet.jsp.JspException;
027:
028: /**
029: * <a href="InputTimeTag.java.html"><b><i>View Source</i></b></a>
030: *
031: * @author Brian Wing Shun Chan
032: *
033: */
034: public class InputTimeTag extends IncludeTag {
035:
036: public int doStartTag() throws JspException {
037: ServletRequest req = pageContext.getRequest();
038:
039: req.setAttribute("liferay-ui:input-time:hourParam", _hourParam);
040: req.setAttribute("liferay-ui:input-time:hourValue", String
041: .valueOf(_hourValue));
042: req.setAttribute("liferay-ui:input-time:hourNullable", String
043: .valueOf(_hourNullable));
044: req.setAttribute("liferay-ui:input-time:minuteParam",
045: _minuteParam);
046: req.setAttribute("liferay-ui:input-time:minuteValue", String
047: .valueOf(_minuteValue));
048: req.setAttribute("liferay-ui:input-time:minuteNullable", String
049: .valueOf(_minuteNullable));
050: req.setAttribute("liferay-ui:input-time:minuteInterval", String
051: .valueOf(_minuteInterval));
052: req.setAttribute("liferay-ui:input-time:amPmParam", _amPmParam);
053: req.setAttribute("liferay-ui:input-time:amPmValue", String
054: .valueOf(_amPmValue));
055: req.setAttribute("liferay-ui:input-time:amPmNullable", String
056: .valueOf(_amPmNullable));
057: req.setAttribute("liferay-ui:input-time:disabled", String
058: .valueOf(_disabled));
059:
060: return EVAL_BODY_BUFFERED;
061: }
062:
063: public void setHourParam(String hourParam) {
064: _hourParam = hourParam;
065: }
066:
067: public void setHourValue(int hourValue) {
068: _hourValue = hourValue;
069: }
070:
071: public void setHourNullable(boolean hourNullable) {
072: _hourNullable = hourNullable;
073: }
074:
075: public void setMinuteParam(String minuteParam) {
076: _minuteParam = minuteParam;
077: }
078:
079: public void setMinuteValue(int minuteValue) {
080: _minuteValue = minuteValue;
081: }
082:
083: public void setMinuteNullable(boolean minuteNullable) {
084: _minuteNullable = minuteNullable;
085: }
086:
087: public void setMinuteInterval(int minuteInterval) {
088: _minuteInterval = minuteInterval;
089: }
090:
091: public void setAmPmParam(String amPmParam) {
092: _amPmParam = amPmParam;
093: }
094:
095: public void setAmPmValue(int amPmValue) {
096: _amPmValue = amPmValue;
097: }
098:
099: public void setAmPmNullable(boolean amPmNullable) {
100: _amPmNullable = amPmNullable;
101: }
102:
103: public void setDisabled(boolean disabled) {
104: _disabled = disabled;
105: }
106:
107: protected String getDefaultPage() {
108: return _PAGE;
109: }
110:
111: private static final String _PAGE = "/html/taglib/ui/input_time/page.jsp";
112:
113: private String _hourParam;
114: private int _hourValue;
115: private boolean _hourNullable;
116: private String _minuteParam;
117: private int _minuteValue;
118: private boolean _minuteNullable;
119: private int _minuteInterval;
120: private String _amPmParam;
121: private int _amPmValue;
122: private boolean _amPmNullable;
123: private boolean _disabled;
124:
125: }
|