|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.wewebu.ow.server.app.OwEditablePropertyString
com.wewebu.ow.server.app.OwEditablePropertyDate
public class OwEditablePropertyDate
Base class for a single editable date property used in HTML forms.
You can either instantiate a control and use the render and setValue,
getValue methods
or alternatively
use the control only with the static methods insertEditHTML and updateField
without a instance.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
| Field Summary | |
|---|---|
protected OwMainAppContext |
m_context
reference to the app context |
protected String |
m_sDateFormatString
string to use to format the date |
static int |
TYPE_DATE
ENUM for the behavior, only date is shown |
static int |
TYPE_EMPTY_DATE_POSSIBLE
ENUM for the behavior, the date value can be left empty |
static int |
TYPE_TIME
ENUM for the behavior, only time is shown |
| Fields inherited from class com.wewebu.ow.server.app.OwEditablePropertyString |
|---|
m_strError, m_value |
| Constructor Summary | |
|---|---|
OwEditablePropertyDate(OwMainAppContext context_p)
construct a date property with context, use default date format |
|
OwEditablePropertyDate(OwMainAppContext context_p,
String sDateFormat_p)
construct a date property with context |
|
OwEditablePropertyDate(OwMainAppContext context_p,
String sDateFormat_p,
boolean ignoreTime)
|
|
| Method Summary | |
|---|---|
static String |
convertDateFormat(String javaSimpleDateFormat_p)
Java and ExtJS use different date format markup strings. |
protected Object |
getValueFromRequest(Locale locale_p,
javax.servlet.http.HttpServletRequest request_p,
String strID_p)
overridable to apply changes on a submitted form |
static void |
insertEditHTML(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fUseJS_Control_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p)
render the date control with all sub controls |
static void |
insertEditHTML(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fUseJS_Control_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p,
String timeFormat)
render the date control with all sub controls |
static void |
insertJSControl(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p)
Renders the JavaScript version of this control. |
static void |
insertNonJSControl(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fEmptyDataPossible_p,
String timerFormat)
Renders the Non Javascript version of the DateTime control. |
static boolean |
isPhpSpecialChar(char testChar_p)
Check if the character has a meaning as a PHP date format pattern. |
void |
render(Locale locale_p,
Writer w_p)
overridable to insert a single value into a edit HTML form |
static Date |
updateField(Locale locale_p,
javax.servlet.http.HttpServletRequest request_p,
String strID_p,
boolean fUseJS_Control_p,
Date oldDate_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p)
update the date variable |
static Date |
updateField(Locale locale_p,
javax.servlet.http.HttpServletRequest request_p,
String strID_p,
boolean fUseJS_Control_p,
Date oldDate_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p,
String timeFormatString)
|
| Methods inherited from class com.wewebu.ow.server.app.OwEditablePropertyString |
|---|
getFormElementID, getSafePropertyError, getValue, render, setValue, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_DATE
public static final int TYPE_TIME
public static final int TYPE_EMPTY_DATE_POSSIBLE
protected OwMainAppContext m_context
protected String m_sDateFormatString
| Constructor Detail |
|---|
public OwEditablePropertyDate(OwMainAppContext context_p)
context_p - OwMainAppContext
public OwEditablePropertyDate(OwMainAppContext context_p,
String sDateFormat_p)
sDateFormat_p - String with date format e.g.: dd.MM.yyyy HH:mmcontext_p - OwMainAppContext
public OwEditablePropertyDate(OwMainAppContext context_p,
String sDateFormat_p,
boolean ignoreTime)
context_p - sDateFormat_p - ignoreTime - | Method Detail |
|---|
public static void insertEditHTML(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fUseJS_Control_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p)
throws Exception
w_p - Writer object to write HTML todate_p - Date to displaystrID_p - Id for the form elementfEmptyDataPossible_p - true = date can be nullsDateFormat_p - String with date format e.g.: dd.MM.yyyy HH:mm
Exception
public static void insertEditHTML(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fUseJS_Control_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p,
String timeFormat)
throws Exception
w_p - Writer object to write HTML todate_p - Date to displaystrID_p - Id for the form elementfEmptyDataPossible_p - true = date can be nullsDateFormat_p - String with date format e.g.: dd.MM.yyyy HH:mmtimeFormat - String format for time. E.g. HH:mm. If null, the time field will be ignored.
Exception
public static void insertJSControl(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p)
throws IOException,
Exception
context_p - locale_p - w_p - date_p - strID_p - fEmptyDataPossible_p - sDateFormat_p -
IOException
Exception
public static void insertNonJSControl(OwMainAppContext context_p,
Locale locale_p,
Writer w_p,
Date date_p,
String strID_p,
boolean fEmptyDataPossible_p,
String timerFormat)
throws IOException,
Exception
context_p - locale_p - w_p - date_p - fEmptyDataPossible_p - timerFormat - the time format to use for the time field. If null, the time part will be ignored.
IOException
Exceptionpublic static String convertDateFormat(String javaSimpleDateFormat_p)
javaSimpleDateFormat_p - String to search and replace
public static boolean isPhpSpecialChar(char testChar_p)
testChar_p - char character to test
public static Date updateField(Locale locale_p,
javax.servlet.http.HttpServletRequest request_p,
String strID_p,
boolean fUseJS_Control_p,
Date oldDate_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p)
throws Exception
request_p - HttpServletRequeststrID_p - Id for the form elementoldDate_p - old datefEmptyDataPossible_p - true = date can be nullsDateFormat_p - String with date format e.g.: dd.MM.yyyy HH:mm
Exception
public static Date updateField(Locale locale_p,
javax.servlet.http.HttpServletRequest request_p,
String strID_p,
boolean fUseJS_Control_p,
Date oldDate_p,
boolean fEmptyDataPossible_p,
String sDateFormat_p,
String timeFormatString)
throws Exception
locale_p - request_p - strID_p - fUseJS_Control_p - oldDate_p - fEmptyDataPossible_p - sDateFormat_p - timeFormatString - has to match the one used in the call to insertEditHTML(OwMainAppContext, Locale, Writer, Date, String, boolean, boolean, String, String).
Exception
public void render(Locale locale_p,
Writer w_p)
throws Exception
w_p - Writer to write HTML code to
Exception
protected Object getValueFromRequest(Locale locale_p,
javax.servlet.http.HttpServletRequest request_p,
String strID_p)
throws Exception
getValueFromRequest in class OwEditablePropertyStringrequest_p - HttpServletRequest with form data to update the propertystrID_p - String the HTML form element id of the requested value
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||