Consultor Eletrônico



Kbase 17571: Displaying DB Field As Text Area With Embedded SpeedScript
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/22/2005
Status: Unverified

FACT(s) (Environment):

WebSpeed 2.x
WebSpeed 3.x

FIX:

Create a web object with the detail wizard.
The following example was created for the customer table of
the Sports database. It displays and updates customer number,
name and comments.

NOTE: If you run the Web object without any modification, note that
the comments information is cut off because the text input field is not large enough to display all of the data stored in the database field.

In WebSpeed Version 2.x:

1) Open the object file in the Workshop, and remove the following
lines:

<td><input type="text" name="Customer.Comments"
value="`html-encode(Customer.Comments:SCREEN-VALUE
IN FRAME DetailFrame)`"></td>

2) Add the following lines in their place:

<td><textarea name="Customer.Comments" rows="5" cols="20">
`html-encode(Customer.Comments:SCREEN-VALUE
IN FRAME DetailFrame)`</textarea></td>

In WebSpeed Version 3.x:

1) Open the object file in the Workshop, and remove the following
lines:

<input text="submit" name="`columnHTMLName('Customer.Comments')`"
value="`html-encode(columnStringValue('Customer.Comments'))`"
`IF columnReadOnly('Customer.Comments') THEN ' disabled ' ELSE ''`
onmouseover="window.status='`html-encode(columnHelp('Customer.Comments'))`';return true" onmouseout="window.status='';return true">

2) Add the following lines in their place:

<textarea name="`columnHTMLName('Customer.Comments')`" rows="5" cols="20">`html-encode(columnStringValue('Customer.Comments'))`
`IF columnReadOnly('Customer.Comments') THEN ' disabled ' ELSE ''`
</textarea>

(Using IN Frame applies only to WebSpeed Version 2.x,
ColumnstringValue Function is required for Version 3.x.)

When it is run, this web object now displays comments as a text area
(editor) that has scrollbars, and in which you can read and type multiple lines of information.