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.

 Struts 1.x  

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

Element Type Option Struts Equivalent Category
button   html:button command
buttonReset   html:reset command
buttonSubmit
immediate
html:submit
html:cancel
command
caption     output
checkbox   html:checkbox selection
checkboxGroup   html:multibox selection
file   html:file input
hidden   html:hidden input
image   html:image image
img   html:img image
inputText   h:inputText input
link
link

post
html:text
html:text
command
command
messages   html:message/html:error message
messages   html:messages/html:errors message
option   html:option selection
options   html:options
html:optionsCollection
selection
outputText  
i18n
bean:write
bean:message
output
password   html:password input
radio   html:radio selection
radioGroup     selection
select   html:select selection
textarea   html:textarea input
aggregator      
component   display:table component

The element descriptor attributes capture the specifications that are easily translatable to the attributes of Struts component. This is illustrated below. The translation of these attributes could vary for the different element types (input, output, command, and selection). There are more in depth discussions for each of the attributes, which could read by following the links below.

Example of desriptor specification is shown below.

ELEMENT DESCRIPTORS

id

caption

type

value

component-id

conversion-type

validators

formatter

required

visible

enabled

group-id

spec-scope

depositAmount {invoiceForm.depAmt} inputText {invoiceForm.depositAmount}   float TypeValidator $#######.## true true true payment page

The specifiction would be translated to Struts tag attributes and configuration entries. The table below provides some of these translations. For further details follow the link provided for the descriptor attributes.

Element Descriptor Attributes Struts Equivalent Element Types
id id A
caption bean:message tag surrounded by the HTML Label for tag( Label For already represented in the the source content). this entry would also be replicated in the validation.xml entries for validations implementations for the element. A
type The element type would determine the JSF component to use for implementation A
component-id N/A A
value The binding {object.attribute} is implemented as {formBean.attribute}. The attribute name beome the property attribute of tag. The formBean becomes the name attribute. The later could be left blank, it would be implied from the enclosing form IOC
conversion-type Determines the attribute type of the corresponding binding within the form bean IO
validators Reflected in the validation.xml configuration file. I
formatter The element in the output category have format attribute in their tag representation. Custom programming is employed for the other types.IO
required Reflected in the validation.xml configuration file. I
visible Applied to surrounding segment A
enabled disable (converse) A
spec-scope Leads to the selection of base class for the form bean  
group-id

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.

Prev Next