Sep 05, 2017, 6:00 PM
TagField does not use InputField and DisplayField
(Running on 4.2)
Hello,
since hours I tried to figure out how the TagField gives mit the correct values. I found a workaround, but for me, it's not clear what is happening here.
Here I create the TagField:
when I do:
To explain the szenario (and why I can't write a reproducing source)
I've a dynamic created form with a GridInside. The TagField runs as component within a ComponentColumn inside the grid and the grids store is feeded with complex structured data.
I'm also confused why there is not InputField Property in the TagField CLASS. With the hack the correct data is shown. So ext.js can do the job, but this can't be the solution.
Hello,
since hours I tried to figure out how the TagField gives mit the correct values. I found a workaround, but for me, it's not clear what is happening here.
Here I create the TagField:
var conf = new EX.TagField.Config()
{
AutoLoadOnValue = true,
Height = 50,
MaxHeight = 150,
DisplayField = "Bez",
ValueField = "Id", // ext.js InputField?
};
_tagField = new EX.TagField(conf)
{
ID = _intnameParent + "$tf$" + _control_config.Intname,
};
and....
_tagField.Listeners.BeforeRender.Fn =
$@"
function(evt,elm)
{{
Debug.Log('=> ' + this.displayField + ' ' + this.inputField);
}}";
Log result: displayField == "text"
inputField == undefined
In my understanding, both fields must be set. when I do:
_tagField.Listeners.BeforeRender.Fn =
$@"
function(evt,elm)
{{
this.displayField = 'Bez';
this.inputField = 'Id';
}}";
It works pretty. So ext.js do the right thing, but Ext.Net feed the wrong data? I'm a little bit confused about this.To explain the szenario (and why I can't write a reproducing source)
I've a dynamic created form with a GridInside. The TagField runs as component within a ComponentColumn inside the grid and the grids store is feeded with complex structured data.
I'm also confused why there is not InputField Property in the TagField CLASS. With the hack the correct data is shown. So ext.js can do the job, but this can't be the solution.
Last edited by rtic; Sep 05, 2017 at 6:09 PM.