VL-Web image in a list

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

VL-Web image in a list

Post by atostaine »

Is it possible to show images in a list where the image is on a server? For instance an image may be at http://myserver:82/tmp/1020581081.jpg

If not, any tips on what I should be doing to show the users multiple images.

Thanks, Art
Art Tostaine
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: VL-Web image in a list

Post by caseywhite »

Art. After you add the entry just do the following:

#ListColumn1.CurrentItem.ImageFileName := 'http://myserver:82/tmp/1020581081.jpg'

If the image is on the same server then you don't need the http://myserver:82
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: VL-Web image in a list

Post by atostaine »

Thanks Casey. I had tried image but not ImageFileName.

Fun story. In order to get images for an invoice, I have to post a URL to a website, receive and parse an XML that gives me the file names, then copy those files from the imaging server to the web server so that I can serve them. Oh and probably clean them up too.

Art
Art Tostaine
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: VL-Web image in a list

Post by atostaine »

When a user clicks on an image it opens up full screen view (NICE) but it always shows the last image in the list no matter which they click.

Do I have to do something special to get the currentitem URL when they click?

Thanks
Art Tostaine
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: VL-Web image in a list

Post by caseywhite »

What does your code look like for the click. This works fine for me.

Evtroutine Handling(#List.ItemClick)
#sys_web.Alert Caption(#ListColumn1.CurrentItem.ImageFileName)
Endroutine
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: VL-Web image in a list

Post by atostaine »

Yes currentitem works fine. Thanks
Art Tostaine
Post Reply