Page 1 of 1

Solutionmodel Copy facilities

PostPosted: Thu Jul 09, 2009 12:08 pm
by martinh
Please add Copy facilities to the solutionmodel.

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

Re: Solutionmodel Copy facilities

PostPosted: Thu Jul 09, 2009 12:11 pm
by ROCLASI
Hi Martin,

Did you file this request also in the support system ?
Only this way Servoy can track all request and bug reports.

Re: Solutionmodel Copy facilities

PostPosted: Thu Jul 09, 2009 12:12 pm
by martinh
ROCLASI wrote:Hi Martin,

Did you file this request also in the support system ?
Only this way Servoy can track all request and bug reports.


Yes I just did. Request #225052