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 String
SMALL_TEXT
static String
TEXT
static String
TYPE
-
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 boolean
getColumnableDefaultValue()
int
getDepth(ContentContext ctx)
protected String
getEditXHTMLCode(ContentContext ctx)
List<String>
getFields(ContentContext ctx)
protected String
getForcedPrefixViewXHTMLCode(ContentContext ctx)
String
getHexColor()
get the exadecimal color for representation of the component.String
getIcon()
protected String
getInlineStyle(ContentContext ctx)
int
getLabelLevel(ContentContext ctx)
define the level of label.int
getSearchLevel()
return the level of the component is a search.String
getSubTitle(ContentContext ctx)
int
getSubTitleLevel(ContentContext ctx)
String
getSuffixViewXHTMLCode(ContentContext ctx)
code for sufix the view XHTML code.protected String
getTag(ContentContext ctx)
String
getTextLabel(ContentContext ctx)
return a string representation of the componentString
getTextTitle(ContentContext ctx)
return a string representation of the component with complete titleprotected String
getTitle(ContentContext ctx)
String
getType()
return the type of the element.String
getViewXHTMLCode(ContentContext ctx)
String
getXHTMLConfig(ContentContext ctx)
xhtml code for config the componentString
getXHTMLId(ContentContext ctx)
protected void
init()
void
init(ComponentBean bean, ContentContext newContext)
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
isDefaultValue(ContentContext ctx)
return true if value is never modified.protected boolean
isHiddable()
boolean
isListable()
you display the composant as a list (if you want)boolean
isNoLinkable()
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()
static void
main(String[] args)
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, 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:IContentVisualComponent
return the type of the element.- Specified by:
getType
in interfaceIContentVisualComponent
- Returns:
- the type of the element.
-
getFields
public List<String> getFields(ContentContext ctx) throws Exception
- Specified by:
getFields
in classAbstractPropertiesComponent
- Throws:
Exception
-
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 classAbstractPropertiesComponent
- Throws:
Exception
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCode
in classAbstractPropertiesComponent
- Throws:
Exception
-
getDepth
public int getDepth(ContentContext ctx)
-
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:
-
getTextLabel
public String getTextLabel(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return a string representation of the component- Specified by:
getTextLabel
in interfaceIContentVisualComponent
- Overrides:
getTextLabel
in classAbstractVisualComponent
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCode
in classAbstractPropertiesComponent
- Throws:
Exception
-
getTitle
protected String getTitle(ContentContext ctx) throws ServiceException, Exception
- Throws:
ServiceException
Exception
-
getTag
protected String getTag(ContentContext ctx)
- Overrides:
getTag
in classAbstractVisualComponent
-
isListable
public boolean isListable()
Description copied from interface:IContentVisualComponent
you display the composant as a list (if you want)- Specified by:
isListable
in interfaceIContentVisualComponent
- Overrides:
isListable
in classAbstractVisualComponent
- Returns:
- true if a text is listable
-
getSearchLevel
public int getSearchLevel()
Description copied from interface:IContentVisualComponent
return the level of the component is a search.- Specified by:
getSearchLevel
in interfaceIContentVisualComponent
- Overrides:
getSearchLevel
in classAbstractVisualComponent
- Returns:
- 1-LOW 2-MIDDLE 3-HIGH
-
getHexColor
public String getHexColor()
Description copied from interface:IContentVisualComponent
get the exadecimal color for representation of the component.- Specified by:
getHexColor
in interfaceIContentVisualComponent
- Overrides:
getHexColor
in classAbstractVisualComponent
- Returns:
- a exadecimal color (sample : a5b499)
-
init
protected void init() throws ResourceNotFoundException
- Overrides:
init
in classAbstractVisualComponent
- Throws:
ResourceNotFoundException
-
init
public void init(ComponentBean bean, ContentContext newContext) throws Exception
- Overrides:
init
in classAbstractPropertiesComponent
- Throws:
Exception
-
initContent
public boolean initContent(ContentContext ctx) throws Exception
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.
- Throws:
Exception
-
getSubTitle
public String getSubTitle(ContentContext ctx)
- Specified by:
getSubTitle
in interfaceISubTitle
-
getSubTitleLevel
public int getSubTitleLevel(ContentContext ctx)
- Specified by:
getSubTitleLevel
in interfaceISubTitle
-
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.
-
getXHTMLId
public String getXHTMLId(ContentContext ctx)
- Specified by:
getXHTMLId
in interfaceISubTitle
-
getInlineStyle
protected String getInlineStyle(ContentContext ctx)
- Overrides:
getInlineStyle
in classAbstractVisualComponent
-
getXHTMLConfig
public String getXHTMLConfig(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponent
xhtml code for config the component- Specified by:
getXHTMLConfig
in interfaceIContentVisualComponent
- Overrides:
getXHTMLConfig
in classAbstractVisualComponent
- Returns:
- Throws:
Exception
-
isHiddable
protected boolean isHiddable()
- Overrides:
isHiddable
in classAbstractVisualComponent
-
getForcedPrefixViewXHTMLCode
protected String getForcedPrefixViewXHTMLCode(ContentContext ctx)
- Overrides:
getForcedPrefixViewXHTMLCode
in classAbstractVisualComponent
-
getSuffixViewXHTMLCode
public String getSuffixViewXHTMLCode(ContentContext ctx)
Description copied from interface:IContentVisualComponent
code for sufix the view XHTML code.- Specified by:
getSuffixViewXHTMLCode
in interfaceIContentVisualComponent
- Overrides:
getSuffixViewXHTMLCode
in classAbstractVisualComponent
- Returns:
- XHTML code.
-
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 classAbstractPropertiesComponent
- Parameters:
ctx
- current context- Returns:
-
isNoLinkable
public boolean isNoLinkable()
- Overrides:
isNoLinkable
in classAbstractVisualComponent
-
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 classAbstractPropertiesComponent
- Returns:
- the error message, null if no error
- Throws:
Exception
-
isDefaultValue
public boolean isDefaultValue(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return true if value is never modified.- Specified by:
isDefaultValue
in interfaceIContentVisualComponent
- Overrides:
isDefaultValue
in classAbstractVisualComponent
- Returns:
- true if value contain default value.
-
getIcon
public String getIcon()
- Specified by:
getIcon
in interfaceIContentVisualComponent
- Overrides:
getIcon
in classAbstractVisualComponent
-
main
public static void main(String[] args)
-
isValueTranslatable
protected boolean isValueTranslatable()
- Overrides:
isValueTranslatable
in classAbstractVisualComponent
-
getColumnableDefaultValue
protected boolean getColumnableDefaultValue()
- Overrides:
getColumnableDefaultValue
in classAbstractPropertiesComponent
-
-