HTML area/Text area not displaying content in solution model

In Servoy 6.1 I am using solution model forms to display alerts and other messages. They normally are fixed length messages so I just create a label in a form ```
var lbl = form.newLabel()

I am now dealing with messages, such as errors while importing records, whose length I cannot know in advance. So I thought of using a text area or a HTML area with scrollbars instead of a label. But both the HTML and the Text area seem to be empty, they don't display anything (while the label displays the same message correctly). This is the code

//array containing error messages
var errArr = new Array(‘error1’,‘error2’,‘error 3’);
//create a text string with the html formatted error messages
var errTxt = errArr.join(’
');
//create a solution model form
var formAlert = solutionModel.newForm(‘Alert’,‘db:/db_test/tb_example’,null,false,500,350);
formAlert.navigator = SM_DEFAULTS.NONE;
//create a form variable to contain the html text
var formVar = formAlert.newVariable(‘errVar’, JSVariable.TEXT);
//create a html area
var htmlArea = formAlert.newHtmlArea(formVar,20,40,460,250);
//add scrollbars if needed
htmlArea.scrollbars = SM_SCROLLBAR.HORIZONTAL_SCROLLBAR_AS_NEEDED | SM_SCROLLBAR.VERTICAL_SCROLLBAR_AS_NEEDED;
formVar = "Check these records for errors
" + errTxt + "

"; var winAlert = application.createWindow('Alert',JSWindow.DIALOG); winAlert.undecorated = true; winAlert.show('Alert'); ```

I am sure there is a very simple explanation, but I don’t see it. Any suggestion?

Mac OS X 10.8
Version: 6.1.0 - build 1418
Java version 1.6.0_33

Hi,

Instead of assigning a value to formvar you should assign a value to formVar.defaultValue and it will work.

Kind regards,

Omar,

you are my rescuer. This works. Still I don’t understand why using ```
.defaultValue


Thanks again and best regards.

Glad I could help 8)