public abstract class A_CmsPropertyEditor extends java.lang.Object implements I_CmsFormWidgetMultiFactory
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
FIELD_LINK
The field id for the link selector widget.
|
static java.lang.String |
FIELD_URLNAME
The field id of the "url name" form field.
|
protected java.util.List<java.lang.String> |
m_allProps
The list of all property names.
|
protected java.lang.String |
m_disabledReason
The reason to disable the form input fields.
|
protected CmsForm |
m_form
The form containing the fields.
|
protected I_CmsPropertyEditorHandler |
m_handler
The handler for this sitemap entry editor.
|
protected java.util.Map<java.lang.String,CmsXmlContentProperty> |
m_propertyConfig
The configuration of the properties.
|
protected I_CmsFormField |
m_urlNameField
The URL name field.
|
protected CmsDefaultStringModel |
m_urlNameModel
The model for the URL name field.
|
构造器和说明 |
---|
A_CmsPropertyEditor(java.util.Map<java.lang.String,CmsXmlContentProperty> propertyConfig,
I_CmsPropertyEditorHandler handler)
Creates a new sitemap entry editor.
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
addSpecialFields()
Method to add special, non-property fields.
|
protected abstract void |
buildFields()
Builds and renders the fields for the properties.
|
static void |
checkWidgetRequirements(java.lang.String key,
I_CmsFormWidget widget)
Checks whether a widget can be used in the sitemap entry editor, and throws an exception otherwise.
|
I_CmsFormWidget |
createFormWidget(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> widgetParams)
Creates a new form widget.
|
protected CmsBasicFormField |
createUrlNameField()
Creates the text field for editing the URL name.
|
void |
disableInput(java.lang.String disabledReason)
Disables all input to the form.
|
CmsForm |
getForm()
Gets the form for the properties.
|
protected java.lang.String |
getTitle(java.util.Map<java.lang.String,java.lang.String> fieldValues)
Gets the title from a map of field values.
|
protected CmsDefaultStringModel |
getUrlNameModel(java.lang.String urlName)
Lazily creates the model object for the URL name field.
|
void |
initializeWidgets(CmsPopup dialog)
Initializes the widgets for editing the properties.
|
protected java.lang.String |
message(java.lang.String key,
java.lang.Object... args)
Returns a localized message from the message bundle.
|
protected void |
setGhostValue(I_CmsFormField field,
java.lang.String value,
boolean ghostMode)
Sets the ghost value for a form field if its normal value is empty and the field's widget supports ghost values.
|
void |
setPropertyNames(java.util.List<java.lang.String> propertyNames)
Sets the names of properties which can be edited.
|
protected abstract void |
setupFieldContainer()
Sets up the widget which will contain the input fields for the properties.
|
protected void |
setUrlNameField(java.lang.String urlName)
Sets the contents of the URL name field in the form.
|
protected void |
showUrlNameError(java.lang.String message)
Shows an error message next to the URL name input field.
|
public static final java.lang.String FIELD_LINK
public static final java.lang.String FIELD_URLNAME
protected java.util.List<java.lang.String> m_allProps
protected java.lang.String m_disabledReason
protected CmsForm m_form
protected I_CmsPropertyEditorHandler m_handler
protected java.util.Map<java.lang.String,CmsXmlContentProperty> m_propertyConfig
protected I_CmsFormField m_urlNameField
protected CmsDefaultStringModel m_urlNameModel
public A_CmsPropertyEditor(java.util.Map<java.lang.String,CmsXmlContentProperty> propertyConfig, I_CmsPropertyEditorHandler handler)
handler
- the handlerpropertyConfig
- the property configurationpublic static void checkWidgetRequirements(java.lang.String key, I_CmsFormWidget widget)
key
- the widget keywidget
- the created widgetpublic I_CmsFormWidget createFormWidget(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> widgetParams)
I_CmsFormWidgetMultiFactory
createFormWidget
在接口中 I_CmsFormWidgetMultiFactory
key
- the key identifying the widget typewidgetParams
- the widget initialization parametersI_CmsFormWidgetMultiFactory.createFormWidget(java.lang.String, java.util.Map)
public void disableInput(java.lang.String disabledReason)
disabledReason
- the reason to display to the userpublic CmsForm getForm()
public void initializeWidgets(CmsPopup dialog)
dialog
- the dialog which the property editor is part ofpublic void setPropertyNames(java.util.List<java.lang.String> propertyNames)
propertyNames
- the property namesprotected void addSpecialFields()
protected abstract void buildFields()
protected CmsBasicFormField createUrlNameField()
protected java.lang.String getTitle(java.util.Map<java.lang.String,java.lang.String> fieldValues)
fieldValues
- the map of field valuesprotected CmsDefaultStringModel getUrlNameModel(java.lang.String urlName)
urlName
- the initial value for the URL nameprotected java.lang.String message(java.lang.String key, java.lang.Object... args)
key
- the message keyargs
- the message parametersprotected void setGhostValue(I_CmsFormField field, java.lang.String value, boolean ghostMode)
field
- the form fieldvalue
- the ghost value to setghostMode
- if true, sets the widget to ghost modeprotected abstract void setupFieldContainer()
protected void setUrlNameField(java.lang.String urlName)
urlName
- the new URL nameprotected void showUrlNameError(java.lang.String message)
message
- the message which should be displayed, or null if no message should be displayed