|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.xml.Component com.taursys.xml.Parameter com.taursys.xml.Attribute
An Attribute
is a sub-component of an Element. It is
rendered within the Element tag as: attribname="value". Attribute
extends Parameter
and thus can carry a value or be
bound to a value holder. It can also receive its value from the
request.
An Attribute
renders itself to its parent's element
(if the parent has its id
property set).
Constructor Summary | |
Attribute()
Constructs a new Attribute with a DefaultTextModel
and a VariantValueHolder for a String data type. |
|
Attribute(int javaDataType)
Constructs a new Attribute with a DefaultTextModel
and a VariantValueHolder for the given data type. |
Method Summary | |
protected AttributeRenderer |
createDefaultRenderer()
Creates the default AttributeRenderer for this component. |
java.lang.String |
getAttributeName()
Returns the name of the Element's attribute where the value should be rendered. |
AttributeRenderer |
getRenderer()
Returns the renderer subcomponent used to render the value to the Document. |
void |
processRenderEvent(RenderEvent e)
Responds to a render event for this component. |
void |
setAttributeName(java.lang.String newAttributeName)
Sets the name of the Element's attribute where the value should be rendered. |
void |
setRenderer(AttributeRenderer newRenderer)
Sets the renderer subcomponent used to render the value to the Document. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class com.taursys.xml.Parameter |
createDefaultModel, createDefaultModel, getDefaultValue, getFormat, getFormatPattern, getModel, getParameter, getPropertyName, getText, getValue, getValueHolder, processParameterEvent, setDefaultValue, setFormat, setFormatPattern, setModel, setParameter, setPropertyName, setText, setValue, setValueHolder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Attribute()
Attribute
with a DefaultTextModel
and a VariantValueHolder
for a String
data type.
The default model, a DefaultTextModel
, is created via the
createDefaultModel
method. By default, the
DefaultTextModel
creates and uses a VariantValueHolder
of type String
.
The default renderer, an AttributeRenderer, is created via the
createDefaultRenderer method.
public Attribute(int javaDataType)
Attribute
with a DefaultTextModel
and a VariantValueHolder
for the given data type.
To specify the data type, use one of the TYPE_xxx constants defined in
DataTypes
.
javaDataType
- data type for new modelDataTypes
Method Detail |
protected AttributeRenderer createDefaultRenderer()
public void processRenderEvent(RenderEvent e) throws RenderException
processRenderEvent
in class Component
e
- the current render event message
RenderException
- if problem rendering value to documentpublic void setRenderer(AttributeRenderer newRenderer)
public AttributeRenderer getRenderer()
public void setAttributeName(java.lang.String newAttributeName)
public java.lang.String getAttributeName()
public java.lang.String toString()
toString
in class Parameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |