iApp Implementation Details

This page is for specifics on the iApp implementation details. More to come.
  • Special Variables

    • $tmsh::app_name
      
      • this returns the name of your iApp
    • $::section_name__element_name
      
      - this returns the value of the form data from the specified element in the specified section. Note the double underscore between section and element. Also note that it would be unwise to use a double underscore in section and element names within the presentation APL.

When using iApp’s some specific variables are set to pass data entered in presentation layer fields. The
$tmsh::app_name

variable is set to the name of the iApp. When passing values for fields specified in the presentation layer APL code the format

$::section_name__element_name
is used. For example, if you had the following presentation layer APL code:
section Pool {
    string Name required display "large" default "My_Pool"
    string Description display "large"
}

You could access the Pool Name field by referencing the
$::Pool__Name

variable. To access the Pool Description variable you would use the

$::Pool__Description

variable. The implementation layer TCL code below gives an example of how to access and print the field values to the

/var/tmp/scriptd.out
log file:
# Example that prints the values entered in the above presentation layer code
puts [format "iApp Name is: %s" $tmsh::app_name]
puts [format "Pool Name is: %s" $::Pool__Name]
puts [format "Pool Description is: %s" $::Pool__Description]