|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.dom.css.CssBase
to.etc.domui.dom.html.NodeBase
to.etc.domui.dom.html.NodeContainer
to.etc.domui.dom.html.Span
to.etc.domui.component.misc.DisplayValue<T>
public class DisplayValue<T>
This is a special control which can be used to display all kinds of values. It behaves as a "span" containing some value that can be converted, translated and whatnot. It is meant for not too complex values that are usually represented as a span.
Constructor Summary | |
---|---|
DisplayValue(java.lang.Class<T> valueClass)
|
|
DisplayValue(T literal)
|
Method Summary | |
---|---|
IBinder |
bind()
Return the binder for this control. |
void |
createContent()
Render the content in some way. |
void |
defineFrom(PropertyMetaModel<?> pmm)
|
IConverter<T> |
getConverter()
See IConvertable.getConverter() . |
java.lang.String |
getEmptyString()
|
INodeContentRenderer<T> |
getRenderer()
The content renderer to use. |
T |
getValue()
Returns the current value of this input component. |
java.lang.Class<T> |
getValueClass()
|
boolean |
isBound()
Returns T if this control is bound to some data value. |
void |
setConverter(IConverter<T> converter)
See IConvertable.setConverter(IConverter) . |
void |
setEmptyString(java.lang.String emptyString)
|
void |
setRenderer(INodeContentRenderer<T> renderer)
|
void |
setValue(T v)
Set a new value into this control. |
Methods inherited from class to.etc.domui.dom.html.Span |
---|
visit |
Methods inherited from class to.etc.domui.dom.html.NodeContainer |
---|
add, add, add, addTable, canContain, delegateTo, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChild, getDeepChildren, getErrorFence, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalGetOldChildren, internalShelve, internalUnshelve, iterator, moveControlToModel, moveModelToControl, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setControlsEnabled, setErrorFence, setErrorFence, setText, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface to.etc.domui.dom.html.IDisplayControl |
---|
setTestID |
Constructor Detail |
---|
public DisplayValue(@Nonnull java.lang.Class<T> valueClass)
public DisplayValue(T literal)
Method Detail |
---|
@Nonnull public java.lang.Class<T> getValueClass()
public void createContent() throws java.lang.Exception
createContent
in class NodeBase
java.lang.Exception
NodeBase.createContent()
@Nullable public IConverter<T> getConverter()
IConvertable.getConverter()
.
This returns null if no converter has been set. It also returns null if a default converter is used.
getConverter
in interface IConvertable<T>
public void setConverter(@Nullable IConverter<T> converter)
IConvertable.setConverter(IConverter)
.
setConverter
in interface IConvertable<T>
converter
- @Nullable public INodeContentRenderer<T> getRenderer()
public void setRenderer(@Nullable INodeContentRenderer<T> renderer)
@Nullable public java.lang.String getEmptyString()
public void setEmptyString(@Nullable java.lang.String emptyString)
@Nonnull public IBinder bind()
bind
in interface IBindable
IBindable.bind()
public boolean isBound()
isBound
in interface IBindable
IBindable.isBound()
@Nullable public T getValue()
IDisplayControl
ValidationException
. This means that this
call either delivers correct input (as defined by it's converter and validators), null
(when empty) or throws an exception. When a ValidationException occurs the framework
mostly ignores it - it does not produce a stacktrace or error in the client. Instead
the resulting error as posted by the error handling framework gets displayed on the
form when the request completes.
To get the value of a component while ignoring exceptions call #getValueSafe()
.
getValue
in interface IDisplayControl<T>
IDisplayControl.getValue()
public void setValue(@Nullable T v)
IDisplayControl
setValue
in interface IDisplayControl<T>
public void defineFrom(@Nonnull PropertyMetaModel<?> pmm)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |