You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Ajax overload:
function TExtObject.Ajax(MethodName : string; Params : array of const; IsEvent
: boolean = false) : TExtFunction;
does not add the Obj parameter to the generated JS code, unless IsEvent is True.
It is useful, at times, to call this method on an instance with a computed
(i.e. not fixed) method name, so I propose that the Obj param is always added:
function TExtObject.Ajax(MethodName : string; Params : array of const; IsEvent
: boolean = false) : TExtFunction;
var
lParams : string;
begin
InJSFunction := false;
Result := TExtFunction(Self);
lParams := IfThen(JSName = '', '', 'Obj=' + JSName);
if IsEvent then begin
lParams := lParams + '&IsEvent=1&Evt=' + MethodName;
MethodName := 'HandleEvent';
end;
AjaxCode(MethodName, lParams, Params);
end;
Note: this version also fixes a glitch in which an extra & (resulting in an
empty param) was being put in the generated code.
Original issue reported on code.google.com by nando.dessena on 11 Aug 2011 at 4:33
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
nando.dessena
on 11 Aug 2011 at 4:33The text was updated successfully, but these errors were encountered: