dWebSpec Dictionary
CONTEXT: descriptors->element




All Details Standard Only Platform Only
Structured Web info and helpTechnologies
 Home Page
 Product Page
 Download Page
 Feedback
Javascript Tree Menu

Results for:

 element 
Prev  Topic  Next

Input elements, specifically form input elements, are the basis of data entry and display for HTML based application. The core of the activities of most dynamic web platforms is the population of these elements with data for display, whereas extracting data when the form is submitted. Meanwhile there are a host of other activities, involving the conversion of string entry to data types, validations and formatting.

Despite the commonalities of purpose, the ways that these activities are conducted vary widely amongst the platforms. What dWebSpec defines is a common representation of these activities, for which we provide translations to target platforms in this dictionary.

For this, there are the definitions of standard elements, data types, validators, and format masks, which could be used in the specification.

The element descriptor captures for each element, the specifications in terms of validations, formatting, conversions, presentation behavior, as well as other details. Despite its provision of such high levels of details, it also allows a bird?s eye view of such specifications by providing the information in concise form.

 ASP.NET  

The tables below provide the correspondence between the standard elements types and those of the ASP.NET platform. These are broken into categories: command, input, output, selection, image, message, component.

Element Type Option ASP.NET Equivalent Category
button   <input type="button"> command
buttonReset   <input type="reset"> command
buttonSubmit   asp:Button command
caption   asp:Label  with specified AssociatedControlID output
checkbox   asp:Checkbox selection
checkboxGroup   asp:CheckboxList selection
file   asp:FileUpload input
hidden   asp:HiddenField input
image   asp:ImageButton image
img   asp:Image image
inputText   asp:TextBox input
link link post asp:HyperLink asp:LinkButton command command
messages (for page) asp:ValidationSummary message
messages (for element) (See validators) message
option   asp:ListItem selection
options   Bindings for options are reflected directly on List controls like - asp:CheckboxList, asp:DropDownList, and asp:ListBox selection
outputText   format i18n asp:Literal asp:Label <%$Resources:ResourceKey%> output
password   asp:TextBox TextMode="Password" input
radio   asp:RadioButton  selection
radioGroup   asp:RadioButtonList  selection
select   asp:DropDownList asp:ListBox selection
textarea   asp:TextBox TextMode ="MultiLine" input
aggregator      
component   asp:GridView asp:FormView component

dWebSpec defines a set of standard input element that could map to server controls. For ASP.NET there are two set of server controls to choose from. These are described below.

ASP.NET - HTML Server Controls - derived from HtmInputControl class

These are based on HTML elements, which when included in ASP.NET files are, by default, treated as text. To make these elements server controls, the attribute runat="server" is all that need to be included.

ASP.NET - Web Server Controls - derived from WebControl class

These are special ASP.NET tags, they require a runat="server" attribute to work. However, these server controls do not map directly to existing HTML elements and may represent more complex elements.

In the table above, and the rest of this documentation, the concentration is on the Web Controls. This is because the HTML Server Controls have less design time support for attaching event, auto post back capability, and also less intuitive and less suitability for dynamic web development.

The element descriptor attributes capture the specifications that could easily be translated to the attributes of ASP.NET component. This is illustrated below. The translation of these attributes could vary for the different element types (input, output, command, and selection).

Example of descriptor specification is shown below.

ELEMENT DESCRIPTORS

id

caption

type

value

component-id

conversion-type

validators

formatter

required

visible

enabled

group-id

spec-scope

depositAmount {bundle.depAmt} inputText {invoice.depositAmount} {bb.depositAmount} float TypeValidator $#######.## true true true payment page

The table below provides some of these translations. For further details follow the link provided for the descriptor attributes.

Element Descriptor Attributes

ASP.NET Component Attribute

Element Types

id

ID

A

caption

The caption for an element is captured with HTML Label for element in the source content. This could be transferred to the caption attribute of the descriptor, mainly for the purpose of externalization, The implementation is achieved by converting the label for in the source content to asp:Label component.

A

type

The element type would determine the ASP.NET component to use for implementation

A

component-id

The server identifier is ID also capture by the element id attribute

A

value

The value binding application depends on the element type. For example, for the inputText, it is applied to the Text attribute. See the attribute description using the link provided.

IOC

conversion-type

This specification provides a contract with the model. The conversion type gives an indication on the type that the input entries must be compatible with, This is reflected in other specifications like validations.

IO

validators

Implemented through an associated validator

I

formatter

It is within the value binding expression that the implementation of the formatting expression would be reflected.

IO

required

The RequiredFieldValidator, is use to implement this specification.

I

visible

Visible

A

enabled

Enabled

A

spec-scope

The default specification is page. The other options like object scope have implication of moving some of the implementations, like the validations, into the model.

group-id

ValidationGroup

A = all, I = input, O = output, C = commands, S = selections except for options, O = selection Option(s)

Other attributes that could be prescribed for an element involve the Passthrough Attributes, these are very important, since these could be entered during the initial page UI design, and must eventually be reflected in the final implementation. Although the handlers are the subjects of the event descriptors, these specifications are reflected on the control attributes as shown in the table below.

Events

Controls

OnClick, OnClientClick

Button ImageButton LinkButton

OnCheckChanged

CheckBox RadioButton

OnTextChanged

TextBox

OnSelectedIndexChanged

DropDownList CheckBoxList RadioButtonList ListBox

Prev Next