org.openmobileis.services.util.TemplateUtils Class Reference

List of all members.

Detailed Description

Definition at line 43 of file TemplateUtils.java.

Static Public Member Functions

static SimpleHash getInputDate (int selectedDay, int selectedMonth, int selectedYear, int selectedHours, int selectedMinutes)
 Use to fill form template with day, month, year, hour, minute combo box.
static SimpleHash getInputDuration (int selectedHours, int selectedMinutes, int maxHour)
static String format (int value)
static SimpleList fillFormPopUpWithLabel (Array labelArray, String selectedId)
 Use to facilitate label fields edit.


Member Function Documentation

static SimpleHash org.openmobileis.services.util.TemplateUtils.getInputDate ( int  selectedDay,
int  selectedMonth,
int  selectedYear,
int  selectedHours,
int  selectedMinutes 
) [static]

Use to fill form template with day, month, year, hour, minute combo box.

Return a simple hash containing 5 lists: dayList, monthList, yearList, hourList and minuteList set with the date giving by parameters. Template code : <SELECT name="startDay"> <list startDate.dayList as day> <OPTION VALUE="${day.value}" <if day.select>selected</if>>${day.value}</OPTION>

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

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

</SELECT>

Definition at line 68 of file TemplateUtils.java.

References org.openmobileis.services.util.TemplateUtils.format().

static SimpleList org.openmobileis.services.util.TemplateUtils.fillFormPopUpWithLabel ( Array  labelArray,
String  selectedId 
) [static]

Use to facilitate label fields edit.

Returnt the template simplelist to use to fill your template. Exemple of HTML template : <select name="type">

option value="${fct.value}" <if fct.selected>selected</if>>${fct.name}</option>

</select> generate the template list with fct.value and fct.selected. If no selectedid is available use null.

Parameters:
labelArray : list of label to display in the list.
selectedId : default label to show in the list.
Returns:

Definition at line 182 of file TemplateUtils.java.

References org.openmobileis.common.util.collection.Array.get(), and org.openmobileis.common.util.collection.Array.size.


The documentation for this class was generated from the following file:
Generated on Mon Dec 4 11:03:41 2006 for OpenMobileIS by  doxygen 1.5.1-p1