Textbox

From UG

(Difference between revisions)
Jump to: navigation, search
Line 56: Line 56:
{| {{table}} border="1"  
{| {{table}} border="1"  
-
| '''Value:'''
+
| '''Attribute:''' || '''Value:'''
|-
|-
| type/format:  || text
| type/format:  || text
Line 71: Line 71:
-
== Other Attributes ==
 
-
=== value ===
 
-
Sets the text value.
 
-
=== rows ===
+
== Links ==
-
Sets the rows. We consider row=1 for textbox. If not we call it [[Texarea]].
+
-
=== type ===
+
* http://en.wikipedia.org/wiki/Text_box
-
Values : text | password
+
-
 
+
-
=== constraint ===
+
-
Any.
+
-
 
+
-
=== width ===
+
-
Example:  width="50px"
+
-
 
+
-
=== readonly ===
+
-
Values : true|false
+
-
 
+
-
== Template for spec ==
+
-
 
+
-
{| {{table}} border="1"
+
-
| align="center" style="background:#f0f0f0;"|'''UI Control attribute:'''
+
-
| align="center" style="background:#f0f0f0;"|'''Value:'''
+
-
|-
+
-
| rows:      || 1
+
-
|-
+
-
| data type:  || text
+
-
|-
+
-
| width:      || tbd
+
-
|-
+
-
| maxlength  || tbd
+
-
|-
+
-
| constraint: || tbd
+
-
|-
+
-
| default:    || blank
+
-
|-
+
-
|}
+
-
 
+
-
== Links ==
+
* [http://docs.zkoss.org/wiki/Developer_reference_The_XUL_Components_Components_Textbox  In zk ref]
* [http://docs.zkoss.org/wiki/Developer_reference_The_XUL_Components_Components_Textbox  In zk ref]

Revision as of 02:46, 21 January 2010


Contents

Intro

Easily most used UI control.

Used to enter text on forms.

Major Attributes

type/format

Type as in "data type".

This encompasses "constraints". Normally system validates these.

Possible values - see Datatypes.

In ZK there are seperate widgets for some datatypes: "intbox", "decimalbox", etc.

This could/should be defined often "before" the UI - this is a property of class of corresponding object.

validation

This relates to how / when we validate type/format.

Possible values:

  • stopOnMax - system will not let user enter more than X chars, it will simply silently stop as if we hit the wall
  • zk validation - typical "real-time" ZK validation - on focus Off bar will appear with "x"
  • on Submit - validate only after user clicked "Submit button". Standard Error pop-up will appear.


width

Defines how wide is a textbox on the screen.

Most of the times it is defined in number of chars (ZK cols attribute). But it could be also defined in pixels (ZK width attribute).

This is actually almost only style / layout issue.


readonly

Values: Y, N.

default

Values:

  • blank
  • constant
  • value that comes from DB or memory

Template for spec

Attribute: Value:
type/format: text
validation: tbd
width: tbd
read-only: tbd
default: blank



Links

Figures

Fig 1

File:Textbox.png

Personal tools