|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.ui.OwEventTarget
com.wewebu.ow.server.ui.OwView
com.wewebu.ow.server.app.OwSearchCriteriaView
public class OwSearchCriteriaView
View Module to display and edit search criteria. The View must be enclosed by a form, or you can use the function setFormName to internally create a form in the view.
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 | |
---|---|
static int |
ERRORS_REGION
errors region |
protected List |
m_CriteriaList
list of the search criteria |
protected Map |
m_CriteriaMap
map of criteria for fast access when using a layout |
protected int |
m_iViewMask
filters the views to be displayed |
protected String |
m_strHtmlFormular
optional HTML form |
protected String |
m_strJspFormular
optional JSP form |
protected OwFieldManager |
m_theFieldManager
instance of the property field class |
static String |
PLACEHOLDER_ERROR_PREFIX
start delimiter for the placeholders |
static String |
PLACEHOLDER_INSTRUCTION_PREFIX
start delimiter for the placeholders |
static String |
PLACEHOLDER_VALIDATION_PREFIX
start delimiter for the placeholders |
static String |
RUNTIME_PLACEHOLDER_BASE_URL
placeholder for the server base url |
static String |
RUNTIME_PLACEHOLDER_DESIGN_URL
placeholder for the server design url |
static int |
VIEW_MASK_RENDER_VERTICAL
mask value to enable vertical rendering of criteria |
Fields inherited from class com.wewebu.ow.server.ui.OwView |
---|
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget |
Fields inherited from interface com.wewebu.ow.server.field.OwFieldProvider |
---|
TYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL |
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView |
---|
EMPTY_STRING |
Constructor Summary | |
---|---|
OwSearchCriteriaView()
|
Method Summary | |
---|---|
void |
detach()
remove view and all subviews from context |
OwField |
getField(String strFieldClassName_p)
implementation for the OwFieldProvider interface |
String |
getFieldProviderName()
get a name that identifies the field provider, can be used to create IDs |
Object |
getFieldProviderSource()
get the source object that originally provided the fields. |
int |
getFieldProviderType()
implementation for the OwFieldProvider interface get the type of field provider as defined with TYPE_... |
Collection |
getFields()
get all the properties in the form |
Object |
getSafeFieldValue(String sName_p,
Object defaultvalue_p)
retrieve the value of a Field |
String |
getSafeInstruction(OwSearchCriteria searchCriteria_p)
get a instruction for the criteria |
protected boolean |
hasViewMask(int iViewMask_p)
check if view should be displayed or is masked out |
protected void |
init()
init the view after the context is set. |
OwSearchCriteria |
lookupCriteria(String strName_p)
lookup a criteria by the unique name |
void |
onRender(Writer w_p)
render the views of the region |
protected void |
onRenderHorizontal(Writer w_p)
render the search template normal without a form |
protected void |
onRenderVertical(Writer w_p)
render the search template normal without a form |
boolean |
onSubmitSearch(javax.servlet.http.HttpServletRequest request_p)
event called when user submits the form updates the criteria, does the same as updateEditable NOTE: Exceptions are handled and displayed automatically |
protected void |
renderEditCriteria(Writer w_p,
OwSearchCriteria crit_p)
render a single editable criteria |
void |
renderNamedRegion(Writer w_p,
String strPlaceholder_p)
Called when the form parser finds a placeholder in the HTML input |
protected void |
renderPropertyLabel(Writer w_p,
OwSearchCriteria criteria_p,
String suffix_p)
Renders a property control label on the given Writer. The property's read-only status and the value type (array or complex value) are considered at rendering time. |
protected void |
renderReadOnlyCriteria(Writer w_p,
OwSearchCriteria crit_p)
render a single read only criteria |
void |
renderRegion(Writer w_p,
int region_p)
render only a region in the view, used by derived classes |
void |
resetErrors()
Reset the errors from OwFieldManager object |
void |
setCriteriaList(List criteriaList_p)
set list of the search criteria |
void |
setField(String sName_p,
Object value_p)
modify a Field value, but does not save the value right away |
void |
setFieldProvider(OwFieldProvider fieldProvider_p)
set an interface to a field provider interface the field provider interface can be used by the fields to reference other fields. |
void |
setHTMLFormular(String strFormular_p)
set the optional HTML form to use in the render method |
void |
setJspFormular(String strJspUrl_p)
set the optional JSP form to use in the render method In the JSP Form you can use the following statements to display and manipulate Properties // get a reference to the calling view OwView m_View = (OwView)request.getAttribute(OwView.CURRENT_MODULE_KEY); <% m_View.renderNamedRegion(out, <% m_View.renderNamedRegion(out,ow_err_ <% m_View.renderNamedRegion(out,ow_inst_ <% m_View.renderNamedRegion(out,ow_menu); %> : renders a function menu to save changes You can also cast the m_View to OwFieldProvider to retrieve a OwField instance and manipulate or program a field directly. |
void |
setViewMask(int iViewMask_p)
determine the views to be displayed by masking them with their flag |
boolean |
updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p,
boolean fSave_p)
update the target after a form event, so it can set its form fields |
protected String |
usesFormWithAttributes()
to get additional form attributes used for the form override if your view needs a form. |
Methods inherited from class com.wewebu.ow.server.ui.OwView |
---|
activate, addView, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal |
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget |
---|
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int VIEW_MASK_RENDER_VERTICAL
public static final String RUNTIME_PLACEHOLDER_BASE_URL
public static final String RUNTIME_PLACEHOLDER_DESIGN_URL
public static final String PLACEHOLDER_ERROR_PREFIX
public static final String PLACEHOLDER_INSTRUCTION_PREFIX
public static final String PLACEHOLDER_VALIDATION_PREFIX
public static final int ERRORS_REGION
protected OwFieldManager m_theFieldManager
protected List m_CriteriaList
protected String m_strHtmlFormular
protected String m_strJspFormular
protected Map m_CriteriaMap
protected int m_iViewMask
Constructor Detail |
---|
public OwSearchCriteriaView()
Method Detail |
---|
public void setViewMask(int iViewMask_p)
iViewMask_p
- bitmask according to VIEW_MASK_... flagsprotected boolean hasViewMask(int iViewMask_p)
iViewMask_p
- bitmask according to VIEW_MASK_... flagsprotected void init() throws Exception
init
in class OwView
Exception
public OwField getField(String strFieldClassName_p) throws Exception
getField
in interface OwFieldProvider
strFieldClassName_p
- String class name of requested fields
Exception
public Object getFieldProviderSource()
getFieldProviderSource
in interface OwFieldProvider
public int getFieldProviderType()
getFieldProviderType
in interface OwFieldProvider
public void detach()
detach
in class OwView
public void setFieldProvider(OwFieldProvider fieldProvider_p)
fieldProvider_p
- OwFieldProvider interfacepublic void setCriteriaList(List criteriaList_p)
criteriaList_p
- List with OwSearchCriteria to be edited in the viewpublic void setHTMLFormular(String strFormular_p)
strFormular_p
- String optional HTML layoutpublic void setJspFormular(String strJspUrl_p)
strJspUrl_p
- String optional HTML layoutpublic OwSearchCriteria lookupCriteria(String strName_p) throws Exception
strName_p
-
Exception
public void renderNamedRegion(Writer w_p, String strPlaceholder_p) throws Exception
renderNamedRegion
in interface OwBaseView
renderNamedRegion
in class OwView
strPlaceholder_p
- the placeholder string foundw_p
- Writer object, write to replace placeholder
Exception
public void onRender(Writer w_p) throws Exception
onRender
in class OwView
w_p
- Writer object to write HTML to
Exception
public void renderRegion(Writer w_p, int region_p) throws Exception
OwView
renderRegion
in interface OwBaseView
renderRegion
in class OwView
w_p
- Writer object to write HTML toregion_p
- ID of the region to render
Exception
protected String usesFormWithAttributes()
usesFormWithAttributes
in class OwView
public String getSafeInstruction(OwSearchCriteria searchCriteria_p) throws Exception
searchCriteria_p
- OwSearchCriteria
Exception
protected void renderPropertyLabel(Writer w_p, OwSearchCriteria criteria_p, String suffix_p) throws Exception
w_p
- criteria_p
- suffix_p
-
Exception
protected void onRenderHorizontal(Writer w_p) throws Exception
w_p
- Writer object, write to replace placeholder
Exception
protected void onRenderVertical(Writer w_p) throws Exception
w_p
- Writer object, write to replace placeholder
Exception
protected void renderEditCriteria(Writer w_p, OwSearchCriteria crit_p) throws Exception
w_p
- crit_p
-
Exception
protected void renderReadOnlyCriteria(Writer w_p, OwSearchCriteria crit_p) throws Exception
w_p
- crit_p
-
Exception
public boolean onSubmitSearch(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequest
Exception
public boolean updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p, boolean fSave_p) throws Exception
updateExternalFormTarget
in class OwEventTarget
request_p
- HttpServletRequestfSave_p
- boolean true = save the changes of the form data, false = just update the form data, but do not save
Exception
public String getFieldProviderName()
getFieldProviderName
in interface OwFieldProvider
public void setField(String sName_p, Object value_p) throws Exception, OwObjectNotFoundException
setField
in interface OwFieldProvider
sName_p
- value_p
-
Exception
OwObjectNotFoundException
public Object getSafeFieldValue(String sName_p, Object defaultvalue_p)
getSafeFieldValue
in interface OwFieldProvider
sName_p
- defaultvalue_p
-
public Collection getFields() throws Exception
getFields
in interface OwFieldProvider
Exception
public void resetErrors()
OwFieldManager
object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |