Package com.tonbeller.wcf.ui

Provides an API to create and manipulate a DOM tree that conforms to the xoplon DTD.

See:
          Description

Class Summary
Button Button ctrl class, used as factory for generating buttons
CheckBox  
CheckBoxes Deprecated. - does this make sense?
EditCtrl has a value, type and format string.
FileUploadCtrl  
Form Form ctrl class, used as factory for generating buttons
ImgButton Button ctrl class, used as factory for generating buttons
Item base class factory for ListItem, RadioButton, CheckBox
Label Label ctrl class, used as factory for generating labels
ListBox1 single selection listbox
ListBoxN single selection listbox
ListItem factory for listbox item
Password factory for generating password ctrls
RadioButton  
RadioButtons Deprecated. - does this make sense?
Select A Select (ListBox, RadioButtons, etc) may have a type and modelReference.
SelectMultiple Created on 07.11.2002
SelectSingle  
TextArea Factory class for generating text area ctrls, provides also access to the text area's special attributes
TextField Factory class for generating text ctrls
TypedCtrl A DOM element with attributes describing a data type.
XoplonCtrl Base class for all Xoplon controls.
 

Package com.tonbeller.wcf.ui Description

Provides an API to create and manipulate a DOM tree that conforms to the xoplon DTD.


Xoplon supports a set of controls like text input, button, listbox etc. which can be used for creating user interfaces by instantiating controls per API functions or by configuring UIs using an XML configuration file. The Xoplon controls are converted to HTML Controls using the xoplon.xsl stylesheet. Formatting and validation of Xoplon controls content are automized using the com.tonbeller.xoplon.format validator classes.

Supported controls

Xoplon supports now the following controls:

Simple Xoplon controls, access via configuration file and API
Xoplon Control Meaning HTML equivalent
textField text input field input, type=text
password password input input, type=password
textArea text input ctrl, multiple rows textarea
listBox listbox supporting single or multiple selection select
listItem listbox item option
checkBoxes container for check boxes n/a
checkBox checkbox input, type=checkbox
radioButtons container for radio buttons n/a
radioButton radio button input, type=radio
button button input, type=submit

Supported data types

Xoplon supports the following simple data types for text controls:

Xoplon implements formatters and parsers for the descriped types which automize formatting and validation of user input. See packages com.tonbeller.xoplon.format and com.tonbeller.xoplon.convert.

Configuring Xoplon Controls via configuration file

Xoplon Controls can be configured using an XML configuration file:

<!-- Text control -->
<textField type="string" label="Text:" value="hello world"/>
<textField type="int"    label="Integer:" value="123"/>
<textField type="double" label="Double:"  value="1,23"/>
<!-- Password control -->
<password type="string" label="Password:" value=""/>

The type attribute specifies the data type used for formatting and validation, see above "Supported data types".

Accessing Controls via API

As an alternative to configuring Xoplon controls, they can be instantiated programmatically by using the control's static factory functions. Attributes like label, value etc. can be accessed/changed using the appropriate static getters/setters.

Document factory;
Formatter formatter; // see package com.tonbeller.xoplon.format for this one

TextField textField1 = TextField.createTextField(factory, TextField.STRING_TYPE);
TextField.setLabel(textField1, "Text:");
TextField.setValue(formatter, textField1, "hello world");

TextField textField2 = TextField.createTextField(factory, TextField.INT_TYPE);
TextField.setLabel(textField2, "Integer:");
TextField.setValue(formatter, textField2, new Integer(123));

etc.

The formatter for the setValue function supports type conform, locale specific and format string specific formatting/parsing of the value. See package com.tonbeller.xoplon.format.