CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

JQImage how to make image dynamically visible

by JohnFSklavounos » 08 Nov 2014 23:43

Hi Guys,

I've been trying to make a JQImage dynamically visible with no success and could use some help. The image is in a JQRegion - the attributes are set as follows:

JQImage
Enabled := true;
LoadHidden := true;
RenderInvisibleControls := true;
StyleRenderOptions includes RenderVisibility
Visible := false;

JQRegion
Enabled := true;
LoadHidden := true;
RenderInvisibleControls := true;
StyleRenderOptions includes RenderVisibility
Visible := true;

Try #1
JQImage.Visible := true;
JQImage.AjaxReRender();

Try #2
JQImage.Visible := true;
RenderRegionAsync(JQRegion, False, True);

Try #3
JQImage.Visible := true;
JQImage.AjaxReRender();
RenderRegionAsync(JQRegion, False, True);

I've been trying several different ways but to no avail... Any ideas?

Thanks!
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

by Alexander Bulei » 10 Nov 2014 13:04

Hi JohnFSklavounos,

've been trying to make a JQImage dynamically visible


I think, you mean async...
But you dont need to use the AjaxReRender/RenderRegionAsync.

Just do this:

delphi code
JQImage.Visible := True;


I tested here with your settings and works as expected.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by JohnFSklavounos » 10 Nov 2014 17:04

Wow, I see what you mean... I tried it out with code from an even in the same region and that's exaclty how it worked. I now realize that I didn't give enough information about my difficulty.

The code that determines the visibility of the JQImage runs in an async event from another region - that's why I was running the AjaxReRender for the image and RenderRegionAsync code for the region. I have several regions on this form and didn't want to have to referesh the whole thing.

Thanks! :)
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

by bob9999 » 25 Apr 2019 15:38

I am having an issue getting the image to async update. I load the image on file when the form loads and then I can update the picture.url to point to a new picture. IWCGJQImage1.Picture.Url := 'image_users\' + inttostr(UserSession.iOperatorID) + '-<filename>.jpg';

The issue is that the image never updates on the scree for the user to show the change. This is the same issue I was having with IWimage component and during sales cycle with CG I was told this component has this feature but darned if I can figure out how this works.

I tried the AjaxReRender() that I use for other components but I receive an error saying that I am not allowed.

How do I get the image to update its the picture displayed to the user?

Cheers!
bob9999
 
Posts: 110
Joined: 18 Jan 2019 17:32

by bob9999 » 14 Dec 2019 05:47

Just to finish this thread the only way I could get the image to refresh is to have in a region and then ajax rerender that and then the image will update. Cheers!
bob9999
 
Posts: 110
Joined: 18 Jan 2019 17:32


Return to JQImage

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.