Solutionmodel Copy facilities
Posted: Thu Jul 09, 2009 12:08 pm
Please add Copy facilities to the solutionmodel.
For example:
This method SolutionModel.copyField() should copy all properties of the source JSField into the destination JSField and it returns a JSField with these copied properties.
The only properties that should not be copied are the properties that are set using the newField() method.
This is very useful when you want to remove a field from a certain form and replace somewhere else. Specially because moving fields in TableView is not working.
In this case, I can keep the original properties.
Remove the field
Add the field on a different position
And with the copy funtion I have the same properties as I designed
This request is not only for fields, but also for labels, buttons etc
For example:
- Code: Select all
var OldJSField = myJSForm.getField('myField')
var JSField = myJSForm.newField('quantity',SM_DISPLAYTYPE.TEXT_FIELD, 400, 170, 70, 20)
JSField = SolutionModel.copyField(OldJSField , JSField)
This method SolutionModel.copyField() should copy all properties of the source JSField into the destination JSField and it returns a JSField with these copied properties.
The only properties that should not be copied are the properties that are set using the newField() method.
This is very useful when you want to remove a field from a certain form and replace somewhere else. Specially because moving fields in TableView is not working.
In this case, I can keep the original properties.
Remove the field
Add the field on a different position
And with the copy funtion I have the same properties as I designed
This request is not only for fields, but also for labels, buttons etc