Package com.jalios.jcms.widget
Class WidgetUtil
- java.lang.Object
-
- com.jalios.jcms.widget.WidgetUtil
-
- All Implemented Interfaces:
JcmsConstants
,JaliosConstants
public class WidgetUtil extends java.lang.Object implements JcmsConstants
- Author:
- Jean-Philippe Encausse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WidgetUtil.PropertyEditor
Enumeration of the different types of property editor.
A property editor is defined by a name and a ControlSettings.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CSS_BUTTON
static java.lang.String
CSS_CHECKBOX
static java.lang.String
CSS_CHOOSERFIELD
static java.lang.String
CSS_CHOOSERLABELFIELD
static java.lang.String
CSS_COMBOBOX
static java.lang.String
CSS_DESCRIPTION
static java.lang.String
CSS_INFO
static java.lang.String
CSS_LABEL
static java.lang.String
CSS_LABELBOX
static java.lang.String
CSS_LISTBOX
static java.lang.String
CSS_MAIN_BUTTON
static java.lang.String
CSS_MANDATORY
static java.lang.String
CSS_RADIOBOX
static java.lang.String
CSS_RICHTEXT
static java.lang.String
CSS_RICHTEXT_POPUP
static java.lang.String
CSS_SELECTBOX
static java.lang.String
CSS_TEXTAREA
static java.lang.String
CSS_TEXTFIELD
static java.lang.String
CSS_UNITS
static java.lang.String
CSS_UPLOADFIELD
static java.lang.String
HAS_RICHTEXT
Name of the Boolean attribute added to the request when the current request contains one or more Rich Text editor.static java.lang.String
ICON_ACL_CHOOSER
static java.lang.String
ICON_ARROW_DOWN
static java.lang.String
ICON_ARROW_LEFT
static java.lang.String
ICON_ARROW_RIGHT
static java.lang.String
ICON_ARROW_UP
static java.lang.String
ICON_CATEGORY_CHOOSER
static java.lang.String
ICON_CLEAR
static java.lang.String
ICON_COLOR_CHOOSER
static java.lang.String
ICON_DATE
static java.lang.String
ICON_DBRECORD_CHOOSER
static java.lang.String
ICON_DOC_CHOOSER
static java.lang.String
ICON_DOC_RECHOOSER
static java.lang.String
ICON_EDIT
static java.lang.String
ICON_FIELD_DOWN
static java.lang.String
ICON_FIELD_UP
static java.lang.String
ICON_FOLDER
static java.lang.String
ICON_GROUP_CHOOSER
static java.lang.String
ICON_IMAGE_CHOOSER
static java.lang.String
ICON_MEDIA_CHOOSER
static java.lang.String
ICON_MEMBER_CHOOSER
static java.lang.String
ICON_MULTILANG
static java.lang.String
ICON_PLUS
static java.lang.String
ICON_PUB_CHOOSER
static java.lang.String
ICON_QUERY_CHOOSER
static java.lang.String
ICON_TRASH
static java.lang.String
ICON_WORKSPACE_CHOOSER
static java.lang.String
SPRITE_ACL_CHOOSER
static java.lang.String
SPRITE_ADD
static java.lang.String
SPRITE_CAT_CHOOSER
static java.lang.String
SPRITE_CATEGORY_CHOOSER
static java.lang.String
SPRITE_CLEAR
static java.lang.String
SPRITE_COLOR_CHOOSER
static java.lang.String
SPRITE_DATE
static java.lang.String
SPRITE_DOC_CHOOSER
static java.lang.String
SPRITE_DOC_EYE
static java.lang.String
SPRITE_EYE
static java.lang.String
SPRITE_GROUP_CHOOSER
static java.lang.String
SPRITE_IMAGE_CHOOSER
static java.lang.String
SPRITE_MEDIA_CHOOSER
static java.lang.String
SPRITE_MEMBER_CHOOSER
static java.lang.String
SPRITE_PUB_CHOOSER
static java.lang.String
SPRITE_QUERY_CHOOSER
static java.lang.String
SPRITE_REMOVE
static java.lang.String
SPRITE_WORKSPACE_CHOOSER
-
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
-
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, 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, 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, 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_DIR, STORE_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, TEMPLATE_TAB, 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, 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 Constructor Description WidgetUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ControlSettings<?>
getControlSettings(java.lang.String editorName)
Returns an instance of ControlSettings corresponding to the given editor name.static java.lang.String
getHtmlHidden(java.lang.String widgetName, java.lang.String value)
Convenient method that build an input hidden field calling printHiddenFieldstatic java.lang.String
getHtmlIcon(java.lang.String src, java.lang.String title)
Build an iconstatic java.lang.String
getHtmlIcon(java.lang.String src, java.lang.String title, java.lang.String alt)
Build an iconstatic java.lang.String
getHtmlIcon(java.lang.String src, java.lang.String title, java.lang.String id, java.lang.String style, java.lang.String onclick)
Build an iconstatic java.lang.String
getHtmlIcon(java.lang.String src, java.lang.String title, java.lang.String alt, java.lang.String id, java.lang.String style, java.lang.String onclick)
Build an iconstatic java.lang.String
getLangTab(java.lang.String widget, java.lang.String lang)
Return ONE Lang Tab for a given lang with a given widget has content.static java.lang.String
getPropertyEditor(java.lang.String propertyKey)
Returns the editor associated to the given property key.static java.lang.String
getRadioInsert(Data data, java.util.Locale locale)
Retrieve a radio button suitable for insertion in chooser.static java.lang.String
getShortProperty(java.lang.String key)
Return the value of the property without the editor valuestatic java.lang.String
getShortProperty(java.lang.String key, java.lang.String editor)
Return the value of the property without the editor valuestatic java.lang.String
printConfirmSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String msg, java.lang.String userLang)
Display a Button that will ask to confirm the actionstatic java.lang.String
printConfirmSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String msg, java.lang.String userLang, int tabindex)
static void
printDataSourceSelect(java.lang.StringBuffer sb, java.lang.String widgetName, java.lang.String dataSource, java.lang.String userLang)
This method write to the buffer a select box of sql datasource.static void
printDescription(java.lang.StringBuffer sb, java.lang.String formDescription)
Print the field Descriptionstatic void
printHiddenField(java.lang.StringBuffer sb, java.lang.String widgetName, java.lang.String value)
Print Hidden Inputstatic void
printHiddenField(java.lang.StringBuffer sb, java.lang.String widgetName, java.lang.String value, java.lang.String style, java.lang.String id)
Print Hidden Inputstatic java.lang.String
printHtmlButton(java.lang.String widgetName, java.lang.String value, boolean submit, java.lang.String onClick, boolean isMainAction)
Print an HTML Buttonstatic java.lang.String
printHtmlButton(java.lang.String widgetName, java.lang.String value, boolean submit, java.lang.String onClick, boolean isMainAction, int tabindex)
static void
printInfo(java.lang.StringBuffer sb, java.lang.String formInfo)
Print the field Infostatic void
printInputBox(java.lang.StringBuffer sb, java.lang.String inputId, java.lang.String fieldName, java.lang.String fieldValue, java.lang.String fieldLabel, boolean check, boolean selected, boolean disabled, int tabindex, java.lang.String customAttributes, java.lang.String lang)
Print an input Checkbox or Radio buttonstatic java.lang.String
printInputBox(java.lang.String fieldId, java.lang.String fieldName, java.lang.String fieldValue, java.lang.String fieldLabel, boolean check, boolean selected, boolean disabled, int tabindex, java.lang.String lang)
static java.lang.String
printInputBox(java.lang.String fieldId, java.lang.String fieldName, java.lang.String fieldValue, java.lang.String fieldLabel, boolean check, boolean selected, boolean disabled, int tabindex, java.lang.String customAttributes, java.lang.String lang)
static void
printInputBoxList(java.lang.StringBuffer sb, java.util.Collection<?> fieldIds, java.lang.String fieldName, java.util.Collection<?> fieldValue, java.util.Collection<?> fieldLabel, boolean check, java.util.Collection<?> selected, boolean br, boolean disabled, int tabindex, java.lang.String customAttributes, java.lang.String lang)
Print an html list of check/radio boxstatic void
printInputComboBox(java.lang.StringBuffer sb, java.lang.String fieldId, java.lang.String fieldName, java.util.Collection<?> fieldValue, java.util.Collection<?> fieldLabel, java.lang.String selected, boolean blank, int tabindex, boolean disabled, java.lang.String custom, java.lang.String lang)
Print a ComboBoxstatic void
printInputListBox(java.lang.StringBuffer sb, java.lang.String fieldId, java.lang.String fieldName, int size, java.util.Collection<?> fieldValue, java.util.Collection<?> fieldLabel, java.util.Collection<?> selected, boolean disabled, int tabindex, java.lang.String customs, java.lang.String lang)
Print a ListBoxstatic void
printLabel(java.lang.StringBuffer sb, java.lang.String formLabel, java.lang.String inputId)
Print the field Labelstatic void
printLabel(java.lang.StringBuffer sb, java.lang.String formLabel, java.lang.String[] inputId)
Print the field label.static void
printLangAttributes(java.lang.StringBuffer sb, java.lang.String lang)
Appends the html language attributes to use for the given language.static void
printMandatory(java.lang.StringBuffer sb)
Print the Mandatory for a given fieldprotected static void
printMoveFormElement(java.lang.StringBuffer sb, java.lang.String jsfunc, java.lang.String formField, java.lang.String formName, java.lang.String action, java.lang.String icon, java.lang.String alt, int pos, int relFirst, java.lang.String formFieldId)
static java.lang.String
printPopupButton(java.lang.String label, java.lang.String url)
static void
printSeparator(java.lang.StringBuffer sb, java.lang.String formField)
Print a HR separator and an Anchor for the fieldstatic java.lang.String
printSubmitButton(java.lang.String label, java.lang.String action)
Return a Submit HTML Button with a given label/actionstatic java.lang.String
printSubmitButton(java.lang.String label, java.lang.String action, int tabindex)
static java.lang.String
printSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String userLang)
Display a Button that will submit form for a given actionstatic java.lang.String
printSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String userLang, int tabindex)
static void
printUnits(java.lang.StringBuffer sb, java.lang.String unit)
Print the units for field
-
-
-
Field Detail
-
CSS_BUTTON
public static final java.lang.String CSS_BUTTON
- See Also:
- Constant Field Values
-
CSS_MAIN_BUTTON
public static final java.lang.String CSS_MAIN_BUTTON
- See Also:
- Constant Field Values
-
CSS_TEXTAREA
public static final java.lang.String CSS_TEXTAREA
- See Also:
- Constant Field Values
-
CSS_RICHTEXT
public static final java.lang.String CSS_RICHTEXT
- See Also:
- Constant Field Values
-
CSS_RICHTEXT_POPUP
public static final java.lang.String CSS_RICHTEXT_POPUP
- See Also:
- Constant Field Values
-
CSS_CHECKBOX
public static final java.lang.String CSS_CHECKBOX
- See Also:
- Constant Field Values
-
CSS_RADIOBOX
public static final java.lang.String CSS_RADIOBOX
- See Also:
- Constant Field Values
-
CSS_LABELBOX
public static final java.lang.String CSS_LABELBOX
- See Also:
- Constant Field Values
-
CSS_COMBOBOX
public static final java.lang.String CSS_COMBOBOX
- See Also:
- Constant Field Values
-
CSS_SELECTBOX
public static final java.lang.String CSS_SELECTBOX
- See Also:
- Constant Field Values
-
CSS_LISTBOX
public static final java.lang.String CSS_LISTBOX
- See Also:
- Constant Field Values
-
CSS_TEXTFIELD
public static final java.lang.String CSS_TEXTFIELD
- See Also:
- Constant Field Values
-
CSS_UPLOADFIELD
public static final java.lang.String CSS_UPLOADFIELD
- See Also:
- Constant Field Values
-
CSS_CHOOSERFIELD
public static final java.lang.String CSS_CHOOSERFIELD
- See Also:
- Constant Field Values
-
CSS_CHOOSERLABELFIELD
public static final java.lang.String CSS_CHOOSERLABELFIELD
- See Also:
- Constant Field Values
-
CSS_UNITS
public static final java.lang.String CSS_UNITS
- See Also:
- Constant Field Values
-
CSS_MANDATORY
public static final java.lang.String CSS_MANDATORY
- See Also:
- Constant Field Values
-
CSS_LABEL
public static final java.lang.String CSS_LABEL
- See Also:
- Constant Field Values
-
CSS_DESCRIPTION
public static final java.lang.String CSS_DESCRIPTION
- See Also:
- Constant Field Values
-
CSS_INFO
public static final java.lang.String CSS_INFO
- See Also:
- Constant Field Values
-
ICON_EDIT
public static final java.lang.String ICON_EDIT
- See Also:
- Constant Field Values
-
ICON_CLEAR
public static final java.lang.String ICON_CLEAR
- See Also:
- Constant Field Values
-
ICON_PLUS
public static final java.lang.String ICON_PLUS
- See Also:
- Constant Field Values
-
ICON_FIELD_UP
public static final java.lang.String ICON_FIELD_UP
- See Also:
- Constant Field Values
-
ICON_FIELD_DOWN
public static final java.lang.String ICON_FIELD_DOWN
- See Also:
- Constant Field Values
-
ICON_ARROW_UP
public static final java.lang.String ICON_ARROW_UP
- See Also:
- Constant Field Values
-
ICON_ARROW_DOWN
public static final java.lang.String ICON_ARROW_DOWN
- See Also:
- Constant Field Values
-
ICON_ARROW_LEFT
public static final java.lang.String ICON_ARROW_LEFT
- See Also:
- Constant Field Values
-
ICON_ARROW_RIGHT
public static final java.lang.String ICON_ARROW_RIGHT
- See Also:
- Constant Field Values
-
ICON_TRASH
public static final java.lang.String ICON_TRASH
- See Also:
- Constant Field Values
-
ICON_DATE
public static final java.lang.String ICON_DATE
- See Also:
- Constant Field Values
-
ICON_FOLDER
public static final java.lang.String ICON_FOLDER
- See Also:
- Constant Field Values
-
ICON_IMAGE_CHOOSER
public static final java.lang.String ICON_IMAGE_CHOOSER
- See Also:
- Constant Field Values
-
ICON_MEDIA_CHOOSER
public static final java.lang.String ICON_MEDIA_CHOOSER
- See Also:
- Constant Field Values
-
ICON_COLOR_CHOOSER
public static final java.lang.String ICON_COLOR_CHOOSER
- See Also:
- Constant Field Values
-
ICON_QUERY_CHOOSER
public static final java.lang.String ICON_QUERY_CHOOSER
- See Also:
- Constant Field Values
-
ICON_MEMBER_CHOOSER
public static final java.lang.String ICON_MEMBER_CHOOSER
- See Also:
- Constant Field Values
-
ICON_GROUP_CHOOSER
public static final java.lang.String ICON_GROUP_CHOOSER
- See Also:
- Constant Field Values
-
ICON_WORKSPACE_CHOOSER
public static final java.lang.String ICON_WORKSPACE_CHOOSER
- See Also:
- Constant Field Values
-
ICON_CATEGORY_CHOOSER
public static final java.lang.String ICON_CATEGORY_CHOOSER
- See Also:
- Constant Field Values
-
ICON_PUB_CHOOSER
public static final java.lang.String ICON_PUB_CHOOSER
- See Also:
- Constant Field Values
-
ICON_DBRECORD_CHOOSER
public static final java.lang.String ICON_DBRECORD_CHOOSER
- See Also:
- Constant Field Values
-
ICON_DOC_CHOOSER
public static final java.lang.String ICON_DOC_CHOOSER
- See Also:
- Constant Field Values
-
ICON_DOC_RECHOOSER
public static final java.lang.String ICON_DOC_RECHOOSER
- See Also:
- Constant Field Values
-
ICON_ACL_CHOOSER
public static final java.lang.String ICON_ACL_CHOOSER
- See Also:
- Constant Field Values
-
ICON_MULTILANG
public static final java.lang.String ICON_MULTILANG
- See Also:
- Constant Field Values
-
SPRITE_CLEAR
public static final java.lang.String SPRITE_CLEAR
- See Also:
- Constant Field Values
-
SPRITE_REMOVE
public static final java.lang.String SPRITE_REMOVE
- See Also:
- Constant Field Values
-
SPRITE_ADD
public static final java.lang.String SPRITE_ADD
- See Also:
- Constant Field Values
-
SPRITE_COLOR_CHOOSER
public static final java.lang.String SPRITE_COLOR_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_IMAGE_CHOOSER
public static final java.lang.String SPRITE_IMAGE_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_MEDIA_CHOOSER
public static final java.lang.String SPRITE_MEDIA_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_DOC_CHOOSER
public static final java.lang.String SPRITE_DOC_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_PUB_CHOOSER
public static final java.lang.String SPRITE_PUB_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_CAT_CHOOSER
public static final java.lang.String SPRITE_CAT_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_EYE
public static final java.lang.String SPRITE_EYE
- See Also:
- Constant Field Values
-
SPRITE_DOC_EYE
public static final java.lang.String SPRITE_DOC_EYE
- See Also:
- Constant Field Values
-
SPRITE_DATE
public static final java.lang.String SPRITE_DATE
- See Also:
- Constant Field Values
-
SPRITE_QUERY_CHOOSER
public static final java.lang.String SPRITE_QUERY_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_MEMBER_CHOOSER
public static final java.lang.String SPRITE_MEMBER_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_GROUP_CHOOSER
public static final java.lang.String SPRITE_GROUP_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_WORKSPACE_CHOOSER
public static final java.lang.String SPRITE_WORKSPACE_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_CATEGORY_CHOOSER
public static final java.lang.String SPRITE_CATEGORY_CHOOSER
- See Also:
- Constant Field Values
-
SPRITE_ACL_CHOOSER
public static final java.lang.String SPRITE_ACL_CHOOSER
- See Also:
- Constant Field Values
-
HAS_RICHTEXT
public static final java.lang.String HAS_RICHTEXT
Name of the Boolean attribute added to the request when the current request contains one or more Rich Text editor.
-
-
Method Detail
-
getHtmlIcon
public static java.lang.String getHtmlIcon(java.lang.String src, java.lang.String title)
Build an icon- Parameters:
src
- the image sourcetitle
- the image title- Returns:
- the image tag representation
-
getHtmlIcon
public static java.lang.String getHtmlIcon(java.lang.String src, java.lang.String title, java.lang.String alt)
Build an icon- Parameters:
src
- the image sourcetitle
- the image titlealt
- the image alt- Returns:
- the image tag representation
-
getHtmlIcon
public static java.lang.String getHtmlIcon(java.lang.String src, java.lang.String title, java.lang.String id, java.lang.String style, java.lang.String onclick)
Build an icon- Parameters:
src
- the image URLtitle
- the image titleid
- the idstyle
- the styleonclick
- the onclick value- Returns:
- the image tag representation
-
getHtmlIcon
public static java.lang.String getHtmlIcon(java.lang.String src, java.lang.String title, java.lang.String alt, java.lang.String id, java.lang.String style, java.lang.String onclick)
Build an icon- Parameters:
src
- the image URLtitle
- the image titlealt
- the image altid
- the idstyle
- the styleonclick
- the onclick value- Returns:
- the image tag representation
-
getHtmlHidden
public static java.lang.String getHtmlHidden(java.lang.String widgetName, java.lang.String value)
Convenient method that build an input hidden field calling printHiddenField- Parameters:
widgetName
- the name of the hidden fieldvalue
- the value of the hidden field- Returns:
- the hidden tag
-
getLangTab
public static java.lang.String getLangTab(java.lang.String widget, java.lang.String lang)
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
public static ControlSettings<?> getControlSettings(java.lang.String editorName)
Returns an instance of ControlSettings corresponding to the given editor name.- Parameters:
editorName
- editor name- Returns:
ControlSettings
implementation- Since:
- 10.0.1
- See Also:
getPropertyEditor(String)
-
getPropertyEditor
public static java.lang.String getPropertyEditor(java.lang.String propertyKey)
Returns the editor associated to the given property key.- Parameters:
propertyKey
- the property key- Returns:
- String the property editor
-
getShortProperty
public static java.lang.String getShortProperty(java.lang.String key)
Return the value of the property without the editor value- Parameters:
key
- the full extra key- Returns:
- String the short key
-
getShortProperty
public static java.lang.String getShortProperty(java.lang.String key, java.lang.String editor)
Return the value of the property without the editor value- Parameters:
key
- the full extra keyeditor
- the editor- Returns:
- String the short key
-
printHtmlButton
public static java.lang.String printHtmlButton(java.lang.String widgetName, java.lang.String value, boolean submit, java.lang.String onClick, boolean isMainAction)
Print an HTML Button- Parameters:
widgetName
- the name of the buttonvalue
- the value of the buttonsubmit
- is a submit buttononClick
- is onClick actionisMainAction
- if true use- Returns:
- the String representation of the button
-
printHtmlButton
public static java.lang.String printHtmlButton(java.lang.String widgetName, java.lang.String value, boolean submit, java.lang.String onClick, boolean isMainAction, int tabindex)
-
printPopupButton
public static java.lang.String printPopupButton(java.lang.String label, java.lang.String url)
-
printSubmitButton
public static java.lang.String printSubmitButton(java.lang.String label, java.lang.String action)
Return a Submit HTML Button with a given label/action- Parameters:
label
- the label of the buttonaction
- the name of the action while submitting- Returns:
- a String representation
-
printSubmitButton
public static java.lang.String printSubmitButton(java.lang.String label, java.lang.String action, int tabindex)
-
printSubmitFormButton
public static java.lang.String printSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String userLang)
Display a Button that will submit form for a given action- Parameters:
label
- the label of the buttonaction
- the name of the action while submittingformName
- the name of the formuserLang
- the current userLang- Returns:
- the String representation of the button
-
printSubmitFormButton
public static java.lang.String printSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String userLang, int tabindex)
-
printConfirmSubmitFormButton
public static java.lang.String printConfirmSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String msg, java.lang.String userLang)
Display a Button that will ask to confirm the action- Parameters:
label
- the label of the buttonaction
- the name of the action while submittingformName
- the name of the formmsg
- an I18N confirm messageuserLang
- the current userLang- Returns:
- the String representation of the button
-
printConfirmSubmitFormButton
public static java.lang.String printConfirmSubmitFormButton(java.lang.String label, java.lang.String action, java.lang.String formName, java.lang.String msg, java.lang.String userLang, int tabindex)
-
printHiddenField
public static void printHiddenField(java.lang.StringBuffer sb, java.lang.String widgetName, java.lang.String value, java.lang.String style, java.lang.String id)
Print Hidden Input- Parameters:
sb
- the BufferwidgetName
- the widget namevalue
- the valuestyle
- the CSS styleid
- the id
-
printHiddenField
public static void printHiddenField(java.lang.StringBuffer sb, java.lang.String widgetName, java.lang.String value)
Print Hidden Input- Parameters:
sb
- the BufferwidgetName
- the widget namevalue
- the value
-
printInputBox
public static void printInputBox(java.lang.StringBuffer sb, java.lang.String inputId, java.lang.String fieldName, java.lang.String fieldValue, java.lang.String fieldLabel, boolean check, boolean selected, boolean disabled, int tabindex, java.lang.String customAttributes, java.lang.String lang)
Print an input Checkbox or Radio button- Parameters:
sb
- the bufferinputId
- the id of the inputfieldName
- the name of the widgetfieldValue
- the value of the widgetfieldLabel
- the label of the widgetcheck
- checkbox or radio button ?selected
- selected or not ?disabled
- true to disabled the input boxtabindex
- the tabinexcustomAttributes
- the custom attributes to add to each inputlang
- the language (ISO-639) of this text area or null for default site language.- Since:
- 6.0
-
printInputBox
public static java.lang.String printInputBox(java.lang.String fieldId, java.lang.String fieldName, java.lang.String fieldValue, java.lang.String fieldLabel, boolean check, boolean selected, boolean disabled, int tabindex, java.lang.String lang)
-
printInputBox
public static java.lang.String printInputBox(java.lang.String fieldId, java.lang.String fieldName, java.lang.String fieldValue, java.lang.String fieldLabel, boolean check, boolean selected, boolean disabled, int tabindex, java.lang.String customAttributes, java.lang.String lang)
-
printInputBoxList
public static void printInputBoxList(java.lang.StringBuffer sb, java.util.Collection<?> fieldIds, java.lang.String fieldName, java.util.Collection<?> fieldValue, java.util.Collection<?> fieldLabel, boolean check, java.util.Collection<?> selected, boolean br, boolean disabled, int tabindex, java.lang.String customAttributes, java.lang.String lang)
Print an html list of check/radio box- Parameters:
sb
- the bufferfieldIds
- the DOM ids item : must be null or contains as many elements as fieldValue and fieldLabelfieldName
- the name of the widgetfieldValue
- the values of the widgetfieldLabel
- the labels of the widgetcheck
- checkbox or radio button ?selected
- a Set of selected valuesbr
- should append brdisabled
- true to disabled the inputstabindex
- the tabindexcustomAttributes
- the custom attributes to add to each inputlang
- the language (ISO-639) of this text area or null for default site language.- Since:
- 6.0
-
printInputComboBox
public static void printInputComboBox(java.lang.StringBuffer sb, java.lang.String fieldId, java.lang.String fieldName, java.util.Collection<?> fieldValue, java.util.Collection<?> fieldLabel, java.lang.String selected, boolean blank, int tabindex, boolean disabled, java.lang.String custom, java.lang.String lang)
Print a ComboBox- Parameters:
sb
- the bufferfieldId
- the id of the fieldfieldName
- the name of the widgetfieldValue
- the values of the widgetfieldLabel
- the labels of the widgetselected
- the selected Stringblank
- if true produce an empty optiondisabled
- true to disable the combo boxtabindex
- the tabindexcustom
- custom html attribute to be added inside the select taglang
- the language (ISO-639) of this text area or null for default site language.- Since:
- jcms-6.0
-
printInputListBox
public static void printInputListBox(java.lang.StringBuffer sb, java.lang.String fieldId, java.lang.String fieldName, int size, java.util.Collection<?> fieldValue, java.util.Collection<?> fieldLabel, java.util.Collection<?> selected, boolean disabled, int tabindex, java.lang.String customs, java.lang.String lang)
Print a ListBox- Parameters:
sb
- the bufferfieldId
- the id of the fieldfieldName
- the name of the widgetsize
- size of the selectfieldValue
- the values of the widgetfieldLabel
- the labels of the widgetselected
- the selected Stringdisabled
- true to disabled the input listboxtabindex
- the tabindexcustoms
- custom html attribute to be added inside the select taglang
- the language (ISO-639) of this text area or null for default site language.- Since:
- jcms-6.0
-
printDataSourceSelect
public static void printDataSourceSelect(java.lang.StringBuffer sb, java.lang.String widgetName, java.lang.String dataSource, java.lang.String userLang)
This method write to the buffer a select box of sql datasource. With the correct selected datasource.- Parameters:
sb
- the BufferwidgetName
- the widget namedataSource
- the selected datasourceuserLang
- the userlang- Since:
- jcms-5.5.0
-
printLangAttributes
public static void printLangAttributes(java.lang.StringBuffer sb, java.lang.String lang)
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:
Channel.isUsingAdvancedI18N()
-
printUnits
public static void printUnits(java.lang.StringBuffer sb, java.lang.String unit)
Print the units for field- Parameters:
sb
- the Bufferunit
- the unit
-
printMandatory
public static void printMandatory(java.lang.StringBuffer sb)
Print the Mandatory for a given field- Parameters:
sb
- the Buffer
-
printLabel
public static void printLabel(java.lang.StringBuffer sb, java.lang.String formLabel, java.lang.String inputId)
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
public static void printLabel(java.lang.StringBuffer sb, java.lang.String formLabel, java.lang.String[] inputId)
Print the field label.- Parameters:
sb
- the BufferformLabel
- the labelinputId
- array of ids of the input. Used in a "for" attribute.
-
printDescription
public static void printDescription(java.lang.StringBuffer sb, java.lang.String formDescription)
Print the field Description- Parameters:
sb
- the BufferformDescription
- the description
-
printInfo
public static void printInfo(java.lang.StringBuffer sb, java.lang.String formInfo)
Print the field Info- Parameters:
sb
- the BufferformInfo
- the info
-
printSeparator
public static void printSeparator(java.lang.StringBuffer sb, java.lang.String formField)
Print a HR separator and an Anchor for the field- Parameters:
sb
- the BufferformField
- name
-
printMoveFormElement
protected static void printMoveFormElement(java.lang.StringBuffer sb, java.lang.String jsfunc, java.lang.String formField, java.lang.String formName, java.lang.String action, java.lang.String icon, java.lang.String alt, int pos, int relFirst, java.lang.String formFieldId)
-
getRadioInsert
public static java.lang.String getRadioInsert(Data data, java.util.Locale locale)
Retrieve a radio button suitable for insertion in chooser.- 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
-
-