Nonisolated HTML Container
Definition
The NonIsolatedHtmlContainer will display a HTML-document, represented by an inputStream, inside an HTML Business for Java application. The NonIsolatedHtmlContainer provides a parser, which adjusts the HTML-document so it can be displayed without iFrames. The application developer can also provide its own parser that is tailored for the application.
Limitations of the NonIsolatedHtmlContainer control:
-
Relative URLs used in JavaScript will not be replaced by absolute URLs (like. window.open('/test.htm') ).
-
Style sheets will be loaded but should not contain relative URL's.
-
Style sheets can effect the entire portal page.
-
Correct JavaScript execution can not be guaranteed.
-
Documents must be in HTML format.
-
Incorrect formatted documents can destroy the entire portal page.
-
Absolute positioning of the document (for example, with JavaScript) is not supported
-
The exact width of the document can not be set.
Because of other limitations that can apply make sure that HTML document is formatted correctly and produces a correct page. If you run into one of the limitations you have to create your own parser.
-
bordered
A boolean value that, if set to true, draws a border around the NonIsolatedHtmlContainer control.
-
id
Identification name of the NonIsolatedHtmlContainer control.
-
htmlParser
Sets a user defined HTML parser to parse the HtmlStream.
-
htmlStream
Sets the HtmlStream of the NonIsolatedHtmlContainer control.
-
srcUrl
Specifies the address of the page/document to be displayed in the NonIsolatedHtmlContainer control.
-
width
Specifies the width of the NonIsolatedHtmlContainer control.
|
Attributes |
M |
Values |
Usage |
|---|---|---|---|
|
bordered |
FALSE (d) TRUE |
Taglib bordered="TRUE" Classlib setBordered(true) |
|
|
id |
* |
String (cs) |
Taglib id="nonisoHTMLCon" Classlib setId ("nonisoHTMLCon") |
|
htmlParser |
String (cs) |
Taglib No tag available Classlib setHtmlParser(HtmlParser.htmlParser) |
|
|
htmlStream |
* |
String (cs) |
Taglib htmlStream="myStream" Classlib setHtmlStream(java.io.InputStream htmlst) |
|
srcUrl |
* |
String (cs) |
Taglib srcUrl="http://www.sap.com" Classlib setSrcUrl("http://www.sap.com") |
|
width |
Unit |
Taglib width="500" Classlib setWidth("500") |
Example
using the taglib
<hbj:nonIsolatedHtmlContainer
id="nonIsohtmlCont"
width="400"
srcUrl="http://www.sap.com"
htmlStream="myStream"
bordered="true"
/>
using the classlib
Form form = (Form) this.getForm();
URL u = new URL("http://www.sap.com");
in = u.openStream();
NonIsolatedHtmlContainer niso = new NonIsolatedHtmlContainer(in);
niso.setSrcURL(myUrl);
niso.setBordered(true);
form.addComponent(niso);
Result
SAP Web page is displayed