Package org.javlo.component.properties
Class AbstractPropertiesComponent
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.properties.AbstractPropertiesComponent
-
- All Implemented Interfaces:
Comparable<IContentVisualComponent>,IContentVisualComponent,IRestItem
- Direct Known Subclasses:
AbstractSurvey,CalendarComponent,ChatComponent,ChooseBaseContext,ComponentList,ContactInformation,CountTool,DebugNote,DefinitionComponent,DynamicComponentFilter,DynamicComponentList,EditBasketComponent,EventRegistration,ExtendedWidget,FileFinder,FormInputComponent,Heading,LanguageCopy,LottieAnimationComponent,Menu,Multimedia,MyEvents,ProductComponent,RSSRegistration,SecureText,TableComponent,TaxonomySessionComponent,UserLogin,Wall
public abstract class AbstractPropertiesComponent extends AbstractVisualComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected Propertiesproperties-
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 AbstractPropertiesComponent()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringcreateKeyWithField(String inField)protected booleangetColumnableDefaultValue()Map<String,Object>getContentAsMap(ContentContext ctx)StringgetContentAsText(ContentContext ctx)get the text of the componentprotected StringgetEditXHTMLCode(ContentContext ctx)Collection<Map.Entry<String,String>>getFieldChoice(ContentContext ctx, String fieldName)protected doublegetFieldDoubleValue(String inField)protected longgetFieldLongValue(String inField)protected static StringgetFieldName(String field)abstract List<String>getFields(ContentContext ctx)protected static StringgetFieldType(String field)protected StringgetFieldValue(String inField)work only if all fields is translatedprotected StringgetFieldValue(String inField, String defaultValue)protected StringgetFieldValue(ContentContext ctx, String inField)StringgetHeader()protected StringgetLabel(I18nAccess i18nAccess, String fieldName)protected StringgetListSeparator()protected intgetMdSize()intgetRowSize(String field)StringgetViewXHTMLCode(ContentContext ctx)intgetWordCount(ContentContext ctx)count the word in the content.protected intgetXsSize()voidinit(ComponentBean bean, ContentContext newContext)protected booleanisAllTranslated()all field value is different on any language, if false, only field end with .i18n is different.booleanisRealContent(ContentContext ctx)return true if component is considered as realContent and the page that contain the component is also considered as real content.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, compidprotected voidrenderField(PrintWriter out, ContentContext ctx, String field)protected voidsetFieldValue(String inField, String value)voidstoreProperties()booleantransflateFrom(ContentContext ctx, ITranslator translator, String lang)translate the content of the component to the current languageStringvalidateField(ContentContext ctx, String fieldName, String fieldValue)-
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, getForcedPrefixViewXHTMLCode, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURI, getHelpURL, getHexColor, getI18nEditableKeys, getIcon, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputName, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getKey, getLabelLevel, 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, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getSpecificClass, getSpecificCssClass, getStyle, getStyleLabel, getStyleLabelList, getStyleList, getStyleTitle, getSuffixViewXHTMLCode, getTag, getTextColor, getTextForSearch, getTextLabel, getTextMessage, getTextPosition, getTextTitle, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, init, initContent, insert, isAjaxWrapper, isAskWidth, isAutoDeletable, isAutoRenderer, isBackgroundColored, isCanAddClass, isCloseRow, isColored, isColumnable, isConfig, isContentCachable, 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, isValueTranslatable, 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
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javlo.component.core.IContentVisualComponent
getType
-
-
-
-
Field Detail
-
properties
protected Properties properties
-
-
Method Detail
-
isAllTranslated
protected boolean isAllTranslated()
all field value is different on any language, if false, only field end with .i18n is different.- Returns:
-
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 classAbstractVisualComponent- Throws:
Exception
-
getFieldChoice
public Collection<Map.Entry<String,String>> getFieldChoice(ContentContext ctx, String fieldName)
-
getMdSize
protected int getMdSize()
-
getXsSize
protected int getXsSize()
-
getLabel
protected String getLabel(I18nAccess i18nAccess, String fieldName)
-
renderField
protected void renderField(PrintWriter out, ContentContext ctx, String field) throws ServiceException, Exception
- Throws:
ServiceExceptionException
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCodein classAbstractVisualComponent- Throws:
Exception
-
getFieldDoubleValue
protected double getFieldDoubleValue(String inField)
-
getFieldLongValue
protected long getFieldLongValue(String inField)
-
getFields
public abstract List<String> getFields(ContentContext ctx) throws Exception
- Throws:
Exception
-
getFieldValue
protected String getFieldValue(String inField)
work only if all fields is translated- Parameters:
inField-- Returns:
-
getFieldValue
protected String getFieldValue(ContentContext ctx, String inField)
-
getHeader
public String getHeader()
-
getRowSize
public int getRowSize(String field)
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCodein classAbstractVisualComponent- Throws:
Exception
-
getWordCount
public int getWordCount(ContentContext ctx)
Description copied from interface:IContentVisualComponentcount the word in the content.- Specified by:
getWordCountin interfaceIContentVisualComponent- Overrides:
getWordCountin classAbstractVisualComponent- Returns:
-
init
public void init(ComponentBean bean, ContentContext newContext) throws Exception
- Overrides:
initin classAbstractVisualComponent- Throws:
Exception
-
getListSeparator
protected String getListSeparator()
-
validateField
public String validateField(ContentContext ctx, String fieldName, String fieldValue) throws Exception
- Throws:
Exception
-
getColumnableDefaultValue
protected boolean getColumnableDefaultValue()
- Overrides:
getColumnableDefaultValuein classAbstractVisualComponent
-
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 classAbstractVisualComponent- Returns:
- the error message, null if no error
- Throws:
Exception
-
storeProperties
public void storeProperties()
-
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 classAbstractVisualComponent- Parameters:
ctx- current context- Returns:
-
getContentAsMap
public Map<String,Object> getContentAsMap(ContentContext ctx) throws Exception
- Specified by:
getContentAsMapin interfaceIRestItem- Overrides:
getContentAsMapin classAbstractVisualComponent- Throws:
Exception
-
getContentAsText
public String getContentAsText(ContentContext ctx)
Description copied from interface:IContentVisualComponentget the text of the component- Specified by:
getContentAsTextin interfaceIContentVisualComponent- Overrides:
getContentAsTextin classAbstractVisualComponent- Returns:
-
main
public static void main(String[] args)
-
transflateFrom
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
Description copied from interface:IContentVisualComponenttranslate the content of the component to the current language- Specified by:
transflateFromin interfaceIContentVisualComponent- Overrides:
transflateFromin classAbstractVisualComponent- Parameters:
ctx- contextContext of the current renderingtranslator- class to translatelang- the language of the current content (source language)- Returns:
-
-