Package org.javlo.component.text
Class WysiwygParagraph
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.text.WysiwygParagraph
-
- All Implemented Interfaces:
Serializable
,Comparable<IContentVisualComponent>
,IContentVisualComponent
,IImageTitle
,IRestItem
- Direct Known Subclasses:
FullWysiwygParagraph
public class WysiwygParagraph extends AbstractVisualComponent implements IImageTitle
- Author:
- pvandermaesen
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE
-
Fields inherited from class org.javlo.component.core.AbstractVisualComponent
CACHE_KEY_SUFFIX_PARAM_NAME, COMPONENT_KEY, config, EDIT_CLASS, FLUID_COL_SIZE, FORCE_COMPONENT_ID, HIDDEN, I18N_FILE, logger, MAX_COL_VALUE, MOBILE_TYPE, NOT_EDIT_PREVIEW_PARAM_NAME, SCROLL_TO_COMP_ID_ATTRIBUTE_NAME, TIME_CACHE_NAME, VALUE_SEPARATOR
-
Fields inherited from interface org.javlo.component.core.IContentVisualComponent
COLORED_WRAPPER_CLASS, COMP_ID_REQUEST_PARAM, COMPLEXITY_ADMIN, COMPLEXITY_EASY, COMPLEXITY_STANDARD, CONTAINER_COLOR, DEFAULT_COLOR, DYN_COMP_COLOR, ECOM_COLOR, EDIT_ACTION_CSS_CLASS, GRAPHIC_COLOR, HIGH_LABEL_LEVEL, ID_SEPARATOR, LINK_COLOR, LOW_LABEL_LEVEL, META_COLOR, MIDDLE_LABEL_LEVEL, SEARCH_LEVEL_HIGH, SEARCH_LEVEL_LOW, SEARCH_LEVEL_MIDDLE, SEARCH_LEVEL_NONE, TEXT_COLOR, VIEW_DEFINITION_REQUEST_ID, WEB2_COLOR
-
Fields inherited from interface org.javlo.component.image.IImageTitle
NO_LINK
-
-
Constructor Summary
Constructors Constructor Description WysiwygParagraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
getColumnableDefaultValue()
protected String
getEditorComplexity(ContentContext ctx)
return the wysiwyg editor complexityprotected String
getEditXHTMLCode(ContentContext ctx)
String
getIcon()
String
getImageDescription(ContentContext ctx)
String
getImageLinkURL(ContentContext ctx)
int
getLabelLevel(ContentContext ctx)
define the level of label.List<SuffixPrefix>
getMarkerList(ContentContext ctx)
return the title of the style choice.int
getPriority(ContentContext ctx)
return the priority of the picture inside the page (9=max)String
getResourceURL(ContentContext ctx)
String
getTextTitle(ContentContext ctx)
return a string representation of the component with complete titleString
getType()
return the type of the element.String
getViewXHTMLCode(ContentContext ctx)
boolean
initContent(ContentContext ctx)
init the content with a default value. sample : "lorem ipsum" for text component.boolean
isContentCachable(ContentContext ctx)
return the part of header needed for this componentboolean
isImageValid(ContentContext ctx)
boolean
isMobileOnly(ContentContext ctx)
boolean
isRealContent(ContentContext ctx)
return true if component is considered as realContent and the page that contain the component is also considered as real content.protected boolean
isValueTranslatable()
protected boolean
isXML()
String
performEdit(ContentContext ctx)
action call when update the content page.void
prepareView(ContentContext ctx)
prepare the rendering of a component. default attributes put in request : style, value, type, compidboolean
transflateFrom(ContentContext ctx, ITranslator translator, String lang)
translate the content of the component to the current languagevoid
updateCache(ContentContext ctx)
-
Methods inherited from class org.javlo.component.core.AbstractVisualComponent
applyReplacement, cleanResources, cleanValue, clearReplacement, clone, compareTo, contructViewStyle, countLine, delete, deleteMySelf, drawColumn, equals, equals, executeCurrentRenderer, executeJSP, executeRenderer, executeRenderer, extractFieldsFromRenderer, forceInit, getAjaxId, getArea, getAuthors, getBackgroundColor, getBaseHelpURL, getClassName, getColomnablePrefix, getColomnableSuffix, getColumn, getColumnMaxSize, getColumnSize, getColumnSizes, getColumnStyle, getComplexityLevel, getComponentBean, getComponentCSS, getComponentCssClass, getComponentId, getComponentLabel, getComponentPath, getConfig, getConfigInValue, getConfigMessage, getContainerPage, getContentAsMap, getContentAsText, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getCurrentRenderer, getDataAttributes, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditRenderer, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getExternalResources, getFileDirectory, getFirstPrefix, getFontAwesome, getForcedId, getForcedPrefixViewXHTMLCode, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURI, getHelpURL, getHexColor, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputName, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getKey, getLastSufix, getLayout, getListClass, getListGroup, getListItemTag, getListTag, getLocalMessage, getLock, getManualCssClass, getMessage, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPageDescription, getPrefixCssClass, getPrefixViewXHTMLCode, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getReferenceComponent, getRemplacement, getRenderer, getRendererTitle, getRenderes, getRequestComponent, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getSpecificClass, getSpecificCssClass, getStyle, getStyleLabel, getStyleLabelList, getStyleList, getStyleTitle, getSuffixViewXHTMLCode, getTag, getTextColor, getTextForSearch, getTextLabel, getTextMessage, getTextPosition, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getWordCount, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, init, init, insert, isAjaxWrapper, isAskWidth, isAutoDeletable, isAutoRenderer, isBackgroundColored, isCanAddClass, isCloseRow, isColored, isColumnable, isConfig, isContentCachableByQuery, isContentTimeCachable, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHiddable, isHidden, isHiddenInMode, isHiddenInModeValue, isInline, isInsertable, isList, isListable, isMetaTitle, isMirroredByDefault, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isNoLinkable, isOpenRow, isPreviousSame, isPreviousSame, isRepeat, isRepeatable, isRestMatch, isReversedLink, isStyleHidden, isUnique, isValueProperties, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, loadViewData, markAsNew, newInstance, next, onStyleChange, performColumnable, performConfig, performUpdate, prepareEdit, previous, processView, renderOtherComponent, renderViewXHTMLCode, replaceAllInContent, replaceInContent, resetContentCache, resetViewData, setBackgroundColor, setColumnSize, setColumnStyle, setComponentBean, setContainerPage, setContentCache, setContentTimeCache, setDisplayHidden, setForcedId, setForcedRenderer, setGroup, setHidden, setHiddenInMode, setList, setLocalMessage, setMessage, setMirrorWrapped, setModify, setNeedRefresh, setNextComponent, setNolink, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setTextColor, setTextPosition, setValid, setValue, setWidth, stored, storeViewData, stringToReader, stringToReader, stringToStream, textToXHTML, toString, updateCache
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEditorComplexity
protected String getEditorComplexity(ContentContext ctx)
Description copied from class:AbstractVisualComponent
return the wysiwyg editor complexity- Overrides:
getEditorComplexity
in classAbstractVisualComponent
- Returns:
- null if no wysywig editor
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCode
in classAbstractVisualComponent
- Throws:
Exception
-
getMarkerList
public List<SuffixPrefix> getMarkerList(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return the title of the style choice.- Specified by:
getMarkerList
in interfaceIContentVisualComponent
- Overrides:
getMarkerList
in classAbstractVisualComponent
-
getType
public String getType()
Description copied from interface:IContentVisualComponent
return the type of the element.- Specified by:
getType
in interfaceIContentVisualComponent
- Returns:
- the type of the element.
-
prepareView
public void prepareView(ContentContext ctx) throws Exception
Description copied from class:AbstractVisualComponent
prepare the rendering of a component. default attributes put in request : style, value, type, compid- Specified by:
prepareView
in interfaceIContentVisualComponent
- Overrides:
prepareView
in classAbstractVisualComponent
- Throws:
Exception
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCode
in classAbstractVisualComponent
- Throws:
Exception
-
isRealContent
public boolean isRealContent(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return true if component is considered as realContent and the page that contain the component is also considered as real content.- Specified by:
isRealContent
in interfaceIContentVisualComponent
- Overrides:
isRealContent
in classAbstractVisualComponent
- Parameters:
ctx
- current context- Returns:
-
initContent
public boolean initContent(ContentContext ctx)
Description copied from interface:IContentVisualComponent
init the content with a default value. sample : "lorem ipsum" for text component.- Specified by:
initContent
in interfaceIContentVisualComponent
- Overrides:
initContent
in classAbstractVisualComponent
- Returns:
- true if content is create.
-
updateCache
public void updateCache(ContentContext ctx)
-
getImageDescription
public String getImageDescription(ContentContext ctx)
- Specified by:
getImageDescription
in interfaceIImageTitle
-
getResourceURL
public String getResourceURL(ContentContext ctx)
- Specified by:
getResourceURL
in interfaceIImageTitle
-
getImageLinkURL
public String getImageLinkURL(ContentContext ctx)
- Specified by:
getImageLinkURL
in interfaceIImageTitle
-
isImageValid
public boolean isImageValid(ContentContext ctx)
- Specified by:
isImageValid
in interfaceIImageTitle
-
getPriority
public int getPriority(ContentContext ctx)
Description copied from interface:IImageTitle
return the priority of the picture inside the page (9=max)- Specified by:
getPriority
in interfaceIImageTitle
- Returns:
-
getLabelLevel
public int getLabelLevel(ContentContext ctx)
Description copied from interface:IContentVisualComponent
define the level of label. If there area most than 1 level on page, the label of the page is the bigger level.- Specified by:
getLabelLevel
in interfaceIContentVisualComponent
- Overrides:
getLabelLevel
in classAbstractVisualComponent
- Returns:
- 0=default, no the components is'nt label.
-
getTextTitle
public String getTextTitle(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return a string representation of the component with complete title- Specified by:
getTextTitle
in interfaceIContentVisualComponent
- Overrides:
getTextTitle
in classAbstractVisualComponent
- Returns:
-
isContentCachable
public boolean isContentCachable(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return the part of header needed for this component- Specified by:
isContentCachable
in interfaceIContentVisualComponent
- Overrides:
isContentCachable
in classAbstractVisualComponent
- Returns:
-
performEdit
public String performEdit(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponent
action call when update the content page.- Specified by:
performEdit
in interfaceIContentVisualComponent
- Overrides:
performEdit
in classAbstractVisualComponent
- Returns:
- the error message, null if no error
- Throws:
Exception
-
isXML
protected boolean isXML()
- Overrides:
isXML
in classAbstractVisualComponent
-
getIcon
public String getIcon()
- Specified by:
getIcon
in interfaceIContentVisualComponent
- Overrides:
getIcon
in classAbstractVisualComponent
-
isValueTranslatable
protected boolean isValueTranslatable()
- Overrides:
isValueTranslatable
in classAbstractVisualComponent
-
transflateFrom
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
Description copied from interface:IContentVisualComponent
translate the content of the component to the current language- Specified by:
transflateFrom
in interfaceIContentVisualComponent
- Overrides:
transflateFrom
in classAbstractVisualComponent
- Parameters:
ctx
- contextContext of the current renderingtranslator
- class to translatelang
- the language of the current content (source language)- Returns:
-
getColumnableDefaultValue
protected boolean getColumnableDefaultValue()
- Overrides:
getColumnableDefaultValue
in classAbstractVisualComponent
-
isMobileOnly
public boolean isMobileOnly(ContentContext ctx)
- Specified by:
isMobileOnly
in interfaceIImageTitle
-
-