Display method

The operations, methods and display methods constitute the behavioral feature of a class. A display method implements the specification given by an operation. A display method is a mean to introduce polymorphism in the presentation part of a web application. However, separation between appearance and the behavior is respected because the method is simply associated to an element which remains in the navigation model. Each entry variable of the presentation element (zone or webfile) that has no default value must be linked to a formal parameter of the method.

Properties
Name Name of the display method. Same as the name of its specification.
Visibility  public: the method is accessible in the methods of the class, the subclasses and from outside of the class.
 protected: the method is accessible in the methods of the class and the subclasses
 private: the method is accessible only in the methods of the class.
Keywords none: operates on instances of the class
static: operates on the class itself
native: the implementation of the operation must be written by the programmer in an external library
contextually_native: the implementation of the operation must be written by the programmer in an external library
Library name The name of the library that contains the implementation of an operation whose keywords are native or contextually_native (see Operation)
Return Type The type must be Void, String or Text.
When Void, all output is emitted directly in the current output stream.
When String or Text, all output is buffered in a string buffer and returned when the method ends its execution.
Is query Ignored.
Web file A presentation element (zone or web file) that is associated to this display method and constitutes the implementation of a display operation.
Stereotype Ignored
Arguments A sequence of typed formal parameters. A parameter is treated in mode in. It has:
a name: name of the formal parameter (mandatory)
a type: the type of the parameter:
a Xion data type: Boolean, Byte, Date, Double, Float, Int, Integer, Long, Real, Short, String, Text, Time
the root class of all business model classes: OclObject.
an enumeration type
a class
a collection type
: Collection, Set, Bag or Sequence
Variable mappings Associate each entry variable of the presentation element that has no default value to a formal parameter of the method. Type conformance must be respected.
 
TOC ] Previous ] Next ]