Yes you can make composite elements. You can do this by 
inheriting from Element Container and then adding the HTML objects you
want. When you output the HTML object. All the objects you added to the
container will be outputted.

There is nothing special about ElementContainer that restricts its use to
"primitive" html components.

Hope this helps...

On Mon, 7 Feb 2000, John Ky wrote:

> Hi list:
> 
> Is it possible to build composite elements using ECS?
> 
> For example:
> 
> If my HTML files contain many of these:
> 
> <table border=0 cellpadding=1 cellspacing=0 bgcolor=black><tr><td>
> <table border=0 cellpadding=1 cellspacing=0 bgcolor=white><tr><td>
>         <!-- Add text here -->
> </td></tr></table>
> </td></tr></table>
> 
> I want to be able to define a class Box so that it can produce the above
> HTML using the following code:
> 
> new Box()
>     .setBorderColor("black")
>     .setBGColor("white")
>     .addElement("<!-- Add text here -->");
> 
> Essentially, I want the Box Composite element to act within Java as
> a normal element, yet produce many nested HTML elements.
> 
> Can ECS do this, or is it possible to extend ECS to do this sort of
> thing?
> 
> Thanks.
> 
> John.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
> 
> 
> --
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]
> 



--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to