You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by ra...@apache.org on 2005/08/10 20:25:16 UTC
svn commit: r231290 - in /jakarta/taglibs/proper/rdc/trunk: examples/web/
src/META-INF/tags/rdc/ src/META-INF/tags/rdc/config/
src/org/apache/taglibs/rdc/ xml/
Author: rahul
Date: Wed Aug 10 11:25:09 2005
New Revision: 231290
URL: http://svn.apache.org/viewcvs?rev=231290&view=rev
Log:
Resolved BZ# 35490 [Submitted by Elam Birnbaum]
Thanks Elam!
Added:
jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp (with props)
jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeEndDate.xml (with props)
jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeStartDate.xml (with props)
jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.rdc (with props)
jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag (with props)
jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRange.java (with props)
jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRangeData.java (with props)
Modified:
jakarta/taglibs/proper/rdc/trunk/xml/rdc.xml
Added: jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp?rev=231290&view=auto
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp (added)
+++ jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp Wed Aug 10 11:25:09 2005
@@ -0,0 +1,28 @@
+<!--Example:Start-->
+<%--
+ Copyright 2004 The Apache Software Foundation.
+ Licensed 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.
+--%>
+<!--
+<%@ page language="java" contentType="application/voicexml+xml" %>
+<%@ taglib prefix="rdc" uri="http://jakarta.apache.org/taglibs/rdc-1.0"%>
+-->
+<vxml version="2.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/vxml" >
+ <jsp:useBean id="dialogMap" class="java.util.LinkedHashMap" scope="session"/>
+ <rdc:task map="${dialogMap}">
+
+ <rdc:dateRange id="myDateRange" confirm="true" echo="false"/>
+
+ </rdc:task>
+</vxml>
+<!--Example:End-->
Propchange: jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/taglibs/proper/rdc/trunk/examples/web/dateRange-test.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeEndDate.xml
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeEndDate.xml?rev=231290&view=auto
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeEndDate.xml (added)
+++ jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeEndDate.xml Wed Aug 10 11:25:09 2005
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<config>
+<!--
+ Copyright 2004 The Apache Software Foundation.
+
+ Licensed 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.
+-->
+ <input>
+ <property-list>
+ <property name="incompletetimeout" value="1s"/>
+ <property name="completetimeout" value="1s"/>
+ </property-list>
+ <prompt-list>
+ <prompt>Please specify an ending date.</prompt>
+ </prompt-list>
+ <help-list>
+ <help>
+ <prompt>Please specify a complete ending date.</prompt>
+ </help>
+ <help>
+ <prompt>For instance, say January first, 2004.</prompt>
+ </help>
+ <help>
+ <prompt>You can also use alternate forms like first of April.</prompt>
+ </help>
+ </help-list>
+ <noinput-list>
+ <noinput>
+ <prompt>I did not hear you speak an ending date.</prompt>
+ </noinput>
+ <noinput>
+ <prompt>Could you please repeat the ending date?</prompt>
+ </noinput>
+ <noinput>
+ <prompt>I appear to be having trouble hearing you.
+ Waiting for you to say an ending date.</prompt>
+ </noinput>
+ </noinput-list>
+ <nomatch-list>
+ <nomatch>
+ <prompt>I'm sorry, I was expecting a date.</prompt>
+ </nomatch>
+ <nomatch>
+ <prompt>Could you repeat that please?</prompt>
+ </nomatch>
+ </nomatch-list>
+ </input>
+ <confirm>
+ <property-list>
+ <property name="incompletetimeout" value="1s"/>
+ <property name="completetimeout" value="1s"/>
+ </property-list>
+ <prompt-list>
+ <prompt>I think you said #{model.utterance}. Is that correct?</prompt>
+ </prompt-list>
+ <help-list>
+ <help>
+ <prompt>To accept #{model.utterance}, say yes. To provide a different value, say no.</prompt>
+ </help>
+ </help-list>
+ <noinput-list>
+ <noinput>
+ <prompt>If the ending date is acceptable say yes otherwise say no.</prompt>
+ </noinput>
+ </noinput-list>
+ <nomatch-list>
+ <nomatch>
+ <prompt>If the ending date is acceptable say yes otherwise say no.</prompt>
+ </nomatch>
+ </nomatch-list>
+ <reject>
+ <prompt>OK, lets try again.</prompt>
+ </reject>
+ </confirm>
+ <validate>
+ <handler errorCode="635463">
+ <prompt>There is no default or initial date supplied. </prompt>
+ </handler>
+ <handler errorCode="1">
+ <prompt>The date you specified, #{model.utterance}, is not valid. </prompt>
+ </handler>
+ <handler errorCode="2">
+ <prompt>I'm sorry, but the ending date must be later than the starting date. Please choose a later date. </prompt>
+ </handler>
+ <handler errorCode="3">
+ <prompt>Please choose an earlier date. </prompt>
+ </handler>
+ </validate>
+ <echo>
+ <property-list>
+ <property name="universals" value="all"/>
+ </property-list>
+ <prompt-list>
+ <prompt>OK, #{model.utterance}. Got it.</prompt>
+ </prompt-list>
+ </echo>
+</config>
\ No newline at end of file
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeEndDate.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeEndDate.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeStartDate.xml
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeStartDate.xml?rev=231290&view=auto
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeStartDate.xml (added)
+++ jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeStartDate.xml Wed Aug 10 11:25:09 2005
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<config>
+<!--
+ Copyright 2004 The Apache Software Foundation.
+
+ Licensed 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.
+-->
+ <input>
+ <property-list>
+ <property name="incompletetimeout" value="1s"/>
+ <property name="completetimeout" value="1s"/>
+ </property-list>
+ <prompt-list>
+ <prompt>Please specify a starting date.</prompt>
+ </prompt-list>
+ <help-list>
+ <help>
+ <prompt>Please specify a complete date for the starting date.</prompt>
+ </help>
+ <help>
+ <prompt>For instance, say January first, 2004.</prompt>
+ </help>
+ <help>
+ <prompt>You can also use alternate forms like first of April.</prompt>
+ </help>
+ </help-list>
+ <noinput-list>
+ <noinput>
+ <prompt>I did not hear you speak a starting date.</prompt>
+ </noinput>
+ <noinput>
+ <prompt>Could you please repeat the starting date?</prompt>
+ </noinput>
+ <noinput>
+ <prompt>I appear to be having trouble hearing you.
+ Waiting for you to say a starting date.</prompt>
+ </noinput>
+ </noinput-list>
+ <nomatch-list>
+ <nomatch>
+ <prompt>I'm sorry, I was expecting a date.</prompt>
+ </nomatch>
+ <nomatch>
+ <prompt>Could you repeat that please?</prompt>
+ </nomatch>
+ </nomatch-list>
+ </input>
+ <confirm>
+ <property-list>
+ <property name="incompletetimeout" value="1s"/>
+ <property name="completetimeout" value="1s"/>
+ </property-list>
+ <prompt-list>
+ <prompt>I think you said #{model.utterance}. Is that
+ correct?</prompt>
+ </prompt-list>
+ <help-list>
+ <help>
+ <prompt>To accept #{model.utterance}, say yes. To provide a different value, say no.</prompt>
+ </help>
+ </help-list>
+ <noinput-list>
+ <noinput>
+ <prompt>If the starting date is acceptable say yes otherwise say no.</prompt>
+ </noinput>
+ </noinput-list>
+ <nomatch-list>
+ <nomatch>
+ <prompt>If the starting date is acceptable say yes otherwise say no.</prompt>
+ </nomatch>
+ </nomatch-list>
+ <reject>
+ <prompt>OK, lets try again.</prompt>
+ </reject>
+ </confirm>
+ <validate>
+ <handler errorCode="635463">
+ <prompt>There is no default or initial date supplied. </prompt>
+ </handler>
+ <handler errorCode="1">
+ <prompt>The date you specified, #{model.utterance}, is not valid. </prompt>
+ </handler>
+ <handler errorCode="2">
+ <prompt>Please choose a later date. </prompt>
+ </handler>
+ <handler errorCode="3">
+ <prompt>Please choose an earlier date. </prompt>
+ </handler>
+ </validate>
+ <echo>
+ <property-list>
+ <property name="universals" value="all"/>
+ </property-list>
+ <prompt-list>
+ <prompt>OK, #{model.utterance}. Got it.</prompt>
+ </prompt-list>
+ </echo>
+</config>
\ No newline at end of file
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeStartDate.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/config/dateRangeStartDate.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.rdc
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.rdc?rev=231290&view=auto
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.rdc (added)
+++ jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.rdc Wed Aug 10 11:25:09 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ui-config>
+<!--
+ Copyright 2004 The Apache Software Foundation.
+ Licensed 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.
+-->
+<component name="dateRange" summary="This is the date range information composite that has the start date and end date"
+ path="META-INF/tags/rdc/dateRange.tag">
+
+ <input-params>
+ <param name="id" value="some-name" required="true" rtexprvalue="false" visible="1" description="Component ID">
+ This specifies the id of the rdc component.
+ </param>
+ <param name="submit" value="self-URI" required="false" rtexprvalue="true" visible="0" description="Location where results are submitted">
+ This specifies the URL to which the component should submit its results.
+ The default is to submit to the originating page that instantiated the component.
+ </param>
+ <param name="subdialog" value="true/false" required="false" rtexprvalue="true" visible="0" description="Whether this RDC is invoked as a subdialog">
+ Defines whether this RDC is defined as a subdialog, which affects who the value it collects
+ will be returned. Default value is Boolean.FALSE
+ </param>
+ <param name="initial" value="DateRangeData" required="false" rtexprvalue="true" visible="2" description="Default date range">
+ This specifies the initial default value, which is an instance of DateRangeData.
+ If a user says initial or default, this value is selected.
+ If not specified, the user will not be able to select a default value.
+ </param>
+ <param name="config" value="xxx-cfg.xml" required="false" rtexprvalue="true" visible="1" description="Configuration file for this composite">
+ This specifies the location of the configuration file used to customize interaction behavior of this instance.
+ Being a composite, the configuration file merely contains pointers to the configuration files to be used
+ to customize the children. Customizations include prompts, properties etc (see configuration section for details).
+ By default, the composite uses each child's pre-packaged configuration.
+ </param>
+ <param name="locale" value="[language](-[country])?" required="false" rtexprvalue="true" visible="2" description="RDC Locale">
+ The Locale to which the grammars and default configurations chosen for this composite's children will belong to.
+ Default is en-US.
+ </param>
+ </input-params>
+ <output-params>
+ <param name="id of this component" description="Variable that holds the date range information">
+ Variable that holds the date range information.
+ Thus, if the component is invoked with an id value of "start", then variable $start holds the value collected by the component.
+ </param>
+ </output-params>
+ </component>
+ </ui-config>
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.rdc
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.rdc
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag?rev=231290&view=auto
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag (added)
+++ jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag Wed Aug 10 11:25:09 2005
@@ -0,0 +1,119 @@
+<%--
+ Copyright 2004 The Apache Software Foundation.
+ Licensed 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.
+--%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
+<%@ taglib prefix="rdc" uri="http://jakarta.apache.org/taglibs/rdc-1.0" %>
+
+<%@ tag body-content="empty" %>
+
+<%@ attribute name="id" required="true" rtexprvalue="false" %>
+<%@ attribute name="submit" required="false" %>
+<%@ attribute name="config" required="false" %>
+<%@ attribute name="initial" required="false" %>
+<%@ attribute name="confirm" required="false" %>
+<%@ attribute name="echo" required="false" %>
+<%@ attribute name="locale" required="false" %>
+<%@ attribute name="subdialog" required="false" %>
+<%@ variable name-from-attribute="id" alias="retVal" scope="AT_END"%>
+
+<jsp:useBean id="constants" class="org.apache.taglibs.rdc.core.Constants" />
+
+<rdc:peek var="stateMap" stack="${requestScope.rdcStack}"/>
+<c:choose>
+ <c:when test="${empty stateMap[id]}">
+ <rdc:comment>This instance is being called for the first time in this session </rdc:comment>
+ <jsp:useBean id="model" class="org.apache.taglibs.rdc.DateRange" >
+ <c:set target="${model}" property="state"
+ value="${stateMap.initOnlyFlag == true ? constants.FSM_INITONLY : constants.FSM_INPUT}"/>
+ <rdc:comment> initialize bean from our attributes </rdc:comment>
+ <c:set target="${model}" property="id" value="${id}"/>
+ <c:set target="${model}" property="confirm" value="${confirm}"/>
+ <c:set target="${model}" property="echo" value="${echo}"/>
+ <c:set target="${model}" property="initial" value="${initial}"/>
+ <c:set target="${model}" property="subdialog" value="${subdialog}"/>
+ <rdc:setup-results model="${model}" submit="${submit}" />
+ <rdc:set-config-composite model="${model}" context="${pageContext}" config="${config}" />
+ </jsp:useBean>
+ <rdc:comment> cache away this instance for future requests in this session </rdc:comment>
+ <c:set target="${stateMap}" property="${id}" value="${model}"/>
+ </c:when>
+ <c:otherwise>
+ <rdc:comment> retrieve cached bean for this instance </rdc:comment>
+ <c:set var="model" value="${stateMap[id]}"/>
+ </c:otherwise>
+</c:choose>
+
+<rdc:comment>Push on stack, composite's localMap for next level of recursion </rdc:comment>
+<rdc:push stack="${rdcStack}" element="${model.localMap}"/>
+
+<c:choose>
+ <c:when test="${model.state == constants.FSM_INITONLY || model.state == constants.FSM_DORMANT}">
+ <%-- (initOnly -> initOnly) --%>
+ <%-- (dormant -> dormant) --%>
+ </c:when>
+
+ <c:when test="${model.state == constants.FSM_INPUT}">
+ <rdc:get-resource bundle="${model.rdcResourceBundle}" var="startDateConfig"
+ key="rdc.daterange.startdate.defaultconfig.uri" />
+ <rdc:get-resource bundle="${model.rdcResourceBundle}" var="endDateConfig"
+ key="rdc.daterange.enddate.defaultconfig.uri" />
+
+ <rdc:group id="dateRangeGroup" strategy="org.apache.taglibs.rdc.dm.SimpleDirectedDialog"
+ submit="${model.submit}">
+
+ <rdc:date id="startDate" confirm="${model.confirm}" echo="${model.echo}"
+ locale="${model.locale}" minConfidence="0.4F" numNBest="5"
+ maxNoInput="3" maxNoMatch="3" config="${not empty model.configMap.startDate ?
+ model.configMap.startDate : startDateConfig }"/>
+
+ <rdc:date id="endDate" minDate="${startDate}" confirm="${model.confirm}" echo="${model.echo}"
+ locale="${model.locale}" minConfidence="0.4F" numNBest="5"
+ maxNoInput="3" maxNoMatch="3" config="${not empty model.configMap.endDate ?
+ model.configMap.endDate : endDateConfig }"/>
+
+ </rdc:group>
+ </c:when>
+</c:choose>
+
+<rdc:comment>If Group is done</rdc:comment>
+<c:if test="${model.localMap.dateRangeGroup.state == constants.GRP_STATE_DONE}">
+
+ <rdc:comment> Populate the data model of component using HashMap returned by Group </rdc:comment>
+ <jsp:useBean id="data" class="org.apache.taglibs.rdc.DateRangeData" >
+ <c:set target="${data}" property="startDate" value="${dateRangeGroup.startDate}"/>
+ <c:set target="${data}" property="endDate" value="${dateRangeGroup.endDate}"/>
+ </jsp:useBean>
+
+ <c:set target="${model}" property="value" value="${data}"/>
+
+ <c:if test="${model.isValid == true}">
+ <c:set target="${model}" property="state" value ="${constants.FSM_DONE}"/>
+ <c:choose>
+ <c:when test="${not model.subdialog}">
+ <c:set var="retVal" value="${model.value}"/>
+ </c:when>
+ <c:otherwise>
+ <block>
+ <var name="${model.id}" expr="'${model.serializedValue}'"/>
+ <return namelist="${model.id}"/>
+ </block>
+ </c:otherwise>
+ </c:choose>
+ </c:if>
+
+</c:if>
+
+<rdc:pop var="discard" stack="${rdcStack}"/>
+<!--Example:End-->
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/dateRange.tag
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRange.java
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRange.java?rev=231290&view=auto
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRange.java (added)
+++ jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRange.java Wed Aug 10 11:25:09 2005
@@ -0,0 +1,45 @@
+/*
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.taglibs.rdc;
+
+import javax.servlet.jsp.PageContext;
+import org.apache.taglibs.rdc.core.ComponentModel;
+
+/**
+ * DataModel for the DateRange Composite RDC
+ *
+ * @author Elam Birnbaum
+ */
+public class DateRange extends ComponentModel
+{
+ public DateRange()
+ {
+ super();
+ }
+
+ /**
+ * Stores the id and file attributes from the config xml to the configMap
+ *
+ * @see ComponentModel#configHandler()
+ */
+ public void configHandler()
+ {
+ this.configMap = RDCUtils.configHandler(this.config, (PageContext) this.context);
+ }
+}
Propchange: jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRange.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRange.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRangeData.java
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRangeData.java?rev=231290&view=auto
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRangeData.java (added)
+++ jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRangeData.java Wed Aug 10 11:25:09 2005
@@ -0,0 +1,89 @@
+/*
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.taglibs.rdc;
+
+import java.io.Serializable;
+/**
+ * The public data model of the date range composite.
+ *
+ * @author Elam Birnbaum
+ */
+public class DateRangeData implements Serializable
+{
+ // Start and end dates
+ private String startDate;
+ private String endDate;
+
+ public DateRangeData()
+ {
+ this.startDate = null;
+ this.endDate = null;
+ }
+
+ /**
+ * Gets the start date
+ *
+ * @return Returns the start date.
+ */
+ public String getStartDate()
+ {
+ return startDate;
+ }
+
+ /**
+ * Gets the end date
+ *
+ * @return Returns the end date.
+ */
+ public String getEndDate()
+ {
+ return endDate;
+ }
+
+ /**
+ * Sets the start date
+ *
+ * @param startDate The start date to set.
+ */
+ public void setStartDate(String startDate)
+ {
+ this.startDate = startDate;
+ }
+
+ /**
+ * Sets the ending date
+ *
+ * @param endDate The ending to set.
+ */
+ public void setEndDate(String endDate)
+ {
+ this.endDate = endDate;
+ }
+
+ /**
+ * A serialized version of the DateRangeData object
+ */
+ public String toString()
+ {
+ StringBuffer buf = new StringBuffer();
+ buf.append("startDate=").append(startDate).
+ append(";endDate=").append(endDate);
+ return buf.toString();
+ }
+}
Propchange: jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRangeData.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/taglibs/proper/rdc/trunk/src/org/apache/taglibs/rdc/DateRangeData.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: jakarta/taglibs/proper/rdc/trunk/xml/rdc.xml
URL: http://svn.apache.org/viewcvs/jakarta/taglibs/proper/rdc/trunk/xml/rdc.xml?rev=231290&r1=231289&r2=231290&view=diff
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/xml/rdc.xml (original)
+++ jakarta/taglibs/proper/rdc/trunk/xml/rdc.xml Wed Aug 10 11:25:09 2005
@@ -618,6 +618,28 @@
</tag-extension>
</tag-file>
<tag-file>
+ <description>Collects a date range, denoting the start and end dates
+ of a time period.</description>
+ <display-name>Date Range</display-name>
+ <name>dateRange</name>
+ <path>/META-INF/tags/rdc/dateRange.tag</path>
+ <example>
+ <![CDATA[
+ <rdc:dateRange id="myDateRange" />
+ ]]>
+ <usage>
+ <comment>
+ <p>
+ See dateRange-test.jsp in the rdc-examples application.
+ </p>
+ </comment>
+ </usage>
+ </example>
+ <tag-extension namespace="http://jakarta.apache.org/taglibs/rdc/pre-beta/tools">
+ <extension-element>/META-INF/tags/rdc/dateRange.rdc</extension-element>
+ </tag-extension>
+ </tag-file>
+ <tag-file>
<description>Collect mortgage information: includes type
of mortgage and percent down-payment</description>
<display-name>mortgage</display-name>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org