Fixed
Details
Assignee
Antranig BasmanAntranig BasmanReporter
Antranig BasmanAntranig BasmanComponents
Affects versions
Priority
Major
Details
Details
Assignee
Antranig Basman
Antranig BasmanReporter
Antranig Basman
Antranig BasmanComponents
Affects versions
Priority
Created February 21, 2017 at 2:56 PM
Updated July 22, 2024 at 2:35 PM
Resolved February 21, 2017 at 8:04 PM
As a result of various implementational drifts and "cute" implementational choices, it is not possible to bind to the DOM binder's function's via IoC references. For example, a reference of the form
{that}.hostComponent.dom.fastLocate
does not resolve to the DOM binder'sfastLocate
method, but foolishly returns a zero-element jQuery.This is the result of two architectural trainwrecks co-occurring - firstly, the implementation for https://issues.fluidproject.org/browse/FLUID-5821 fixed the contract in this case in the wrong way. In fact, asking for a selector which has not been configured at all should return no kind of jQuery but simply
undefined
.Secondly, we "cutely" subvert the IoC resolution machinery to allow expressions of the kind
{that}.dom.selectorName
to resolve onto the fetched jQuery. Unfortunately the "fallback" mechanism, implemented via theresolvePathSegment
hack at https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/FluidView.js#L212 could only proceed to try concrete resolution in the case the return value isundefined
. The faulty return of the zero-element jQuery would block the search for a further scheme for value resolution. Unfortunately, as the final element of the wreck, the "fallback" resolution withinfluid.get
which used to appear at https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/Fluid.js#L968 has been removed. The mere presence of aresolvePathSegment
method will block resolution of a concrete member.The cleanest way out of this difficulty would be to move the "real" DOM binder to an unrelated path, e.g. at
{that}.domBinder
, and then leave{that}.dom
as a plain {} with simply theresolvePathSegment
method.