Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

org.openmobileis.services.common.DateServiceUtil Class Reference

List of all members.

Detailed Description

Title: OpenMobileIS project source
Description:.

Author:
Philippe Delrieu
Since:
JDK 1.1
Version:
1.0.

Definition at line 39 of file DateServiceUtil.java.

Static Public Member Functions

static SimpleHash getForTemplateInputDate (int selectedDay, int selectedMonth, int selectedYear, int selectedHours, int selectedMinutes, int selectedDuration)
 Return a simple hash containing 5 lists: dayList, monthList, yearList, hourList and minuteList set with the date giving by parameters.


Member Function Documentation

static SimpleHash org.openmobileis.services.common.DateServiceUtil.getForTemplateInputDate int  selectedDay,
int  selectedMonth,
int  selectedYear,
int  selectedHours,
int  selectedMinutes,
int  selectedDuration
[static]
 

Return a simple hash containing 5 lists: dayList, monthList, yearList, hourList and minuteList set with the date giving by parameters.

Use these HTML/ template to show the result for day month year. <SELECT name="day"> <list startDate.dayList as day> <OPTION VALUE="${day.value}" <if day.select>selected</if>>${day.value}</OPTION>

</SELECT> <SELECT name="month">

<list startDate.monthList as month> <OPTION VALUE="${month.value}" <if month.select>selected</if>>${month.value}</OPTION>

</SELECT> <SELECT name="year">

<list startDate.yearList as year> <OPTION VALUE="${year.value}" <if year.select>selected</if>>${year.value}</OPTION>

</SELECT> <SELECT name="hour"> <list startDate.hourList as hour> <OPTION VALUE="${hour.value}" <if hour.select>selected</if>>${hour.value}</OPTION>

</SELECT> <SELECT name="minute"> <list startDate.minutesList as minute> <OPTION VALUE="${minute.value}" <if minute.select>selected</if>>${minute.value}</OPTION>

</SELECT> To show current date : Calendar calendar = java.util.Calendar.getInstance(); SimpleHash startDate = Utils.getUtilsManager().getForTemplateInputDate( calendar.get(java.util.Calendar.DAY_OF_MONTH), calendar.get(java.util.Calendar.MONTH), calendar.get(java.util.Calendar.YEAR), calendar.get(java.util.Calendar.HOUR_OF_DAY), 0); templateData.put("startDate", startDate);

Definition at line 87 of file DateServiceUtil.java.


The documentation for this class was generated from the following file:
Generated on Wed Dec 14 21:05:39 2005 for OpenMobileIS by  doxygen 1.4.4