dinsdag 27 september 2011

Global::allowEditFieldsOnFormDS_W

Set allowEdit property on every field in a form DataSource.

client static public void allowEditFieldsOnFormDS_W(FormDataSource _dataSource, boolean _allowEdit)
{
    DictTable       dictTable = new DictTable(_dataSource.table());
    DictField       dictField;
    FormDataObject  dataObject;
    int         cx, idx;

    for(cx = 1; cx <= dictTable.fieldCnt(); cx ++)
    {
        dictField = dictTable.fieldObject(dictTable.fieldCnt2Id(cx));

        if(! dictField.isSystem())
        {
            for(idx = 1; idx <= dictField.arraySize(); idx++)
            {
                dataObject = _dataSource.object(fieldId2Ext(dictField.id(), idx));
                if (dataObject)
                {
                    dataObject.allowEdit(_allowEdit);
                }
            }
        }
    }
}

Geen opmerkingen:

Een reactie posten