org.infolayer.templates.html
Class TE_property

java.lang.Object
  extended byorg.kxml2.kdom.Element
      extended byorg.infolayer.templates.TemplateElement
          extended byorg.infolayer.templates.html.TE_property
Direct Known Subclasses:
TE_part

public class TE_property
extends TemplateElement

The <t:property> element displays the object property denoted by the name attribute. If the property element is embedded in a form of type edit, and the user has the permission to edit the given property, an input element corresponding to the object type is created.

If the property is embedded in a form of type query, and the property type is queryable, an input element for a query is displayed.

Please note that the context must be an instance for the display and edit mode, but a class for the query mode.

name
The name of the property to be displayed, edited, or queried.
compact
If "true", the element does not use empty space to align with other elements.

See Also:
Serialized Form

Constructor Summary
TE_property()
           
 
Method Summary
 void apply(XmlSerializer xw, IlRequest context, Bindings bindings)
          Applies the template in the given context and with the given bindings.
static void getClassesAsList(StringList result, UmlClass type)
          Collects a flat list of classes that can be created in a given context by the current user.
static void getClassesAsTree(StringList result, UmlClass type, int margin)
          Collects a tree of classes that can be created in a given context by the current user.
static void writeAssocSelect(XmlSerializer xw, IlRequest context, UmlObject object, UmlProperty part, java.lang.Object value, boolean isQuery)
          Writes a selection box holding the possible values that can be assigned to the given association.
static void writeBooleanSelect(XmlSerializer xw, IlRequest context, UmlClass cls, UmlObject object, Feature part, java.lang.Object value, boolean query)
           
static void writeClassOptions(XmlSerializer xw, IlRequest context, StringList classes)
          Writes the contents of an HTML combo that contains instantiable classes.
static void writeEditDate(XmlSerializer xw, java.lang.String id, java.util.Date value, java.lang.String format, boolean query)
           
static void writeEnumerationSelect(XmlSerializer xw, IlRequest context, UmlClass cls, UmlObject object, Feature part, java.lang.Object value, boolean query)
           
static void writeProperty(XmlSerializer xw, IlRequest context, UmlClass umlClass, UmlObject object, UmlProperty part, boolean compact)
           
 
Methods inherited from class org.infolayer.templates.TemplateElement
applyChildren, assertNoChildren, assertNoChildren, getAttributeValue, getVarDefs, init, readTextContent, setVarDefs, writeAttributes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TE_property

public TE_property()
Method Detail

writeClassOptions

public static void writeClassOptions(XmlSerializer xw,
                                     IlRequest context,
                                     StringList classes)
                              throws java.io.IOException
Writes the contents of an HTML combo that contains instantiable classes.

Throws:
java.io.IOException

writeAssocSelect

public static void writeAssocSelect(XmlSerializer xw,
                                    IlRequest context,
                                    UmlObject object,
                                    UmlProperty part,
                                    java.lang.Object value,
                                    boolean isQuery)
                             throws java.io.IOException
Writes a selection box holding the possible values that can be assigned to the given association. Takes into account the association's current value.

Throws:
java.io.IOException

writeEditDate

public static void writeEditDate(XmlSerializer xw,
                                 java.lang.String id,
                                 java.util.Date value,
                                 java.lang.String format,
                                 boolean query)
                          throws java.io.IOException
Throws:
java.io.IOException

writeEnumerationSelect

public static void writeEnumerationSelect(XmlSerializer xw,
                                          IlRequest context,
                                          UmlClass cls,
                                          UmlObject object,
                                          Feature part,
                                          java.lang.Object value,
                                          boolean query)
                                   throws java.io.IOException
Throws:
java.io.IOException

writeBooleanSelect

public static void writeBooleanSelect(XmlSerializer xw,
                                      IlRequest context,
                                      UmlClass cls,
                                      UmlObject object,
                                      Feature part,
                                      java.lang.Object value,
                                      boolean query)
                               throws java.io.IOException
Throws:
java.io.IOException

writeProperty

public static void writeProperty(XmlSerializer xw,
                                 IlRequest context,
                                 UmlClass umlClass,
                                 UmlObject object,
                                 UmlProperty part,
                                 boolean compact)
                          throws java.io.IOException
Throws:
java.io.IOException

getClassesAsList

public static void getClassesAsList(StringList result,
                                    UmlClass type)
Collects a flat list of classes that can be created in a given context by the current user. The result is a StringList object, each entry of which holds a class name and a reference to the corresponding class.


getClassesAsTree

public static void getClassesAsTree(StringList result,
                                    UmlClass type,
                                    int margin)
Collects a tree of classes that can be created in a given context by the current user. The result is a StringList object, each entry of which holds a class name and a reference to the corresponding class. Each class is also associated with a value that reflects the classes' margin in the tree.


apply

public void apply(XmlSerializer xw,
                  IlRequest context,
                  Bindings bindings)
           throws java.io.IOException
Applies the template in the given context and with the given bindings. The zero'th element of the bindings is relevant. It may be either a class or an object. The name property denotes the attribute or relation to write.

Overrides:
apply in class TemplateElement
Throws:
java.io.IOException