|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.context.JcmsContext
com.jalios.jcms.context.JcmsJspContext
com.jalios.jcms.handler.JcmsFormHandler
public abstract class JcmsFormHandler
This abstract class is the super class of all the Form Handler classes (i.e. JavaBean classes used in JSP pages for processing form).
Field Summary | |
---|---|
protected HashMap<String,Object> |
contextMap
|
protected HashSet |
editFieldSet
|
protected boolean |
noRedirect
|
protected boolean |
noSendRedirect
|
protected boolean |
popupEdition
|
protected String |
redirect
|
protected boolean |
redirectOnClosePopup
|
static String |
REVISION
|
protected boolean |
workspaceForced
|
Fields inherited from class com.jalios.jcms.context.JcmsJspContext |
---|
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, JS_HEADER, jsboMap, jsboSet, jsfoMap, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADER |
Fields inherited from class com.jalios.jcms.context.JcmsContext |
---|
browser, caddy, channel, inFO, initDone, initWorkspace, isAdmin, isAjaxRequest, isDBMember, isDebug, isLogged, loggedMember, request, response, userLang, userLocale, workspace |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Constructor Summary | |
---|---|
JcmsFormHandler()
|
Method Summary | |
---|---|
protected boolean |
checkMissingField(Object obj,
String prop)
|
protected HashMap<String,Object> |
getControllerContext()
Build a controller context. |
HashSet |
getEditFieldSet()
|
String |
getHiddenField(String name,
boolean value)
|
String |
getHiddenField(String name,
boolean[] array)
|
String |
getHiddenField(String name,
Data value)
|
String |
getHiddenField(String name,
Data[] datas)
|
String |
getHiddenField(String name,
Date value)
|
String |
getHiddenField(String name,
Date[] array)
|
String |
getHiddenField(String name,
double value)
|
String |
getHiddenField(String name,
double[] array)
|
String |
getHiddenField(String name,
int value)
|
String |
getHiddenField(String name,
int[] array)
|
String |
getHiddenField(String name,
long value)
|
String |
getHiddenField(String name,
long[] array)
|
String |
getHiddenField(String name,
String value)
|
String |
getHiddenField(String name,
String[] array)
|
String |
getHiddenFieldML(String name,
HashMap<String,String> map)
|
protected String |
getMainLangValue(String[] array,
boolean trim,
boolean escape)
Returns the first value (i.e. |
protected String[] |
getMainLangValueArray(String[] array,
boolean trim,
boolean escape)
Returns the first values (i.e. |
protected HashMap<String,String> |
getMLMap(String[] array,
boolean trim,
boolean escape)
Returns the ML map (i.e. |
protected HashMap<String,String[]> |
getMLMapArray(String[] array,
boolean trim,
boolean escape)
Returns the ML map (i.e. |
String |
getRedirect()
Get the value of redirect. |
boolean |
getRedirectOnClosePopup()
Return the value indicating whether the redirect value should be applied to the opener when closing the popup edition. |
Workspace |
getWorkspace()
Retrieve the current Workspace variable for this context either from request if inFO or from session if in back office. |
boolean |
isFieldEdition(String field)
|
protected boolean |
isFieldMissing(String field)
Check if the given parameter is present in the query parameters |
boolean |
isPartialFieldEdition()
Returns true if this is a partial field edition (i.e. |
boolean |
isPopupEdition()
|
boolean |
isWorkspaceForced()
|
protected boolean |
processStatus(ControllerStatus status)
Process the ControllerStatus: do nothing if OK, or send on forbidden, or put a warning message in the request. |
void |
sendRedirect(String url)
Redirect current request to given URL. Overrides JcmsContext.sendRedirect(String) to use behavior
provided by sendRedirect(String, boolean) . |
void |
sendRedirect(String url,
boolean checkRedirect)
Set the redirect in the response. |
void |
setEditField(String[] v)
|
void |
setNoRedirect(boolean noRedirect)
Set the value of noRedirect. |
void |
setNoSendRedirect(boolean noSendRedirect)
Set the value of noSendRedirect. |
void |
setPopupEdition(boolean v)
|
void |
setRedirect(String v)
Set the value of redirect. |
void |
setRedirectOnClosePopup(boolean redirectOnClosePopup)
Set whether the redirect value should be applied to the opener when closing the popup edition. The value set by this method will be used only when using popup edition ( setPopupEdition(boolean) ). |
void |
setWorkspace(Workspace wspc)
|
void |
setWs(String v)
|
protected String |
updateUploadedField(String fieldName,
String value,
boolean isFileDocument,
boolean override)
Perform upload then, return value of the real File realtive path. |
protected void |
updateUploadedFields(String fieldName,
String[] values,
boolean isFileDocument,
boolean override)
Perform upload then, replace all values with value MultipartRequest.MULTIPART_UPLOAD with the real File realtive path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected String redirect
protected boolean noRedirect
protected boolean noSendRedirect
protected boolean redirectOnClosePopup
protected boolean workspaceForced
protected boolean popupEdition
protected HashSet editFieldSet
protected HashMap<String,Object> contextMap
Constructor Detail |
---|
public JcmsFormHandler()
Method Detail |
---|
public Workspace getWorkspace()
JcmsContext
getWorkspace
in class JcmsContext
public boolean isWorkspaceForced()
public void setWorkspace(Workspace wspc)
public void setWs(String v)
public void sendRedirect(String url, boolean checkRedirect) throws IOException
url
- the url to redirect to.checkRedirect
- if true and if redirect attribute has been set, redirect on this url
IOException
public void sendRedirect(String url) throws IOException
JcmsContext.sendRedirect(String)
to use behavior
provided by sendRedirect(String, boolean)
.
sendRedirect
in class JcmsContext
url
- the url to redirect to.
IOException
- if an error occured while writing in response headersJcmsContext.sendRedirect(String, HttpServletRequest, HttpServletResponse)
public String getRedirect()
public void setRedirect(String v)
v
- Value to assign to redirect.public void setNoRedirect(boolean noRedirect)
noRedirect
- Value to assign to noRedirect.public void setNoSendRedirect(boolean noSendRedirect)
noSendRedirect
- Value to assign to noSendRedirect.public final void setRedirectOnClosePopup(boolean redirectOnClosePopup)
setPopupEdition(boolean)
).
redirectOnClosePopup
- if true, the redirect value (setRedirect(String)
)
will be provided to closePopup.jsp to redirect the opener. if false,
the popup will simply be closed and the opener refreshed.public final boolean getRedirectOnClosePopup()
setRedirect(String)
)
will be provided to closePopup.jsp to redirect the opener. false,
if the popup will simply be closed and the opener refreshed.protected boolean processStatus(ControllerStatus status) throws IOException
status
- the ControllerStatus to be processed
IOException
protected HashMap<String,Object> getControllerContext()
protected boolean isFieldMissing(String field)
field
- the field to be checked
public void setPopupEdition(boolean v)
public boolean isPopupEdition()
public void setEditField(String[] v)
public HashSet getEditFieldSet()
public boolean isFieldEdition(String field)
public boolean isPartialFieldEdition()
protected String updateUploadedField(String fieldName, String value, boolean isFileDocument, boolean override)
fieldName
- the field namevalue
- the field fake valueprotected void updateUploadedFields(String fieldName, String[] values, boolean isFileDocument, boolean override)
fieldName
- the field namevalues
- the field fake valuesprotected String getMainLangValue(String[] array, boolean trim, boolean escape)
array
- the arraytrim
- if true trim the valueescape
- if true escape the value
protected HashMap<String,String> getMLMap(String[] array, boolean trim, boolean escape)
array
- the arraytrim
- if true trim the valuesescape
- if true escape the values
protected String[] getMainLangValueArray(String[] array, boolean trim, boolean escape)
array
- the arraytrim
- if true trim the valuesescape
- if true escape the values
protected HashMap<String,String[]> getMLMapArray(String[] array, boolean trim, boolean escape)
array
- the arraytrim
- if true trim the valuesescape
- if true escape the values
public String getHiddenField(String name, String value)
public String getHiddenFieldML(String name, HashMap<String,String> map)
public String getHiddenField(String name, Data value)
public String getHiddenField(String name, boolean value)
public String getHiddenField(String name, int value)
public String getHiddenField(String name, double value)
public String getHiddenField(String name, long value)
public String getHiddenField(String name, Date value)
public String getHiddenField(String name, Data[] datas)
public String getHiddenField(String name, boolean[] array)
public String getHiddenField(String name, int[] array)
public String getHiddenField(String name, long[] array)
public String getHiddenField(String name, double[] array)
public String getHiddenField(String name, String[] array)
public String getHiddenField(String name, Date[] array)
protected boolean checkMissingField(Object obj, String prop)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |