Michal Stochmialek wrote:
hello,
Two binding codes:
[1] <fb:value id="manager-firstname" path="manager/firstname"/> <fb:value id="manager-name" path="manager/name"/> <fb:value id="manager-title" path="manager/title/nameEn"/>
[2] <fb:context path="manager"> <fb:value id="manager-firstname" path="firstname"/> <fb:value id="manager-name" path="name"/> <fb:value id="manager-title" path="title/nameEn"/> </fb:context>
At first sight two above codes are semanticly the same, but they're at fact different! The problem appeared when I was reloading form, when model externaly was changed.
0) manager and its propeties are set to not-null values 1) (first load) all three (manager-*) widgets are set to some strings 2) model is externaly changed, manager reference is set to null 3) (second load) (here above codes behave different) code [1]: all value of manager-* are set to null code [2]: any value of manager-* widget isn't changed
This looks like a bug... or am I missing something?
Mmmh... What happens here is that in [1], the path corresponding to each of the widgets doesn't exist and therefore their values are set to null, whereas in [2] the children of <fb:context> are not executed because the context path does not exist.
I don't know if that can really be considered as a bug, as a form is normally intended to be loaded only once. Why do you reload it? Can't you use a new fresh form instance?
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }