I am trying to add a onAction() method to a label created via the solution model. When I try to set the style (of a JSLabel) I get the error
"Stale form(s) detected, form(s) were altered by the solution model without destroying them first
The form(s) that are stale (can also be a parent form if form inheritance is used) are:"
Here is my code.
- Code: Select all
jsLabel = jsform.newLabel(row[0], (2 + ((index-1) * 122)), 10, 120, 20);
jsLabel.styleClass = 'tab_inactive';
jsLabel.showClick = false;
if ( sLastForm != row[1] ) {
// Get the new method definition
jsFunction = jsform.newMethod('function onActionTab' +index+'() {
forms.frm_navigation_bar.jsLabel.styleClass = "tab_active"; }');
// remember which form we last processed
sLastForm = row[1];
}
The moment this function runs I get the above error. Any ideas?
Regards,
Hareendra