Package org.linkki.core.ui.aspects
Class PlaceholderAspectDefinition
- java.lang.Object
-
- org.linkki.core.binding.descriptor.aspect.base.ModelToUiAspectDefinition<String>
-
- org.linkki.core.ui.aspects.PlaceholderAspectDefinition
-
- All Implemented Interfaces:
LinkkiAspectDefinition
public class PlaceholderAspectDefinition extends ModelToUiAspectDefinition<String>
Aspect definition to set the placeholder of a component. Should only be used on Components which have a setPlaceholder method for exampleTextField.
-
-
Field Summary
Fields Modifier and Type Field Description static StringHAS_PLACEHOLDERstatic StringNAME-
Fields inherited from interface org.linkki.core.binding.descriptor.aspect.LinkkiAspectDefinition
DERIVED_BY_LINKKI, VALUE_ASPECT_NAME
-
-
Constructor Summary
Constructors Constructor Description PlaceholderAspectDefinition(String value, PlaceholderType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Aspect<String>createAspect()Consumer<String>createComponentValueSetter(ComponentWrapper componentWrapper)-
Methods inherited from class org.linkki.core.binding.descriptor.aspect.base.ModelToUiAspectDefinition
createUiUpdater, handleUiUpdateException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linkki.core.binding.descriptor.aspect.LinkkiAspectDefinition
initModelUpdate, supports
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
HAS_PLACEHOLDER
public static final String HAS_PLACEHOLDER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PlaceholderAspectDefinition
public PlaceholderAspectDefinition(String value, PlaceholderType type)
-
-
Method Detail
-
createAspect
public Aspect<String> createAspect()
- Specified by:
createAspectin classModelToUiAspectDefinition<String>
-
createComponentValueSetter
public Consumer<String> createComponentValueSetter(ComponentWrapper componentWrapper)
- Specified by:
createComponentValueSetterin classModelToUiAspectDefinition<String>- Implementation Note:
- Vaadin doesn't offer an interface for the
setPlaceholdermethod, so we directly set the HTML elements "placeholder" property. This should have no effect on components that do not support a placeholder.
-
-