org.riotfamily.pages.riot.form
Class AbstractLocalizedElement

java.lang.Object
  extended by org.riotfamily.forms.AbstractElement
      extended by org.riotfamily.forms.AbstractEditorBase
          extended by org.riotfamily.forms.CompositeElement
              extended by org.riotfamily.forms.element.TemplateElement
                  extended by org.riotfamily.pages.riot.form.AbstractLocalizedElement
All Implemented Interfaces:
Element, BeanFactoryAware
Direct Known Subclasses:
PagePropertyElement, SitePropertyElement

public abstract class AbstractLocalizedElement
extends TemplateElement

Abstract base class for elements that can overwrite default values inherited from a master locale.

Since:
7.0
Author:
Felix Gnass [fgnass at neteye dot de]

Field Summary
 
Fields inherited from class org.riotfamily.forms.AbstractElement
log
 
Constructor Summary
AbstractLocalizedElement(ElementFactory elementFactory, LocalizedEditorBinder binder)
           
 
Method Summary
 String getLabel()
           
protected abstract  ValueWrapper<?> getMasterValue(String property)
           
 String getStyleClass()
          Returns the elements style class.
protected  void initCompositeElement()
          Subclasses may override this method to perform initialization tasks.
protected abstract  boolean isLocalized()
           
 boolean isOverwrite()
           
 boolean isRequired()
          Returns whether the element is mandatory and must be filled out by the user.
 void processRequest(FormRequest request)
          Calls processRequestInternal() and afterwards processRequestComponents() to process the components.
protected  void renderTemplate(PrintWriter writer)
           
protected  void toggle()
           
 
Methods inherited from class org.riotfamily.forms.element.TemplateElement
addComponent, afterFormContextSet, getAttribute, getRenderModel, getTemplate, renderInternal, setAttribute, setTemplate
 
Methods inherited from class org.riotfamily.forms.CompositeElement
addComponent, afterFormSet, focus, getComponents, initComponent, isCompositeElement, isEmpty, processRequestCompontents, processRequestInternal, removeComponent, setBeanFactory
 
Methods inherited from class org.riotfamily.forms.AbstractEditorBase
addChangeListener, afterBindingSet, fireChangeEvent, getEditorBinding, getFieldName, getHint, getParamName, hasListeners, setEditorBinding, setFieldName, setParamName
 
Methods inherited from class org.riotfamily.forms.AbstractElement
getEventTriggerId, getForm, getFormContext, getFormListener, getId, getParent, getSystemStyleClass, getWrapperStyleClass, isEnabled, isVisible, render, render, setEnabled, setForm, setFormContext, setHint, setId, setInline, setLabel, setParent, setReadOnly, setRequired, setStyleClass, setVisible, setWrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLocalizedElement

public AbstractLocalizedElement(ElementFactory elementFactory,
                                LocalizedEditorBinder binder)
Method Detail

isLocalized

protected abstract boolean isLocalized()

getMasterValue

protected abstract ValueWrapper<?> getMasterValue(String property)

initCompositeElement

protected void initCompositeElement()
Description copied from class: CompositeElement
Subclasses may override this method to perform initialization tasks. A reference to the form will be set at this point and all components will be initialized. The default implementation does nothing.

Overrides:
initCompositeElement in class CompositeElement

getLabel

public String getLabel()
Overrides:
getLabel in class AbstractEditorBase

isRequired

public boolean isRequired()
Description copied from class: AbstractElement
Returns whether the element is mandatory and must be filled out by the user.

Specified by:
isRequired in interface Element
Overrides:
isRequired in class AbstractElement

getStyleClass

public String getStyleClass()
Description copied from interface: Element
Returns the elements style class.

Specified by:
getStyleClass in interface Element
Overrides:
getStyleClass in class AbstractElement

processRequest

public void processRequest(FormRequest request)
Description copied from class: CompositeElement
Calls processRequestInternal() and afterwards processRequestComponents() to process the components.

Specified by:
processRequest in interface Element
Overrides:
processRequest in class CompositeElement

renderTemplate

protected void renderTemplate(PrintWriter writer)
Overrides:
renderTemplate in class TemplateElement

isOverwrite

public boolean isOverwrite()

toggle

protected void toggle()