Index Contents Samples Excercises

SUN MICROSYSTEMS (SUNW)
last:  71 7/8
change:  -8
today's high79 3/4previous close79 7/8
today's low71 3/4bid72 1/2
today's open78 5/8ask72 15/16
volume21,436,700earnings per shareNot Avail.
52-week high106 3/4dividend per share0.00
52-week low26 31/32dividend pay dateN/A
P/E ratio75ex-dividend dateN/A
Intra Day
1-Year
INTEL CORP (INTC)
last:  71 7/8
change:  -8
today's high119 7/8previous close118 3/8
today's low109 13/16bid109 5/8
today's open117 3/4ask109 11/16
volume25,192,900earnings per shareNot Avail.
52-week high145 3/8dividend per share0.04
52-week low50 1/8dividend pay date09/01/00
P/E ratio36ex-dividend date08/03/00
Intra Day
1-Year
ORACLE CORP (ORCL)
last:  71 7/8
change:  -8
today's high68 1/2previous close67 13/16
today's low62 3/8bid62
today's open67ask62 1/16
volume29,287,000earnings per shareNot Avail.
52-week high90dividend per share0.00
52-week low11 9/32dividend pay dateN/A
P/E ratio85ex-dividend dateN/A
Intra Day
1-Year
INTL BUSINESS MACHINES (IBM)
last:  71 7/8
change:  -8
today's high110previous close109 1/4
today's low107 1/8bidNot Avail.
today's open109askNot Avail.
volume5,978,900earnings per shareNot Avail.
52-week high139 3/16dividend per share0.13
52-week low89dividend pay date06/10/00
P/E ratio24ex-dividend date05/08/00
Intra Day
1-Year.
MICROSOFT CORP (MSFT)
last:  71 7/8
change:  -8
today's high65 9/16previous close64 3/16
today's low63 1/16bid62 3/4
today's open63 7/8ask63
volume28,981,300earnings per shareNot Avail.
52-week high119 15/16dividend per share0.00
52-week low62 7/16dividend pay dateN/A.
P/E ratio37ex-dividend dateN/A.
Intra Day
1-Year
Weather Forecast for Sanfrancisco
Today

F° or C°

  Thu   Fri   Sat   Sun

 54°

at: 11:53pm ET


Tstorms

Hi 63°

Lo 47°

Humidity: 71%
Wind: S/13 mph
Visibility: 10 mi
Sunrise: 06:49 a.m.
Sunset: 05:54 p.m.




Showers


Mostly
Cloudy



Showers



Rain

‹10 10 20 30 40 50 60 70 80 90 100+

Hi 58
Lo 48
Hi 59
Lo 43
Hi 61
Lo 46
Hi 60
Lo 52
 

Code to the generate the above page

Example For Seamless Integration of ElanBeans

You can see in the page the seamless integration in Action. Each "item" in the 'pullout-memu' can be an ElanBean. All the ElanBeans can be set to a Table cell. This Table can be a cell in a larger Component and so-on.

Imagin greate web applications one can build using this kind of integration, where each component may be build on remote servers and assembled like building blocks with 'Virtual Web server' that is discussed later.

/***********************Code for Pullout Menu*********************************/

//Assume that these mini-servlet components can generate HTML-code using run-time Stock-data.
StockCB s1= new StockCB("SUNW"); //generates stock quotes of Sun
StockCB s2= new StockCB("INTC"); //generates stock quotes of Intel
StockCB s3= new StockCB("ORCL"); //generates stock quotes of Oracle
StockCB s4= new StockCB("IBM"); //generates stock quotes of IBM
StockCB s5= new StockCB("MSFT"); //generates stock quotes of Micro Soft


//set Menu names on the left side of Pulloutmenu
String items[] = {"Sun","Intel","Oracle","IBM","MicroSoft"}; 

// This method changes Default colors.
String colors[]= {"#A5FED8","white","#FFC8A4","#A8BBFB"}; 
Object contents[] = { s1,s2,s3,s4,s5};

//Create Pulloutmenu object with the above defined properties
PulloutCB po = new PulloutCB(5,items,contents,colors ); 
po.setSize(585,380);
/*************************************************************************/
/*************************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);

/**********************************************************************/
/*************************Code for Multiple Object Scroller *******************/

// Assume that you have created ElanBeans item1,item2,item3 and you like to scroll them.
String scitems1[] = {item1,item2,item3 };

//Create Scroller table by passing above array in the constructor
ScrollCB sb = new ScrollCB(scitems1); 

sb.setScrollerWidth(200);
sb.setScrollerHeight(200);

// Optional parameter for the Scroller.
sb.setBgColor("white");
sb.setScrollerWait(3000);
sb.setScrollerSpeed(100);
sb.setScrollerJump(100);


/**********************************************************************/
/*********************************Code for Scroll Table********************/

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

/**********************************************************************/
/********************************Code for Main Table**********************/

//Create a main table that contains all the above ElanBeans in the page
TableCB tb = new TableCB(3,3); 
maintab.setCellValue(0,0,"elanbeans.gif");
maintab.setCellValue(0,1,hm);
maintab.setCellValue(0,2,"elanlogo.gif");
maintab.setCellStyle(1,0,"<TD COLSPAN=\"2\" ROWSPAN=\"2\" VALIGN=\"TOP\">");
maintab.setCellValue(1,0,po);
maintab.setCellStyle(1,2,"<TD VALIGN=\"TOP\"");
maintab.setCellValue(1,2,sb);
maintab.setCellStyle(2,1,"<TD VALIGN=\"TOP\"");
maintab.setCellValue(2,1,stb);


//build the table that in turn builds all the above ElanBeans
maintab.buildWC(req,out);