05-17-2021, 01:40 AM
(05-15-2021, 01:26 PM)Alexandre Machado Wrote:Thanks a lot Alex, it is working properly now. You are great.(05-10-2021, 07:12 AM)pgnair Wrote:(05-04-2021, 02:20 AM)Alexandre Machado Wrote: I'll have a look and get back to you.Hi Alex, did you get a chance to look on it please?
Thanks for the test case
Yes, I tested it. There is a bug in TMS code. I have no idea if they will ever fix it, so I'm fixing it myself.
BTW, why do you need this label control? It does nothing that our standard TIWLabel doesn't do already.
Here is how you fix it:
1) Open file IWTMSCtrls.pas
2) Find method TTIWHTMLLabel.RenderHTML
3) Comment out everything except the inherited call to it's ancestor method. Here's how it will be after it:
Code:function TTIWHTMLLabel.RenderHTML(AContext: TIWBaseComponentContext): TIWHTMLTag;
//var
// ajaxcall: string;
begin
// if Assigned(OnAsyncClick) then
// ajaxcall := 'processAjaxEvent(''onClick'', '
// + HTMLControlImplementation.IWCLName
// + ',''' + HTMLName + '.' + 'DoOnAsyncClick' + ''','
// + 'true' + ', null, '
// + 'true' + ');';
Result := inherited RenderHTML(AContext);
// Result.AddStringParam('onclick', ajaxcall);
end;
I'll add this to our (now long) list of fixes to TMS controls I did myself.
Build your application and run it. It will then work as expected.
Cheers