Page 1 of 1

VLF-ONE Slide in Panel

Posted: Thu May 03, 2018 4:34 am
by cthomas
I am creating a VLF-ONE framework and I would like to allow the functional team to put application user documentation into the framework. My thought was to create links to documents and videos in the Slide in Panels. My problem is that I do not know how to create a link to display a document/video that resides on either the IFS or a windows box on our network. Any help would be appreciated.

Re: VLF-ONE Slide in Panel

Posted: Thu May 03, 2018 6:32 am
by jyoung
Hi,

As long as the document is accessible by a URL you should be able to navigate the browser to it.

Check out SYS_WEB.Navigate. You can specify the URL to go to and if you use Target(NEW) then it will open it in a new tab or window.

Then its just a matter of using individual labels to pick up click event and trigger the navigation like

Code: Select all

evtroutine handling(#Label1.Click)
#SYS_WEB.Navigate url('http://www.example.com/documentation/ABC.pdf') target(New)
endroutine
or if you have a lot of links, adding them to a list and picking up on the ItemClick event like (assuming the URL is in STD_TEXTL)

Code: Select all

evtroutine handling(#List1.ItemClick)
#SYS_WEB.Navigate url(#STD_TEXTL) target(New)
endroutine
Hope this helps,
Joe

Re: VLF-ONE Slide in Panel

Posted: Thu May 03, 2018 7:23 am
by cthomas
Thanks for the example. Not sure how to make a url out of the IFS path, but I did take the url example and change http:\\ to file:\\ for the file on the IFS. It worked in both IE and chrome when putting path in the browser but it only worked in IE when putting the path into the sys_web command.

Re: VLF-ONE Slide in Panel

Posted: Thu May 03, 2018 8:05 am
by jyoung
I think the file would have to be under the www folder in the IFS to be served by the web server.

Another option may be to serve the File from a Server Module.
https://docs.lansa.com/14/en/lansa015/c ... E_EXAMPLE3

I think that if you set the Response.ContentFile to the path of the File, it will download it to the browser.
Similar to this https://docs.lansa.com/14/en/lansa095/c ... 1_0415.htm

Re: VLF-ONE Slide in Panel

Posted: Fri May 04, 2018 12:47 am
by cthomas
ok thanks. I'll try moving the file into that folder and give it a try. I use the Response example in an app running in V13. I actually tried the response way earlier to no avail. The displayed screen I am on in the framework errors out when I run the routine in the server module from the slidein. It makes me think that the issue is calling it from inside the slidein.

Srvroutine Name(Download) Response(#Response)

#Response.ContentType := 'APPLICATION/VND.MS.EXCEL'
#Response.contentfile := '/RBT/RB2XC_TXKXL.XLS'
#Response.attachmentFileName := 'REBAT2_XC.XLS'

Endroutine

Thanks again for all your help and I'll post the solution as soon as I get it working.

Re: VLF-ONE Slide in Panel

Posted: Sat May 05, 2018 1:50 am
by cthomas
ok. I was able to get the document to display in both IE and Chrome. The document had to be in the webserver/images directory on the ifs.

Here is the statement I used:
#SYS_WEB.Navigate Url('http://xyz:4646/images/RB2XC_TXKXL.XLS') Target(New)

xyz is the name of our as400 and images is the alias from the http server configuration to get to the webserver/images directory.