org.openmobileis.services.util
Class TemplateUtils

java.lang.Object
  extended byorg.openmobileis.services.util.TemplateUtils

public final class TemplateUtils
extends java.lang.Object


Constructor Summary
TemplateUtils()
           
 
Method Summary
static SimpleList fillFormPopUpWithLabel(Array labelArray, java.lang.String selectedId)
          Use to facilitate label fields edit.
static java.lang.String format(int value)
           
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateUtils

public TemplateUtils()
Method Detail

getInputDate

public 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. Return a simple hash containing 5 lists: dayList, monthList, yearList, hourList and minuteList set with the date giving by parameters. Template code :


getInputDuration

public static SimpleHash getInputDuration(int selectedHours,
                                          int selectedMinutes,
                                          int maxHour)

format

public static java.lang.String format(int value)

fillFormPopUpWithLabel

public static SimpleList fillFormPopUpWithLabel(Array labelArray,
                                                java.lang.String selectedId)
Use to facilitate label fields edit. Returnt the template simplelist to use to fill your template. Exemple of HTML template : 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:


Copyright 2006 OpenMobileIS. All Rights Reserved.