Show TOC Start of Content Area

Object documentation Applet Container  Locate the document in its SAP Library structure

Definition

Provides a container to host an applet.

·        classObject

Specifies the class object of the applet has to be in the library.

·        height

Defines the height of the applet.

·        library

Specifies the library that contain the class object and all necessary libraries.

·        name

Name of the applet. This attribute is passed on to the web client.

·        version

Version of the applet. This attribute is passed on to the web client.

·        width

Defines the width of applet.

 

Attributes

M

Values

Usage

classObject

*

String (cs)

Taglib
classObject="appletSample"

Classlib
setClassObject("appletSample")

height

 

Unit

Taglib
height="300"

Classlib
setHeight ("300")

library

*

String (cs)

Taglib
library="lib.appletLib.jar"

Classlib
setLibrary("lib.appletLib.jar")

name

 

String

Taglib
name="Stock index"

Classlib
setName("Stock index")

version

 

 

Taglib
No tag available

Classlib
setVersion(JavaVersion.MEDIUM)

width

 

Unit

Taglib
width="450"

Classlib
setWidth ("450")

 

Applet Parameter (AppletParameter)

Supplies parameter for the applet.

·        name

Name of the parameter.

·        value

Value for the 'name' parameter.

 

Events

M

Values

Usage

name

 

String (cs)

Taglib
name="backgroundColor"

Classlib
addParameter("backgroundColor", "red")

value

 

String (cs)

Taglib
value="red"

Classlib
addParameter("backgroundColor", "red")

 

Example

using the taglib

  <hbj:appletContainer 
    height=
"300" 
    
width="400" 
    
library("lib.appletlib.jar"
    classObject(
"applet.SampleApplet")>
    <hbj:appletParameter 
        name=
"backgroundColor" 
        
value="red" 
        
/>
  </hbj:appletContainer>

 

using the classlib

    Form form = (Form) this.getForm();

    AppletContainer container = 
new AppletContainer();
    container.setClassObject(
"com.sap.htmlb.test.applet.SampleApplet");
    container.setLibrary(
"lib.appletlib.jar");
    container.setHeight(
"400");
    container.setWidth(
"400");
    container.addParameter(
"codebase""/htmlb/applet");
    container.addParameter(
"backgroundColor""red");

    form.addComponent(container);

 

 

End of Content Area