Element "Dummy" <dummy>

Top  Previous  Next

Dummy elements alone have no direct impact on page. When a page is compiled as XSL or HTML, nothing is generated for a dummy element.

Properties

Name

Rectangle

Dock

Anchors

Value

CT Definitions

Note

 

Dummy elements are mostly used:

to define custom compile time functions

You can use the "Value" property of a dummy element to define custom compile time functions.

See <cti:define> compile time instruction.

 

as a part of library elements to get a certain type of information from the user

During the compile process, the MoreMotion Application Studio executes the compile-time functions defined in the "Value" and "CT Definitions" properties of a Dummy element. Knowing this you can use appropriate compile-time functions in these properties and provide evaluated parameters to other elements or to configuration files.

The following example will explain better.

There are two dummy elements and a text element inside a panel element.

dummy_usage

Dummy elements have a custom property named as "color" and the value property of the dummy elements has the following definition:

%set(colors,colors + color + ';')

 

Below you can see the entire definition in XML of the panel and contained elements.

 

<panel name="panel1">

  <ctdef>

%set(colors,'') // (1) Reset page variable "colors"

  </ctdef>

  <elements>

    <dummy name="dummy1">

      <prop name="color">red</prop>

      <ctdef>

//(2) Accumulate the value of "dummy1/color" in page variable "colors"

%set(colors,colors + color + ';')  

      </ctdef>

    </dummy>

    <dummy name="dummy2"

      <prop name="color">blue</prop>

      <ctdef>

//(3) Accumulate the value of "dummy2/color" in page variable "colors"

%set(colors,colors + color + ';')  

      </ctdef>

    </dummy>

    <text name="all_colors">

      <value>%vof(colors)</value>

      <!--(4)the value property of "all_colors" element will be:"red;blue;" -->

      <ctdef>

//(5) Transfer the accumulated value to "sysinfo.xml" file

%set(s:colors,colors)  

      </ctdef>

    </dummy>

    </text>

  </elements>

</panel>

 

See Compile-time Functions.