|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
org.opencms.workplace.CmsDialog
org.opencms.workplace.CmsTabDialog
org.opencms.workplace.commons.CmsPropertyAdvanced
org.opencms.workplace.commons.CmsPropertyCustom
public class CmsPropertyCustom
Provides methods for the customized property dialog.
This is a special dialog that is used for the different resource types in the workplace.
For the xmlpage resource type, this class is extended in the editor subpackage.
The following files use this class:
Field Summary | |
---|---|
static int |
ACTION_EDIT
Value for the action: edit the properties. |
Fields inherited from class org.opencms.workplace.CmsTabDialog |
---|
ACTION_SWITCHTAB, DIALOG_SWITCHTAB, PARAM_SETPRESSED, PARAM_TAB |
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
---|
PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler |
---|
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD |
Constructor Summary | |
---|---|
CmsPropertyCustom(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsPropertyCustom(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
---|---|
void |
actionEdit(javax.servlet.http.HttpServletRequest request)
Performs the edit properties action, will be called by the JSP page. |
java.lang.String |
buildEditForm()
Creates the HTML String for the edit properties form. |
protected java.lang.StringBuffer |
buildNavigationProperties(boolean editable)
Builds the HTML code for the special properties of an xmlpage resource. |
protected java.lang.StringBuffer |
buildPropertyEntry(java.lang.String propertyName,
java.lang.String propertyTitle,
boolean editable)
Builds the html for a single text input property row. |
java.lang.String |
buildSetFormValues()
Builds the JavaScript to set the property form values delayed. |
protected java.lang.String |
buildTableRowEnd()
Builds the HTML for the end of a table row for a single property. |
protected java.lang.StringBuffer |
buildTableRowStart(java.lang.String propertyName)
Builds the HTML for the start of a table row for a single property. |
protected java.lang.StringBuffer |
buildTextInput(boolean editable)
Builds the HTML for the common text input property values stored in the String array "PROPERTIES". |
java.lang.String |
dialogButtonsOkCancelAdvanced(java.lang.String okAttributes,
java.lang.String cancelAttributes,
java.lang.String advancedAttributes)
Builds a button row with an "ok", a "cancel" and an "advanced" button. |
CmsExplorerTypeSettings |
getExplorerTypeSettings()
Returns the explorer type settings for the current resource type. |
protected void |
initExplorerTypeSettings()
Initializes the explorer type settings for the current resource type. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
javax.servlet.http.HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
protected boolean |
isHideButtonAdvanced()
Checks the optional parameters of the handler configuration. |
protected boolean |
performEditOperation(javax.servlet.http.HttpServletRequest request)
Performs the editing of the resources properties. |
void |
setExplorerTypeSettings(CmsExplorerTypeSettings typeSettings)
Sets the explorer type settings for the current resource type. |
void |
setShowNavigation(boolean showNav)
Sets if navigation properties are shown. |
boolean |
showNavigation()
Returns if navigation properties are shown. |
protected void |
writeProperty(java.lang.String propName,
java.lang.String propValue,
java.lang.String oldValue)
Writes a property value for a resource, if the value was changed. |
Methods inherited from class org.opencms.workplace.CmsTabDialog |
---|
dialogTabContent, dialogTabContentEnd, dialogTabContentStart, dialogTabContentStart, dialogTabRow, getActiveTab, getActiveTabName, getParamSetPressed, getParamTab, htmlStart, htmlStart, paramsAsHidden, setParamSetPressed, setParamTab |
Methods inherited from class org.opencms.workplace.tools.CmsToolDialog |
---|
dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, setParamPath, setParamRoot, setParamStyle, useNewStyle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_EDIT
Constructor Detail |
---|
public CmsPropertyCustom(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsPropertyCustom(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
context
- the JSP page contextreq
- the JSP requestres
- the JSP responseMethod Detail |
---|
public void actionEdit(javax.servlet.http.HttpServletRequest request) throws javax.servlet.jsp.JspException
actionEdit
in class CmsPropertyAdvanced
request
- the HttpServletRequest
javax.servlet.jsp.JspException
- if problems including sub-elements occurpublic java.lang.String buildEditForm()
buildEditForm
in class CmsPropertyAdvanced
public java.lang.String buildSetFormValues()
The values of the properties are not inserted directly in the <input> tag, because there is a display issue when the property values are very long. This method creates JavaScript to set the property input field values delayed. On the JSP, the code which is created from this method has to be executed delayed after the creation of the html form, e.g. in the <body> tag with the attribute onload="window.setTimeout('doSet()',50);".
buildSetFormValues
in class CmsPropertyAdvanced
public java.lang.String dialogButtonsOkCancelAdvanced(java.lang.String okAttributes, java.lang.String cancelAttributes, java.lang.String advancedAttributes)
dialogButtonsOkCancelAdvanced
in class CmsDialog
okAttributes
- additional attributes for the "ok" buttoncancelAttributes
- additional attributes for the "cancel" buttonadvancedAttributes
- additional attributes for the "advanced" button
public CmsExplorerTypeSettings getExplorerTypeSettings()
public void setExplorerTypeSettings(CmsExplorerTypeSettings typeSettings)
typeSettings
- the explorer type settings for the current resource typepublic void setShowNavigation(boolean showNav)
showNav
- true, if navigation properties are shown, otherwise falsepublic boolean showNavigation()
protected java.lang.StringBuffer buildNavigationProperties(boolean editable)
editable
- indicates if the properties are editable
protected java.lang.StringBuffer buildPropertyEntry(java.lang.String propertyName, java.lang.String propertyTitle, boolean editable)
The html does not include the value of the created property, the values are set delayed (see buildSetFormValues() for details).
propertyName
- the name of the propertypropertyTitle
- the nice name of the propertyeditable
- indicates if the properties are editable
protected java.lang.String buildTableRowEnd()
protected java.lang.StringBuffer buildTableRowStart(java.lang.String propertyName)
propertyName
- the name of the current property
protected java.lang.StringBuffer buildTextInput(boolean editable)
editable
- indicates if the properties are editable
protected void initExplorerTypeSettings()
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues
in class CmsPropertyAdvanced
settings
- the workplace settingsrequest
- the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
protected boolean isHideButtonAdvanced()
Decides if the "advanced" button should be shown or not. The "advanced" button is shown if no parameters are given (default) or the "hideadvanced" attribute is set to false. The "advanced" button is hidden only, if "hideadvanced" is true and the user is not a member of the specified user groups.
protected boolean performEditOperation(javax.servlet.http.HttpServletRequest request) throws CmsException
request
- the HttpServletRequest
CmsException
- if editing is not successfulprotected void writeProperty(java.lang.String propName, java.lang.String propValue, java.lang.String oldValue) throws CmsException
If a property definition for the resource does not exist, it is automatically created by this method.
propName
- the name of the propertypropValue
- the new value of the propertyoldValue
- the old value of the property
CmsException
- if something goes wrong
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |