CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQButton and SendStream Failure

by jandekkers » 17 May 2014 00:08

Hi

from within TIWCGJQButton this fails with ContentStream already exists.

Code: Select all
procedure TformPortalCensus.IWImageButtonDownLoadCensusCSVJQEventsClick(Sender: TObject; AParams: TStringList);
Var
 MemoryStream : TMemoryStream;
begin
        code for populatestream deleted here
        WebApplication.SendStream(MemoryStream, True, '', MakeCensusFileName(PlanId, LoadedCensusForYear,''));
end;


when this is called from within a TMS Button it works as expected WebApplication.SendStream(MemoryStream, True, '', MakeCensusFileName(PlanId, LoadedCensusForYear,''));

How Can this be fixed ?

Jan
jandekkers
 
Posts: 74
Joined: 09 May 2014 23:05

by Jorge Sousa » 17 May 2014 15:30

Hi

The problem is not the button, is the default event mode.

By default, most of cg events are ajax (async) events.

And in some IW versions, WebApplication.SendStream only works if it's a full post event.

So you have to change OnClick.Ajax=False.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to JQButton & JQButtonSet

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.