How can I embed a web page in a screen using isCOBOL Web Direct 2.0?
The solution for this is to include a ZK iFrame JavaBean control in the application.
Since isCOBOL WD2 works on top of the ZK package it is very natural to interact with such JavaBean control.
The following sample shows how to include the JavaBean control in the screen section and the related Java class in the repository paragraph of the configuration section. It also shows how to define the related object in the working-storage and what method to invoke in order to say which URL to browse.
program-id. iframesample.
configuration section.
repository.
class iscobol-java-bean
as "com.iscobol.gui.server.CobolGUIJavaBean"
.
working-storage section.
77 crt-status special-names crt status pic 9(5).
77 wb object reference iscobol-java-bean.
screen section.
01 screen1.
03 push-button
line 2
col 2, size 20 cells
exception-value 100
title "Go to Veryant.com"
.
03 java-bean
clsid "org.zkoss.zul.Iframe"
line 5
col 2
lines 45, size 90
object wb
.
procedure division.
main.
display standard graphical window
lines 50, size 100.
display screen1.
perform until crt-status = 27
accept screen1 on exception continue
if crt-status = 100
wb:>callMethod ("setSrc", "http://www.veryant.com")
end-if
end-perform.
stop run.
Authored
by: Veryant Support
This question has been viewed 6505 times so far.
Click
Here to View all the questions in isCOBOL Web Direct 2.0
category.
File Attachments
There are no attachment file(s) related to this question.
User Comments
There are no user comments for this question. Be the first to post a comment. Click Here