Most components found in any web site may be used a subcomponent, as long as it satisfies the following two conditions: 
  1. It's variables names do not conflict with variables of other components in the web page.
  2. The component uses relative coordinate system. Absolute coordinate system makes popup appear in storage locations, if the component is used as subcomponent.

           This page is constructed by blindly placing one AC in another AC (i.e. DHTML/HTML components). The components are collected from many web sites. The Container-GUI components use exactly the same process to construct component hierarchy. 

Example: To use any component as a subcomponent, please copy the component code in to an empty web page. Now the body of the web page contains only the component code. Make sure that the component works. Now, to use it as a subcomponent, one might copy all the code (as a single block) into proper location in the container component. For example, please inspect the DHTML-code for the "Expandable Menu" given at the bottom of the web page. 

This "Expandable Menu" may be copied as a single block, to use it as a subcomponent as shown in the next example, and so on. The Online GUI-object for the Expandable menu, just generates the same code, but gets the subcomponent code from other GUI-objects. To build hierarchy, the Expandable menu’s GUI-object may be passed to yet another GUI-object to build a subcomponent. Please see the figure at the bottom to understand the component hierarchy.

Bug Report: The above hierarchical-menu is using a global variable "i". Also, the "Subcomponent-Scroller" component, which is places as a subcomponent to the Expandable-menu item "You may use any otherElan Bean here". (please click on it to see the scroll-AC).

            To reproduce the bug-please move mouse on to the above hierarchical-menu, this corrupts counter variable "i" of the scroll-AC, so it looses the index of scroll-items.

 

 

Please scroll down the window to see the floating effect of the above menu

You can see an example for the seamless integration. These ElanBeans can be passed to Floater-ElanBean to get this effect.

/*************************************************************************/
/*************************Code for Hirarchical Menu ***************************/

String Items[]={"Index","Contents","Samples","Excercises"};
String Items1[]={"Index1","Index2","Index3"};
String Items11[]={"Index11","Index12","Index13"};
String Items113[]={"Index131","Index132","Index133"};
String Items2[]={"Experts","Contents"};
String Items3[]={ "Java","Servlets"};
String Items32[]={"Features","Forum","How-to","New","HotSites"};
String Items4[]={"JSP","EJB"};
String Items41[]={"Entity","Session"};

HierMenuCB hm = new HierMenuCB( );


// set main menu and submenu items
hm.addMMItems(Items); 
hm.addSMItems(Items1, 1, Items11,3,Items113);
hm.addSMItems(Items2);
hm.addSMItems(Items3, 2, Items32);
hm.addSMItems(Items4,1,Items41);

// Adding the component to float at TOP LEFT
TLFloatCB fcb1 = new TLFloatCB(hm);
/**********************************************************************/
/*********************************Code for Scroll Table********************/

scrollTableCB scb = new scrollTableCB();
Object s_scbitems[] = {tab};
scb.setItems(s_scbitems);//pass the table to the scroller



// Adding the component to float at BOTEM RIGHT
BRFloatCB fcb2 = new BRFloatCB(scb);


The Component Code Hirarchy

The Component Containment Model
Index Contents Samples Excercises
Please checkout the expandable menu