2010-04-16

Some Syntax for Desing UI Components

Syntax for Field Definition

  • field-spec = label, name, type, options, default, mandatoriness, constraint, visibility, mask
  • field-label = readable text to display
  • field-name = identifier
  • field-spec.type = "auto" | "constant" | "text-input" | "toggle" (boolean) | "radio" (single selectable) | "radio-multi" | "combo" (single selectable) | "combo-multi" | "selection" | ...
  • field-spec.options = list of selectable values surrounded by curly braces({}) and separated by comma(,) | "configurable"
  • field-spec.options.example = {MON, TUE, WEN, THU, FRI, SAT, SUN}
  • field-spec.mandatoriness = "mandatory" | "optional"
  • field-spec.mandatoriness.default = "optional"
  • field-spec.default.default = "N/A" (blank, none selected) | "configurable" (project-wide configurable) | ...
  • field-spec.constraint = free style text or more formally text with regular expressions to describe the constraints or check conditions on the value of the field.
  • field-spec.constraint.example = {length <= 30, length >= 2, check=[0-9A-Z][0-9A-Za-z]+}
  • field-spec.visibility = "visible" | "invisible"
  • field-spec.visibility.default = "visible"
  • field-spec.mask = format string which would be automatically applied to the value user entered. (reference : API documentation for java.text.DecimalFormat, java.text.SimpleDateFormat)
  • field-spec.mask.examples = {"yyyy-MM-dd (EEE)", "#,##0.00"}

Syntax for Configuration Item Definition

  • component-id.fields.field-name.options
  • component-id.fields.field-name.default
  • component-id.fields.field-name.check : regex for field value
  • component-id.fields.field-name.text.max-length
  • component-id.fields.field-name.text.min-length
  • component-id.fields.field-name.text.data-type : "integer" | "positive integer" | "non-negative integer" | "negative integer" | "non-positive integer" | "real number" | "positive real number" | ... | "date-time" | "date" | "time" | "free"
  • component-id.fields.field-name.text.max : for number data-type fields
  • component-id.fields.field-name.text.min : for number data-type fields
  • component-id.fields.field-name.lable

No comments:

Post a Comment