Back Previous Next


Linguist servlet package - set

Syntax:

	set the title to {value} ->
	set the head to [file] {value} ->
	set the background color/colour to {color} ->
	set the text color/colour to {color} ->
	set the text of {element} to {text} ->
	set the font of {element} to {font} ->
	set the icon of {element} to {icon} ->
	set the color/colour [of {element}] to {color} ->
	set the style of {element} to plain/bold/italic ->
	set the alignment of {element} to left/right/center/centre ->
	set the border of {element} to {value} ->
	set the width of {element} to {value} [percent] ->
	set the height of {element} to {height} ->
	set the valign of {element} to top/middle/bottom ->
	set the target of {element} to {url} ->
	set the action of {element} to {text} ->
	set the method of {element} to get/post ->
	set the type of {element} to table/row/image/text... ->
	set the value of {element} to {text} ->
	set the name of {element} to {text} ->
	set the brackets of {template} to {left} {right} ->
	set the source of {template} to {source} ->
	set parameter {name} of {template} to {value} ->
	set parameters of {template} to {table} ->
	set option {name} of {template} to {value} ->
	set the value of {cookie} to {value} ->
	set the expiry of {cookie} to {value} ->
	set session value {name} to {value} ->

Keyword handler:

   net.eclecity.linguist.media.keyword.ServletKSet.class

Runtime handler(s):

   net.eclecity.linguist.media.handler.ServletHSet.class

Function:

Sets the value or attributes of something.

set the title to {value} defines a title to appear in the browser title bar.

set the head to [file] {value} sets the content of the HTML page head, i.e. everything between <HEAD> and </HEAD>.

set the background color/colour to {color} sets the background color that will be displayed behind the returned page.

set the text color/colour to {color} sets the default text color for the page.

set the type of {element} to table/row/image/text... sets the type of an element. to table, row, cell, text, image etc.

set the text of {element} to {text} sets the text of an element.

set the font of {element} to {font} sets the font of an element. The value given is the name of any font, but be aware that the final user may not have that font installed in their system.

set the icon of {element} to {icon} sets the icon of an element. In the case the element must have been declared to be of type image.

set the color/colour [of {element}] to {color} sets the color of an element. Colors are declared in the form color {red} {green} {blue} where each of the three color components is a number ranging from 0 through 255.

set the style of {element} to plain/bold/italic sets the text style of an element. Styles - apart from plain - can be combined.

set the alignment of {element} to left/right/center/centre sets the alignment of an element.

set the border of {element} to {value} sets the border thickness of an element.

set the width of {element} to {value} [percent] sets the width of an element. The element in this case will be of type cell or table.

set the height of {element} to {height} sets the height of an element. The element in this case will be of type cell or table.

set the valign of {element} to top/middle/bottom sets the vertical alignment of text in an element.

set the target of {element} to {url} sets the target of an element. This is the hyperlink; the URL that will be invoked when the item is clicked.

set the action of {element} to {text} sets the action of a form element.

set the method of {element} to get/post sets the method of a form element.

set the value of {element} to {text} sets the value of a form element.

set the name of {element} to {text} sets the name of a form element.

set the brackets of {template} to {left} {right} defines a pair of characters or character strings that will be used to enclose replacement parameters in HTML template files. A pair should be choen such that the resulting strings are unlikely to occur in normal HTML.

set the source of {template} to {source} defines the HTML template file to be used with a given template variable

set parameter {name} of {template} to {value} sets the value of a named parameter in the template. The name should be given without the brackets (see above). This variant also allows you to set the value of a SELECT tag, i.e. a drop-down list. To do this, use a hashtable and fill it with name/value pairs where both the name and the value are the items in the list. Then pass the hashtable to this command as {value}.

set parameters of {template} to {table} sets all the parameters of a template to the values found in a hashtable.

set option {name} of {template} to {value} sets the selected item in an option list. Here, name is the name of the list and value the value to be selected.

set the value of {cookie} to {value} defines the value to be put into the named cookie.

set the expiry of {cookie} to {value} defines the expiry time (maximum age) of the named cookie in seconds. A negatve value indicates the default, that the cookie should expire when the browser exits. A zero value tells the browser to to delete the cookie immediately.

set session value {name} to {value} defines the value of a named session variable.

Example(s):

   set the title to "My Home Page"
   set the background color to color 255 255 240
   set the text color to color 0 0 128
   set the icon of DeleteButton to "gif/delete.gif"
   set the color of Text to color 233 0 16
   set the style of Text to italic bold
   set the alignment of Text to center
   set the border of Cell to 4
   set the width of Cell to 15 percent
   set the width of Cell to 24
   set the height of Cell to 120
   set the valign of Cell to bottom
   set the target of Text to "http://www.somewhere.com/document.html"
   set the action of Button to "OK"
   set the method of Button to post
   set the type of Cell to cell
   set the value of Button to "Hit Me"
   set the name of Button to "Default"
   set session value "Name" to "Ivan the Terrible"


Back Previous Next