f. property()

Description:

Retrieve property value from the property file.

Syntax:

f.property(p)

Note:

The function retrieves property p from property file f and return.

Parameter:

f

File object

p

Property name; the function returns a table sequence composed of all properties if it is omitted

Option:

@v

Read a property value and parse it as what it is; by default, return the value as a string

Return value:

Value/Table sequence

Example:

A normal scenario:

 

A

 

1

=file("E://test.property").property("color")

Property file, export “red .

2

=file("E://test.property").property()

 

Scenario of reading color scheme for a graph:

The color scheme file is [installation directory]\esProc\classes\config\chartcolor.properties. A color scheme format is color scheme name=[color1,color2,….]:

 

Set colourful8 as the color scheme for the column graph:

 

Note:

To use the color schemes in plotting a graph, make sure that the class path can be loaded onto the config directory. esProc default design is that the config directory is already put into [installation directory]\esProc\classes. To view the effects of color schemes on server side, users need to create a config folder in the service’s [applicaton root directory]\WEB-INF\classes unless there’s already a config folder there and copy the color scheme file chartcolor.properties under it.

Related function:

f.read()

f.write()