support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > Web Enablement > isCOBOL Web Direct 2.0 > How can I embed a web page in a screen using isCOBOL Web Direct 2.0?
Question Title 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 File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. How can I receive parameters in the first program working with isCOBOL Web Direct?
Article Information Additional Information
Article Number: 184
Created: 2011-10-04 10:57 AM
Rating: 2 Stars
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.