Package org.javlo.component.title
Class Heading
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.properties.AbstractPropertiesComponent
-
- org.javlo.component.title.Heading
-
- All Implemented Interfaces:
Comparable<IContentVisualComponent>,IContentVisualComponent,ISubTitle,IRestItem
public class Heading extends AbstractPropertiesComponent implements ISubTitle
-
-
Field Summary
Fields Modifier and Type Field Description static StringSMALL_TEXTstatic StringTEXTstatic StringTYPE-
Fields inherited from class org.javlo.component.properties.AbstractPropertiesComponent
properties
-
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
-
-
Constructor Summary
Constructors Constructor Description Heading()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleangetColumnableDefaultValue()intgetDepth(ContentContext ctx)protected StringgetEditXHTMLCode(ContentContext ctx)List<String>getFields(ContentContext ctx)protected StringgetForcedPrefixViewXHTMLCode(ContentContext ctx)StringgetHexColor()get the exadecimal color for representation of the component.StringgetIcon()protected StringgetInlineStyle(ContentContext ctx)intgetLabelLevel(ContentContext ctx)define the level of label.intgetSearchLevel()return the level of the component is a search.StringgetSubTitle(ContentContext ctx)intgetSubTitleLevel(ContentContext ctx)StringgetSuffixViewXHTMLCode(ContentContext ctx)code for sufix the view XHTML code.protected StringgetTag(ContentContext ctx)StringgetTextLabel(ContentContext ctx)return a string representation of the componentStringgetTextTitle(ContentContext ctx)return a string representation of the component with complete titleprotected StringgetTitle(ContentContext ctx)StringgetType()return the type of the element.StringgetViewXHTMLCode(ContentContext ctx)StringgetXHTMLConfig(ContentContext ctx)xhtml code for config the componentStringgetXHTMLId(ContentContext ctx)protected voidinit()voidinit(ComponentBean bean, ContentContext newContext)booleaninitContent(ContentContext ctx)init the content with a default value. sample : "lorem ipsum" for text component.booleanisContentCachable(ContentContext ctx)return the part of header needed for this componentbooleanisDefaultValue(ContentContext ctx)return true if value is never modified.protected booleanisHiddable()booleanisListable()you display the composant as a list (if you want)booleanisNoLinkable()booleanisRealContent(ContentContext ctx)return true if component is considered as realContent and the page that contain the component is also considered as real content.protected booleanisValueTranslatable()static voidmain(String[] args)StringperformEdit(ContentContext ctx)action call when update the content page.voidprepareView(ContentContext ctx)prepare the rendering of a component. default attributes put in request : style, value, type, compid-
Methods inherited from class org.javlo.component.properties.AbstractPropertiesComponent
createKeyWithField, getContentAsMap, getContentAsText, getFieldChoice, getFieldDoubleValue, getFieldLongValue, getFieldName, getFieldType, getFieldValue, getFieldValue, getFieldValue, getHeader, getLabel, getListSeparator, getMdSize, getRowSize, getWordCount, getXsSize, isAllTranslated, renderField, setFieldValue, storeProperties, transflateFrom, validateField
-
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, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getCurrentRenderer, getDataAttributes, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditorComplexity, getEditRenderer, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getExternalResources, getFileDirectory, getFirstPrefix, getFontAwesome, getForcedId, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURI, getHelpURL, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInputName, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getKey, getLastSufix, getLayout, getListClass, getListGroup, getListItemTag, getListTag, getLocalMessage, getLock, getManualCssClass, getMarkerList, getMessage, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPageDescription, getPrefixCssClass, getPrefixViewXHTMLCode, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getReferenceComponent, getRemplacement, getRenderer, getRendererTitle, getRenderes, getRequestComponent, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getSpecificClass, getSpecificCssClass, getStyle, getStyleLabel, getStyleLabelList, getStyleList, getStyleTitle, getTextColor, getTextForSearch, getTextMessage, getTextPosition, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getXHTMLCode, haveRight, includeComponentJSP, includePage, insert, isAjaxWrapper, isAskWidth, isAutoDeletable, isAutoRenderer, isBackgroundColored, isCanAddClass, isCloseRow, isColored, isColumnable, isConfig, isContentCachableByQuery, isContentTimeCachable, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHidden, isHiddenInMode, isHiddenInModeValue, isInline, isInsertable, isList, isMetaTitle, isMirroredByDefault, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isOpenRow, isPreviousSame, isPreviousSame, isRepeat, isRepeatable, isRestMatch, isReversedLink, isStyleHidden, isUnique, isValueProperties, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, isXML, 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
-
TEXT
public static final String TEXT
- See Also:
- Constant Field Values
-
SMALL_TEXT
public static final String SMALL_TEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public String getType()
Description copied from interface:IContentVisualComponentreturn the type of the element.- Specified by:
getTypein interfaceIContentVisualComponent- Returns:
- the type of the element.
-
getFields
public List<String> getFields(ContentContext ctx) throws Exception
- Specified by:
getFieldsin classAbstractPropertiesComponent- Throws:
Exception
-
prepareView
public void prepareView(ContentContext ctx) throws Exception
Description copied from class:AbstractVisualComponentprepare the rendering of a component. default attributes put in request : style, value, type, compid- Specified by:
prepareViewin interfaceIContentVisualComponent- Overrides:
prepareViewin classAbstractPropertiesComponent- Throws:
Exception
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCodein classAbstractPropertiesComponent- Throws:
Exception
-
getDepth
public int getDepth(ContentContext ctx)
-
getTextTitle
public String getTextTitle(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn a string representation of the component with complete title- Specified by:
getTextTitlein interfaceIContentVisualComponent- Overrides:
getTextTitlein classAbstractVisualComponent- Returns:
-
getTextLabel
public String getTextLabel(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn a string representation of the component- Specified by:
getTextLabelin interfaceIContentVisualComponent- Overrides:
getTextLabelin classAbstractVisualComponent
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCodein classAbstractPropertiesComponent- Throws:
Exception
-
getTitle
protected String getTitle(ContentContext ctx) throws ServiceException, Exception
- Throws:
ServiceExceptionException
-
getTag
protected String getTag(ContentContext ctx)
- Overrides:
getTagin classAbstractVisualComponent
-
isListable
public boolean isListable()
Description copied from interface:IContentVisualComponentyou display the composant as a list (if you want)- Specified by:
isListablein interfaceIContentVisualComponent- Overrides:
isListablein classAbstractVisualComponent- Returns:
- true if a text is listable
-
getSearchLevel
public int getSearchLevel()
Description copied from interface:IContentVisualComponentreturn the level of the component is a search.- Specified by:
getSearchLevelin interfaceIContentVisualComponent- Overrides:
getSearchLevelin classAbstractVisualComponent- Returns:
- 1-LOW 2-MIDDLE 3-HIGH
-
getHexColor
public String getHexColor()
Description copied from interface:IContentVisualComponentget the exadecimal color for representation of the component.- Specified by:
getHexColorin interfaceIContentVisualComponent- Overrides:
getHexColorin classAbstractVisualComponent- Returns:
- a exadecimal color (sample : a5b499)
-
init
protected void init() throws ResourceNotFoundException- Overrides:
initin classAbstractVisualComponent- Throws:
ResourceNotFoundException
-
init
public void init(ComponentBean bean, ContentContext newContext) throws Exception
- Overrides:
initin classAbstractPropertiesComponent- Throws:
Exception
-
initContent
public boolean initContent(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponentinit the content with a default value. sample : "lorem ipsum" for text component.- Specified by:
initContentin interfaceIContentVisualComponent- Overrides:
initContentin classAbstractVisualComponent- Returns:
- true if content is create.
- Throws:
Exception
-
getSubTitle
public String getSubTitle(ContentContext ctx)
- Specified by:
getSubTitlein interfaceISubTitle
-
getSubTitleLevel
public int getSubTitleLevel(ContentContext ctx)
- Specified by:
getSubTitleLevelin interfaceISubTitle
-
getLabelLevel
public int getLabelLevel(ContentContext ctx)
Description copied from interface:IContentVisualComponentdefine the level of label. If there area most than 1 level on page, the label of the page is the bigger level.- Specified by:
getLabelLevelin interfaceIContentVisualComponent- Overrides:
getLabelLevelin classAbstractVisualComponent- Returns:
- 0=default, no the components is'nt label.
-
getXHTMLId
public String getXHTMLId(ContentContext ctx)
- Specified by:
getXHTMLIdin interfaceISubTitle
-
getInlineStyle
protected String getInlineStyle(ContentContext ctx)
- Overrides:
getInlineStylein classAbstractVisualComponent
-
getXHTMLConfig
public String getXHTMLConfig(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponentxhtml code for config the component- Specified by:
getXHTMLConfigin interfaceIContentVisualComponent- Overrides:
getXHTMLConfigin classAbstractVisualComponent- Returns:
- Throws:
Exception
-
isHiddable
protected boolean isHiddable()
- Overrides:
isHiddablein classAbstractVisualComponent
-
getForcedPrefixViewXHTMLCode
protected String getForcedPrefixViewXHTMLCode(ContentContext ctx)
- Overrides:
getForcedPrefixViewXHTMLCodein classAbstractVisualComponent
-
getSuffixViewXHTMLCode
public String getSuffixViewXHTMLCode(ContentContext ctx)
Description copied from interface:IContentVisualComponentcode for sufix the view XHTML code.- Specified by:
getSuffixViewXHTMLCodein interfaceIContentVisualComponent- Overrides:
getSuffixViewXHTMLCodein classAbstractVisualComponent- Returns:
- XHTML code.
-
isRealContent
public boolean isRealContent(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn true if component is considered as realContent and the page that contain the component is also considered as real content.- Specified by:
isRealContentin interfaceIContentVisualComponent- Overrides:
isRealContentin classAbstractPropertiesComponent- Parameters:
ctx- current context- Returns:
-
isNoLinkable
public boolean isNoLinkable()
- Overrides:
isNoLinkablein classAbstractVisualComponent
-
isContentCachable
public boolean isContentCachable(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn the part of header needed for this component- Specified by:
isContentCachablein interfaceIContentVisualComponent- Overrides:
isContentCachablein classAbstractVisualComponent- Returns:
-
performEdit
public String performEdit(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponentaction call when update the content page.- Specified by:
performEditin interfaceIContentVisualComponent- Overrides:
performEditin classAbstractPropertiesComponent- Returns:
- the error message, null if no error
- Throws:
Exception
-
isDefaultValue
public boolean isDefaultValue(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn true if value is never modified.- Specified by:
isDefaultValuein interfaceIContentVisualComponent- Overrides:
isDefaultValuein classAbstractVisualComponent- Returns:
- true if value contain default value.
-
getIcon
public String getIcon()
- Specified by:
getIconin interfaceIContentVisualComponent- Overrides:
getIconin classAbstractVisualComponent
-
main
public static void main(String[] args)
-
isValueTranslatable
protected boolean isValueTranslatable()
- Overrides:
isValueTranslatablein classAbstractVisualComponent
-
getColumnableDefaultValue
protected boolean getColumnableDefaultValue()
- Overrides:
getColumnableDefaultValuein classAbstractPropertiesComponent
-
-