Package com.jalios.jcms.widget
Class WidgetUtil
java.lang.Object
com.jalios.jcms.widget.WidgetUtil
- All Implemented Interfaces:
JcmsConstants,JaliosConstants
- Author:
- Jean-Philippe Encausse
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of the different types of property editor.
A property editor is defined by a name and a ControlSettings. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringName of the Boolean attribute added to the request when the current request contains one or more Rich Text editor.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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_YEARFields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADVANCED_TAB, AJAX_MODE_ATTR, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, CLASS_PROPERTY, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, COUNTRY_SPRITE, CS_TYPOLOGY_ROOT_CAT_VID, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DATA_DIRECTORY, DEFAULT_PHOTO_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, GENERATIONAL_STORE_DIRECTORY, GLYPH_ICON_PREFIX, ICON_ARCHIVE, ICON_ICON_PREFIX, ICON_LOCK, ICON_LOCK_STRONG, ICON_PREFIX_PROP, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, IS_IN_FRONT_OFFICE, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JCMS_TOASTR_COLLECTION, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LANG_SPRITE, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, ORGANIZATION_ROOT_GROUP_PROP, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_PROP_PREFIX, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_PROP_PREFIX, PHOTO_LARGE_WIDTH, PHOTO_MINI, PHOTO_MINI_HEIGHT, PHOTO_MINI_PROP_PREFIX, PHOTO_MINI_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_PROP_PREFIX, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_PROP_PREFIX, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_PROP_PREFIX, PHOTO_TINY_WIDTH, PHOTO_XLARGE, PHOTO_XLARGE_HEIGHT, PHOTO_XLARGE_PROP_PREFIX, PHOTO_XLARGE_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, RAW_CONTENT_ICON_PREFIX, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SECURITY_LOG_FILE, SESSION_AUTHORIZED_FILENAMES_SET, SPRITE_ICON_PREFIX, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, SVGSPRITE_ICON_PREFIX, TEMPLATE_TAB, THEME_DIR, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TTCARD_MEDIA_HEIGHT, TTCARD_MEDIA_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, TYPES_UNKNOWN_CLASS_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, UPLOAD_PERMISSION_COUNT_PROP_PREFIX, UPLOAD_PERMISSION_SIZE_PROP_PREFIX, URL_REGEXP, VID_LOGGED_MEMBER, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ControlSettings<?> getControlSettings(String editorName) Returns an instance of ControlSettings corresponding to the given editor name.static StringgetLangTab(String widget, String lang) Return ONE Lang Tab for a given lang with a given widget has content.static StringgetPropertyEditor(String propertyKey) Returns the editor associated to the given property key.static StringgetRadioInsert(Data data, Locale locale) Retrieve an HTML element suitable in a chooser to insert the specified data.static StringgetShortProperty(String key) Return the value of the property without the editor valuestatic StringgetShortProperty(String key, String editor) Return the value of the property without the editor valuestatic voidprintDescription(StringBuffer sb, String formDescription) Print the field Descriptionstatic voidprintInfo(StringBuffer sb, String formInfo) Print the field Infostatic voidprintLabel(StringBuffer sb, String formLabel, String inputId) Print the field Labelstatic voidprintLabel(StringBuffer sb, String formLabel, String[] inputId) Print the field label.static voidprintLangAttributes(StringBuffer sb, String lang) Appends the html language attributes to use for the given language.static voidPrint the Mandatory for a given fieldstatic voidprintSeparator(StringBuffer sb, String formField) Print a HR separator and an Anchor for the fieldstatic voidprintUnits(StringBuffer sb, String unit) Print the units for field
-
Field Details
-
CSS_BUTTON
- See Also:
-
CSS_MAIN_BUTTON
- See Also:
-
CSS_TEXTAREA
- See Also:
-
CSS_RICHTEXT
- See Also:
-
CSS_RICHTEXT_POPUP
- See Also:
-
CSS_CHECKBOX
- See Also:
-
CSS_RADIOBOX
- See Also:
-
CSS_LABELBOX
- See Also:
-
CSS_COMBOBOX
- See Also:
-
CSS_SELECTBOX
- See Also:
-
CSS_LISTBOX
- See Also:
-
CSS_TEXTFIELD
- See Also:
-
CSS_UPLOADFIELD
- See Also:
-
CSS_CHOOSERFIELD
- See Also:
-
CSS_CHOOSERLABELFIELD
- See Also:
-
CSS_UNITS
- See Also:
-
CSS_MANDATORY
- See Also:
-
CSS_LABEL
- See Also:
-
CSS_DESCRIPTION
- See Also:
-
CSS_INFO
- See Also:
-
ICON_EDIT
- See Also:
-
ICON_CLEAR
- See Also:
-
ICON_PLUS
- See Also:
-
ICON_FIELD_UP
- See Also:
-
ICON_FIELD_DOWN
- See Also:
-
ICON_ARROW_UP
- See Also:
-
ICON_ARROW_DOWN
- See Also:
-
ICON_ARROW_LEFT
- See Also:
-
ICON_ARROW_RIGHT
- See Also:
-
ICON_TRASH
- See Also:
-
ICON_DATE
- See Also:
-
ICON_FOLDER
- See Also:
-
ICON_IMAGE_CHOOSER
- See Also:
-
ICON_MEDIA_CHOOSER
- See Also:
-
ICON_COLOR_CHOOSER
- See Also:
-
ICON_QUERY_CHOOSER
- See Also:
-
ICON_MEMBER_CHOOSER
- See Also:
-
ICON_GROUP_CHOOSER
- See Also:
-
ICON_WORKSPACE_CHOOSER
- See Also:
-
ICON_CATEGORY_CHOOSER
- See Also:
-
ICON_PUB_CHOOSER
- See Also:
-
ICON_DBRECORD_CHOOSER
- See Also:
-
ICON_DOC_CHOOSER
- See Also:
-
ICON_DOC_RECHOOSER
- See Also:
-
ICON_ACL_CHOOSER
- See Also:
-
ICON_MULTILANG
- See Also:
-
SPRITE_CLEAR
- See Also:
-
SPRITE_REMOVE
- See Also:
-
SPRITE_ADD
- See Also:
-
SPRITE_COLOR_CHOOSER
- See Also:
-
SPRITE_IMAGE_CHOOSER
- See Also:
-
SPRITE_MEDIA_CHOOSER
- See Also:
-
SPRITE_DOC_CHOOSER
- See Also:
-
SPRITE_PUB_CHOOSER
- See Also:
-
SPRITE_CAT_CHOOSER
- See Also:
-
SPRITE_EYE
- See Also:
-
SPRITE_DOC_EYE
- See Also:
-
SPRITE_DATE
- See Also:
-
SPRITE_QUERY_CHOOSER
- See Also:
-
SPRITE_MEMBER_CHOOSER
- See Also:
-
SPRITE_GROUP_CHOOSER
- See Also:
-
SPRITE_WORKSPACE_CHOOSER
- See Also:
-
SPRITE_CATEGORY_CHOOSER
- See Also:
-
SPRITE_ACL_CHOOSER
- See Also:
-
HAS_RICHTEXT
Name of the Boolean attribute added to the request when the current request contains one or more Rich Text editor.
-
-
Constructor Details
-
WidgetUtil
public WidgetUtil()
-
-
Method Details
-
getLangTab
Return ONE Lang Tab for a given lang with a given widget has content.- Parameters:
widget- the widget to putlang- the lang of the tab- Returns:
- String for the given lang tab TODO: I18N Lang Alt
-
getControlSettings
Returns an instance of ControlSettings corresponding to the given editor name.- Parameters:
editorName- editor name- Returns:
ControlSettingsimplementation- Since:
- 10.0.1
- See Also:
-
getPropertyEditor
Returns the editor associated to the given property key.- Parameters:
propertyKey- the property key- Returns:
- String the property editor
-
getShortProperty
Return the value of the property without the editor value- Parameters:
key- the full extra key- Returns:
- String the short key
-
getShortProperty
Return the value of the property without the editor value- Parameters:
key- the full extra keyeditor- the editor- Returns:
- String the short key
-
printLangAttributes
Appends the html language attributes to use for the given language. For example "lang='fr' xml:lang='fr' dir='ltr' " (note the spaces and without the double quotes). Nothing is appended if advanced I18N is not enabled in JCMS.- Parameters:
sb- the StringBuffer in which to append the class namelang- the language of the class to generated or null to use default jcms language- See Also:
-
printUnits
Print the units for field- Parameters:
sb- the Bufferunit- the unit
-
printMandatory
Print the Mandatory for a given field- Parameters:
sb- the Buffer
-
printLabel
Print the field Label- Parameters:
sb- the BufferformLabel- the labelinputId- if not null, the given label is linked to the input with DOM id
-
printLabel
Print the field label.- Parameters:
sb- the BufferformLabel- the labelinputId- array of ids of the input. Used in a "for" attribute.
-
printDescription
Print the field Description- Parameters:
sb- the BufferformDescription- the description
-
printInfo
Print the field Info- Parameters:
sb- the BufferformInfo- the info
-
printSeparator
Print a HR separator and an Anchor for the field- Parameters:
sb- the BufferformField- name
-
getRadioInsert
Retrieve an HTML element suitable in a chooser to insert the specified data.Implementation detail : This method return a button since JCMS-3712 (it was previously returning a radio button)
- Parameters:
data- the data for which the insert radio button is added.locale- the Locale in which I18Ned element should be presented- Returns:
- an HTML radio button
-