Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Validation of RDMLX data types can be added to any <input>, <select> or <textarea> element by adding a data-lstddatatype attribute to it. The attribute value should be a | delimited string starting with the data type followed by extra parameters as required by the data type:

integer|<max

...

length>

float|<max

...

length>

packed|<total

...

digits>|<fraction

...

digits>|<decimal

...

separator>

signed|<total

...

digits>|<fraction

...

digits>|<decimal

...

separator>

dec|<total

...

digits>|<fraction

...

digits>|<decimal

...

separator>

alpha|<keyboard

...

shift>|<max

...

length>

char|<keyboard

...

shift>|<max

...

length>

varchar|<keyboard

...

shift>|<max

...

length>

nchar|<keyboard

...

shift>|<max

...

length>

nvarchar|<keyboard

...

shift>|<max

...

length>

For example, a field defined with the following RDMLX:

     Define Field(#TST_PKD) Type(*PACKED) Length(6) Decimals(2)

...

might use an <input> tag like this:

     <input id="MyWR_TST_PKD" name="TST_PKD" maxlength="6" size="11"

...

             data-lstddatatype="packed|6|2|." type="number" />

...

When you generate a new webroutine or drop a field onto a design, the WAM Editor will automatically set this attribute for you. Standard weblets that create form elements will set this attribute based on the value of their rdmlxDataType property.