Hi,
I've noticed that then DynamicForm contains readonly FileItem field and DynamicForm is bound to ValuesManager that field never show uploaded filename nor download/view icons
From FileItem.js code I can see that DynamicForm must have a primary key defined, shouldn't that primary key value be inferred from ValuesManager instead DynamicForm?
Or it's a documented behavior that each DynamicForm which is bound to ValuesManager must have primaryKey hidden field?
Thanks.
P.S. Title max to 85 is some kind hardware restriction for old mainframe computers or what? :D
I've noticed that then DynamicForm contains readonly FileItem field and DynamicForm is bound to ValuesManager that field never show uploaded filename nor download/view icons
From FileItem.js code I can see that DynamicForm must have a primary key defined, shouldn't that primary key value be inferred from ValuesManager instead DynamicForm?
Or it's a documented behavior that each DynamicForm which is bound to ValuesManager must have primaryKey hidden field?
Thanks.
P.S. Title max to 85 is some kind hardware restriction for old mainframe computers or what? :D
Code:
getViewDownloadHTML : function (value, record) { //if (isc.isA.String(value)) return value; if (record == null) return null; var form = this.form, ds = form.getDataSource(), field = ds ? ds.getField(this.name) : null, filenameField = (ds ? ds.getFilenameField(this.name) : null) || this.name + "_filename", name = record[filenameField], // see if the form has a value for the pk-field pkFields = ds ? ds.getPrimaryKeyFieldNames() : null, missingPkValues = (pkFields == null) ; if (field && !field.filenameSuppressed && (name == null || isc.isAn.emptyString(name))) { return this.emptyCellValue; } if (pkFields) { var values = form.getValues(); for (var i = 0; i < pkFields.length; i++) { var pk = pkFields[i]; if (isc.DynamicForm._getFieldValue(pk, this, values, form, true) == null) { missingPkValues = true; break; } } } if (missingPkValues) { // never show view/download if the record has no PK return this.emptyCellValue; } return "<nobr>" + this._getViewIconSrc() + " " + this._getDownloadIconSrc() + (name ? " " + name : "") + "</nobr>"; },
Comment