FAST WebComponents |
|
Component: ValueField |
OverView | | | Protocol | | | WebComponents | | | ChartEngine | | | Mobile | | | Press | |
|
This is an example of the ValueField FAST-WebComponent. It displays one Field of a RIC in realtime and optionaly (if available) an up/down tick in either text (+/-) or Graphics form. Use the following code snippet to use it in a Webpage.
<APPLET name="ValueField" archive="Core.zip,Jep.zip" code="at.RISNet.FAST.WebComponents.ValueField.class" codebase="http://ActiveFast.RISNet.at/Fast" width="100" height= "20"> <PARAM NAME="UpdateURL" VALUE="ActiveFAST.asp"> <PARAM NAME="UpdateInterval" VALUE="10"> <PARAM NAME="Background" VALUE="8080FF"> <PARAM NAME="Foreground" VALUE="FFFFFF"> <PARAM NAME="Font" VALUE="Arial"> <PARAM NAME="FontSize" VALUE="12"> <PARAM NAME="FontType" VALUE="BOLD"> <PARAM NAME="Align" VALUE="RIGHT"> <PARAM NAME="UpDownPosition" VALUE="LEFT"> <PARAM NAME="UpImageURL" VALUE="up.gif"> <PARAM NAME="DownImageURL" VALUE="down.gif"> <PARAM NAME="NullImageURL" VALUE="null.gif"> <PARAM NAME="EqualImageURL" VALUE="eq.gif"> <PARAM NAME="RIC" VALUE=".ATX"> <PARAM NAME="ValueFID" VALUE="TRDPRC_1"> <PARAM NAME="UpDownFID" VALUE="PRCTCK_1"> <PARAM NAME="ChangeIndicator" VALUE="YES"> <PARAM NAME="onClick" VALUE="http://www.RISNet.at"> <PARAM NAME="onClickTarget" VALUE="_blank"> <PARAM NAME="Info" VALUE="Austrian Index"> <PARAM NAME="LicenseKey" VALUE="Ddj34R-er81fC-Mer15L-oHCx3Q-TR45I2"> <PARAM NAME="Debug" VALUE="YES"> </APPLET>
The applet can operate in 2 modes: TICK and POLL. In TICK mode a connection to the ActiveFAST server is established and remains open. Every change in either the "ValueFID" or the "UpDownFID" is immediately displayed on screen. In the moment every ActiveFAST WebComponent uses it's own connection to the ActiveFAST server. When there are a lot of WebComponents on a page this can become very inefficient. There will be a multiplexer applet available in the near future, but for the moment dont use a lot of WebComponents in TICK mode on onw page. The PULL mode as the name says pulls new data from the Server in predefined intervals (see the UpdateInterval parameter). This mode is very efective because the connection is closed during the pull cycles. The operation of the component is specified by the two parameters Port and UpdateURL. If Port is specified then the component uses TICK mode, if UpdateURL is specified then PULL mode is used. If no one is specified then TICK mode is used. In the case that both are specified then PULL mode is used. Keep in mind that an applet can only (under normal circumstances) communicate with the server from which it was loaded by the browser. So keep your WebComponents on the ActiveFAST server. A detailed description of the various parameters follows:
Parameter | Description | Default | Example |
---|---|---|---|
Communications | |||
Port | port on fast server to connect this client to (for TICK operation) | 18919 | eg. 18919 |
UpdateURL *1) | URL where to look for new data (for Pull operation). | - | eg. ActiveFAST.asp |
UpdateInterval | number of seconds to wait between updates (only used in Pull operation) | 10 | eg. 10 |
Colors | |||
Background | Background color of this applet in hex form | C0C0C0 | eg. FFFFFF |
Foreground | Foreground color of this applet in hex form | 000000 | eg. 8080FF |
InfoBackground | Background color of the info area in hex form | value of Background | eg. FFFFFF |
InfoForeground | Foreground color of the info area in hex form | value of Foreground | eg. 8080FF |
ValueBackground | Background color of the value area in hex form | value of Background | eg. FFFFFF |
ValueForeground | Foreground color of the value area in hex form | value of Foreground | eg. 8080FF |
DiffBackground | Background color of the diff area in hex form | value of Background | eg. FFFFFF |
DiffForeground | Foreground color of the diff area in hex form | value of Foreground | eg. 8080FF |
Font | |||
Font | Name of Font to use | Arial | eg. Courier |
FontSize | Font size | 10 | eg. 12 |
FontType | Font Type | PLAIN | PLAIN, BOLD, ITALIC |
Align | Align Text | RIGHT | RIGHT, CENTER, LEFT |
Ric | |||
RIC | RIC (Reuters Instrument Code) to fetch. | .ATX | eg. ATX |
ValueFID | Reuters Value field to display (FID). It is possible
to specify more than one FID here separated by spaces. This can be used in combination with the grouping functions in group. For example: to calculate the average value for a money RIC you specify "BID ASK" for ValueFID and AVG for group. |
TRDPRC_1 | eg. TRDPRC_1 |
Info | Shows an infotext on the left side of the applet. If it starts with an '@' the rest of the field is interpreted as the name of a RIC field and the value of this field is displayed as the info. eg. @DSPLY_NAME shows the Reuters name for this RIC | - | eg. Austrian Index |
Up/Down | |||
UpDownFID | Up/Down tick field to display | - | eg. PRCTCK_1 |
UpDownPosition | Specify where to position the Up/Down indicator (if any) | LEFT | RIGHT, LEFT |
UpImageURL *1) | URL of the Up symbol graphic (GIF,JPG) | - | eg. up.gif |
DownImageURL *1) | URL of the Up symbol graphic (GIF,JPG) | - | eg. down.gif |
EqualImageURL *1) | URL of the Equal symbol graphic (GIF,JPG) | - | eg. eq.gif |
NullImageURL *1) | URL of the Null symbol graphic, normaly a blank image (GIF,JPG) | - | eg. null.gif |
ImagePaint | Specifies how to paint the images. NONE - paints the image as it is, CENTER - tries to center the image and FIT - paints the image to fit inside the applet | CENTER | NONE, CENTER, FIT |
UpDown2Diff | If the diff area and the up/down indicator are visible then it could be possible that they dont correspond. This means for example that reuters delivers a down tick but the difference is positive. To solve this UpDown2Diff should be YES so that the up/down is not taken from reuters but from the difference. | YES | YES, NO |
Null value handling | |||
NullHandling | activates explicit handling of 0 values | NO | YES, NO |
NullInfo | Shows an text on if the value of the ValueFID is 0. If it starts with an '@' the rest of the field is interpreted as the name of a RIC field and the value of this field is displayed as the info. eg. @HST_CLOSE shows the last historic close if the field value is 0 | - | eg. @HST_CLOSE |
NullDiff | Shows an text if the DiffPanel if the value of the ValueFID is 0. | - | eg. CLS |
NullBackground | Background color of this applet in hex form | C0C0C0 | eg. FFFFFF |
NullForeground | Foreground color of this applet in hex form | 8F8F8F | eg. 8080FF |
NullInfoBackground | Background color of the info area in hex form | value of NullBackground | eg. FFFFFF |
NullInfoForeground | Foreground color of the info area in hex form | value of NullForeground | eg. 8080FF |
NullValueBackground | Background color of the value area in hex form | value of NullBackground | eg. FFFFFF |
NullValueForeground | Foreground color of the value area in hex form | value of NullForeground | eg. 8080FF |
NullDiffBackground | Background color of the diff area in hex form | value of NullBackground | eg. FFFFFF |
NullDiffForeground | Foreground color of the diff area in hex form | value of NullForeground | eg. 8080FF |
Diff | |||
ChangeType | If not NONE the difference to the previous field contents is displayed either as percentage (PCT) or as absolute value (ABS) | NONE | NONE, PCT, ABS |
ChangeTypeFID | If specified and ChangeIndicator is also set then the difference is calculated against the Reuters RIC field specified. | - | eg. HST_CLOSE |
DiffTemplate | Defines the width of the diff area in form of a mask | -99,99 | eg. -9.999,9999 |
DiffDecimals | How many decimal places should be displayed in the diff area | 2 | eg. 4 |
Change Indicator | |||
ChangeIndicator | Flashes the Background of the Applet in the color set by IndicatorColor when the Applets contens changes. The default period is 250ms. This can be changed if you specify the time in ms for how long the Background color should be changed. YES=250ms, NO=0ms or any other time in milliseconds. | YES | YES, NO, time in ms |
IndicatorColor | Color for ChangeIndicator in hex form | FF0000 | eg. F80AF0 |
Click Actions | |||
onClick | URL to jump to when the field is clicked | - | eg. http://www.RISNet.at |
onClickTarget | Target for the onClick URL | - | _self, _parent, _top, _blank or name |
License | |||
LicenseKey | to be obtained from RISNet (support@RISNet.at) | - |
eg. Ddj34R-er81fC-Mer15L-oHCx3Q-TR45I2 |
Math | |||
Expression | Provides a way to do mathematical
calculations with the data received from ActiveFAST. The expression is
evaluated AFTER the BasicMath functions. All BasicMath
functions can be replaced with expresions so they will be removed in
further versions. They are only available for compatibility in the moment.
Variable usage is possible within expressions. Some special variables
are available in expressions like PI or E and FAST_Value which is the
result of the BasicMath functions. ActiveFAST fields in the ValueFID
parameter are prefixed with FAST__ (2x underscore). Functions available are: SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH, TANH, ASINH, ACOSH, ATANH, LN, LOG, ANGLE, RE, IM, ABS Operators available: +, -, ^, /, *, !=, ==, <=, >=, <, >, !, ||, && Boolean expressions are evaluated to be either 1 or 0 (true or false respectively). Decimal point is '.' |
- | eg. FAST_Value+1,08
or (FAST_Bid+FAST_Ask)/2 |
Decimals | Specifies how many decimal places should be shown in the output (if it is numeric). The value is rounded to fit into decimals places. | 4 | eg. 2 |
Misc | |||
shr | shifts the fields contents to the right by n characters | 0 | eg. 2 |
Obsolete | |||
group *) | groups the values from the fields specified
in ValueFID in various ways. In the moment only AVG (average) and SUM (summary) are available. |
- | eg. AVG, SUM |
div100 *) |
if the fields contents is numeric setting this switch to 1 divides the contents by 100 |
0 | eg. 1 |
mul100 *) | the same as div100 but multiplies with 100 | 0 | eg. 1 |
Debugging | |||
Debug | Shows some debug informations in the Java Console (internal use only) | NO | YES, NO |
ATX | GDAXI | DJI | |||
FTSE | SSMI | N225 |
This is a PULL example (same as above and 10 seconds update interval)
ATX | GDAXI | DJI | |||
FTSE | SSMI | N225 |
(C) Copyright RIS-Regionale Informations Systeme GmbH, Prof. Dr. Stefan Koren Str. 10, A-2700 Wr. Neustadt, AUSTRIA, EUROPE & Richard.Prinz@RISNet.at