com.sapportals.htmlb.htmlcontainer

Class NonIsolatedHtmlContainer

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.htmlcontainer.NonIsolatedHtmlContainer

public class NonIsolatedHtmlContainer
extends Component

The NonIsolatedHtmlContainer will display a html-document, which is represented by an inputStream, inside an Html Business for Java application. To be able to display a whole html document without using iFrames, the document has to be adjusted to this special need. Therefore the NonIsolatedHtmlContainer provides a parser, which does these adjustments. The application developer can also provide its own parser if the application has special needs.

Documents which include Forms, Frames or Framesets can't be displayed non-isolated. If the document contains one of these tags, an error message will be displayed.

There are a lot of things which might not work if a document is displayed non-isolated:

There might be some other things which will not work correctly! Ensure that your html document works correctly. If not, write your own parser and adjust the document to your needs.

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
 
Constructor Summary
NonIsolatedHtmlContainer(InputStream htmlStream)
          Creates a NonIsolatedHtmlContainer
 
Method Summary
 IHtmlParser getHtmlParser()
          gets the html parser which has to be used to parse the htmlStream.
 InputStream getHtmlStream()
          gets the HtmlStream of the NonIsolatedHtmlContainer.
 String getParsedHtml()
          gets the parsed html stream, which is parsed by the specified html parser or by the DefaultHtmlParser
 String getSrcUrl()
          gets the URL from the HtmlStream.
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 String getWidth()
          gets the width of the NonIsolatedHtmlContainer
 boolean isBordered()
          determines if the NonIsolatedHtmlContainer has a border.
 boolean requiresForm()
          check if a special component really requires a form around it.
 void setBordered(boolean border)
          sets if the NonIsolatedHtmlContainer has a border.
 void setHtmlParser(IHtmlParser htmlParser)
          sets the html parser which has to be used to parse the htmlStream.
 void setHtmlStream(InputStream htmlStream)
          sets the HtmlStream of the NonIsolatedHtmlContainer.
 void setSrcURL(String srcUrl)
          sets the URL from the HtmlStream.
 void setWidth(String width)
          sets the the width of the IsolatedHtmlContainer.
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values
Constructor Detail

NonIsolatedHtmlContainer

public NonIsolatedHtmlContainer(InputStream htmlStream)
Creates a NonIsolatedHtmlContainer

Parameters:
htmlStream - the html document
Method Detail

getUI

public String getUI()
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
a unique identification string for this Component

getSrcUrl

public String getSrcUrl()
gets the URL from the HtmlStream. The SrcUrl is the origianl Url of the HtmlStream. This URL is used to replace relative URLs in the HtmlStream

Returns:
the URL to the Html Document

setSrcURL

public void setSrcURL(String srcUrl)
sets the URL from the HtmlStream. The SrcUrl is the origianl Url of the HtmlStream. This URL is used to replace relative URLs in the HtmlStream

Parameters:
srcUrl - the URL to the Html Document

getHtmlStream

public InputStream getHtmlStream()
gets the HtmlStream of the NonIsolatedHtmlContainer. The HtmlStream contains the Html of the Html document, which has to be displayed

Returns:
the HtmlStream of the document

setHtmlStream

public void setHtmlStream(InputStream htmlStream)
sets the HtmlStream of the NonIsolatedHtmlContainer. The HtmlStream contains the Html of the Html document, which has to be displayed

Parameters:
htmlStream - the HtmlStream of the document

getHtmlParser

public IHtmlParser getHtmlParser()
gets the html parser which has to be used to parse the htmlStream. If no application specific parser id´s specified the method returns null.

Returns:
the html-parser

setHtmlParser

public void setHtmlParser(IHtmlParser htmlParser)
sets the html parser which has to be used to parse the htmlStream. If no application specific parser is specified, the NonIsolatedHtmlContainer uses the DefaultHtmlParser

Parameters:
htmlParser - an instance of the html-parser

getWidth

public String getWidth()
gets the width of the NonIsolatedHtmlContainer

Returns:
width of the NonIsolatedHtmlContainer

setWidth

public void setWidth(String width)
sets the the width of the IsolatedHtmlContainer. The width may not be set exactly, because it depends on the content of NonIsolatedHtmlContainer.

Parameters:
width - width of the NonIsolatedHtmlContainer in pixel or percent

isBordered

public boolean isBordered()
determines if the NonIsolatedHtmlContainer has a border. Default value is false.

Returns:
true if the NonIsolatedHtmlContainer has a border

setBordered

public void setBordered(boolean border)
sets if the NonIsolatedHtmlContainer has a border. Default value is false.

Parameters:
border - true if the NonIsolatedHtmlContainer should have a border

getParsedHtml

public String getParsedHtml()
gets the parsed html stream, which is parsed by the specified html parser or by the DefaultHtmlParser

Returns:
parsed html document

requiresForm

public boolean requiresForm()
check if a special component really requires a form around it. NonIsolatedHtmlContainer never requires a form.

Overrides:
requiresForm in class Component
Returns:
false


Copyright 2006 SAP AG Complete Copyright Notice