{"id":1588,"date":"2016-01-14T13:50:30","date_gmt":"2016-01-14T12:50:30","guid":{"rendered":"http:\/\/www.capri-soft.de\/blog\/?p=1588"},"modified":"2016-01-14T13:53:00","modified_gmt":"2016-01-14T12:53:00","slug":"ibm-doors-dxl-a-dxl-generated-html-string-shall-be-shown-in-a-browser","status":"publish","type":"post","link":"https:\/\/www.capri-soft.de\/blog\/?p=1588","title":{"rendered":"IBM Doors DXL: A DXL generated HTML string shall be shown in a browser"},"content":{"rendered":"<h1>Problem<\/h1>\n<p>A DXL generated HTML string should be shown in a browser<\/p>\n<h1>Approach<\/h1>\n<p>Using the DBE Element htmlView it is possible to use an instance from the installation of the Clients Internet Explorer and show generated HTML Files. <\/p>\n<h1>Solution<\/h1>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n\/\/ Global UI Elements\r\nDB mainWindow;\r\nDBE browser;\r\nDBE test;\r\n\r\n\/\/ Global variables\r\nbool isFirstLoad=true;\r\n\r\nvoid setBrowserHTML(string html){ \r\n  Buffer b = create;\r\n  string s = html;\r\n  print s;\r\n  b = s;\r\n  set(browser, b);\r\n  delete b;\r\n} \r\n\r\nstring myHTML=&quot;Add your html code here&quot;;\r\n\r\nbool onHTMLBeforeNavigate(DBE dbe, string URL, string frame, string body)\r\n{ \r\n  string buttons&#x5B;] = {&quot;OK&quot;};\r\n  string message = &quot;Before navigate - URL: &quot; URL &quot;\\r\\nFrame: &quot; frame &quot;\\r\\nPostData: &quot; body &quot;\\r\\n&quot;;\r\n  print message &quot;&quot;;\r\n  return true;\r\n} \r\nvoid onHTMLDocComplete(DBE dbe, string URL){ \r\n  string buttons&#x5B;] = {&quot;OK&quot;};\r\n  string message = &quot;Document complete - URL: &quot; URL &quot;\\r\\n&quot;;\r\n  print message &quot;&quot;;\r\n  string s = get(dbe);\r\n  print &quot;url: &quot; s &quot;\\r\\n&quot;;\r\n\t\r\n  if(isFirstLoad)\r\n  {\r\n    setBrowserHTML(myHTML);\r\n    isFirstLoad=false;\r\n  }\r\n} \r\nbool onHTMLError(DBE dbe, string URL, string frame, int error){ \r\n  string buttons&#x5B;] = {&quot;OK&quot;};\r\n  string message = &quot;Navigate error - URL: &quot; URL &quot;; Frame: &quot; frame &quot;; Error: &quot; error &quot;\\r\\n&quot;; \r\n  print message &quot;&quot; ;\r\n  return true;\r\n} \r\nvoid onHTMLProgress(DBE dbe, int percentage){ \r\n  string buttons&#x5B;] = {&quot;OK&quot;};\r\n  string message = &quot;Percentage complete: &quot; percentage &quot;%\\r\\n&quot;;\r\n  print message;\r\n  return true;\r\n} \r\n\r\nvoid showHTMLCallBack(DB x)\r\n{\r\n  setBrowserHTML(myHTML);\t\r\n}\r\n\t\r\nvoid main(void)\r\n{\r\n  mainWindow=create(&quot;Traceability Master Professional&quot;);\r\n  browser = htmlView(mainWindow, 1024, 768, &quot;&quot;, \r\n  onHTMLBeforeNavigate, onHTMLDocComplete, onHTMLError, onHTMLProgress),\r\n  test=apply(mainWindow, &quot;Show HTML&quot;, showHTMLCallBack);\t\t\r\n  realize mainWindow;\r\n  show mainWindow;\r\n}\r\n\r\nmain();\r\n<\/pre>\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.capri-soft.de%2Fblog%2F%3Fp%3D1588&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:450px;margin-top:5px;\"><\/iframe>","protected":false},"excerpt":{"rendered":"<p>Problem A DXL generated HTML string should be shown in a browser Approach Using the DBE Element htmlView it is possible to use an instance from the installation of the Clients Internet Explorer and show generated HTML Files. Solution \/\/ Global UI Elements DB mainWindow; DBE browser; DBE test; \/\/ Global variables bool isFirstLoad=true; void &hellip; <a href=\"https:\/\/www.capri-soft.de\/blog\/?p=1588\" class=\"more-link\"><span class=\"screen-reader-text\">IBM Doors DXL: A DXL generated HTML string shall be shown in a browser<\/span> weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[22,19],"tags":[],"class_list":["post-1588","post","type-post","status-publish","format-standard","hentry","category-dxl","category-ibm-doors"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4yGeN-pC","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1588"}],"version-history":[{"count":3,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1588\/revisions"}],"predecessor-version":[{"id":1590,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1588\/revisions\/1590"}],"wp:attachment":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}