Objective Html - Class Hierarchy

Author Keith Wong, keithwong@optushome.com.au

Last updated: 19th Jan 2002

Overview Of Objective Html

This documentation below is a brief overview of what the classes in the toolkit and the object hierarchy it uses to represent a html form and the elements of a html form.

Class Hierarchy

  OMSObject
	|
	|
	+-- HtmlRadioButtonGroup
	|
	|
	+-- HtmlElement
		|
		|
		+-- HtmlOptionItem
		|
		|
		+-- HtmlTableCaption
		|
		|
		+-- HtmlWidget
			|
			|
			+-- HtmlControlWidget
			|	|
			|	|
			|	+-- HtmlInput
			|	|	|
			|	|	|
			|	|	+-- HtmlCheckBox
			|	|	|
			|	|	|
			|	|	+-- HtmlFileInput
			|	|	|
			|	|	|
			|	|	+-- HtmlHiddenInput
			|	|	|
			|	|	|
			|	|	+-- HtmlPushButton
			|	|	|
			|	|	|
			|	|	+-- HtmlRadioButton
			|	|	|
			|	|	|
			|	|	+-- HtmlTextBox
			|	|
			|	|
			|	+-- HtmlListBox
			|	|
			|	|
			|	+-- HtmlTextArea
			|
			|
			+-- HtmlContainerWidget
			|	|
			|	|
			|	+-- HtmlUnrestrictedContainerWidget
			|	|	|
			|	|	|
			|	|	+-- HtmlDiv
			|	|	|
			|	|	|
			|	|	+-- HtmlForm
			|	|	|
			|	|	|
			|	|	+-- HtmlParagraph
			|	|	|
			|	|	|
			|	|	+-- HtmlTag
			|	|
			|	|
			|	+-- HtmlTable
			|	|
			|	|
			|	+-- HtmlTableRow
			|	|
			|	|
			|	+-- HtmlTableCell
			|
			|
			+-- HtmlText
				|
				|
				+-- HtmlSpan

Html Attributes

Attributes of the HtmlElements objects can be set by calling the generic methods setAttribute or setBooleanAttribute. The attributes can also be set by calling the specific methods, e.g. setID, setValue, setSize. Calling setValue("hello") has the same effect as calling setAttribute("value", "hello").

HtmlWidget

A HtmlWidget object represents any visual html component that can be displayed inside a HtmlForm object. All html widgets have a parent. The only widget that does not have a parent is the HtmlForm object which is the top-most object. A html widget can be set as either visible or invisible. All visible objects will be drawn when printHtml is called on the HtmlForm object.

HtmlContainerWidget

The HtmlContainerWidget object represents a html component that can contain other html components. Examples are HtmlParagraph, HtmlTable and HtmlForm. Only a HtmlContainerWidget object can be a parent of a HtmlWidget object. Visibility properties of a parent widget are inherited by child widgets. If a parent widget is invisible then all child widgets must also be invisible. The HtmlContainerWidget object provides overloaded versions of the methods setAttribute and setBooleanAttribute. These overloaded versions allow users to set attributes to itself and also to all the children of a HtmlContainerWidget object. The HtmlUnrestrictedContainerWidget class extends the HtmlContainerWidget class and differs in the methods that are exposed to the user. HtmlUnrestrictedContainerWidget object as the name suggests is less restricted.

HtmlControlWidget

The HtmlControlWidget object represents a html component that accepts user data and allows user interaction. Examples are HtmlTextBox, HtmlListBox and HtmlCheckBox. If auto-escape is turned on (default) for a control widget than all data will be escaped (using HtmlUtils.htmlSpecialChars) before being written out to the client. If auto-update is turned on (default) for a control widget then when updateData is called it will update the object with the submitted user data. All HtmlControlWidget objects must have a unique name. This name will be the name used when written out to the client. The only object that does not need to have a unique name is the HtmlRadioButton object. HtmlRadioButton objects that have the same name are grouped together.

HtmlForm

The HtmlForm object is the top-most object in the toolkit. All applications that use this toolkit must have a HtmlForm. The class represents a html form and only one and only one HtmlForm object can exist for every html form. The updateData method will go through all HtmlControlWidget objects that are contained in this form and call updateData on them.

SourceForge Logo