This seems a better way to do that! Didn´t konw about the existence of an element contaier! -----Ursprüngliche Nachricht----- Von: Ricardo Neisse [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 21. März 2001 12:39 An: [EMAIL PROTECTED] Betreff: Re: Returning an object containing various HTML objects Hi !! You can use ElementContainer instead... return new ElementContainer() .addElement(table1) .addElement(table2) .addElement(table3); ;) Ricardo Neisse - [EMAIL PROTECTED] > "RESTREPO, ALEXANDER G [Non-Pharmacia/1000]" wrote: > > > Hello: > > > > I am creating a method which needs to return an > > object which contains 3 HTML tables and a few other > > HTML objects. I want to basically return an object > > which contains all these elements. > > > > How can I do this? What class type would this method > > have to return.? How can I "concatenate" all the HTML > > objects I need to use without using the body tag? > > > > For example: > > > > public ??? create questionPanel() > > { > > Table firstTable = new Table(); > > Table secondTable = new Table(); > > Table thirdTable = new Table(); > > . > > . > > . > > Other Objects..... > > > > ....add all objects together > > > > return ????; > > } > > > > Any help would greatly be appreciated. > > Here is one way to do it, there are a couple others as well. > > StringElement se = new > StringElement().addElement(firstTable).addElement(secondTable).addElement(th irdTable); > > or alternativly just write the tables directly to the output stream > like: > > public void createQuestionPanel(PrintWriter out) > { > Table firstTable = new Table(); > Table secondTable = new Table(); > Table thirdTable = new Table(); > . > . > . > Other Objects..... > > ....add all objects together > > firstTable.output(out); > secondTable.output(out); > thirdTable.output(out); > } > > -stephan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Returning an object containing various HTML objects
Comba-Riepenhausen Enrique (CO) Wed, 21 Mar 2001 12:05:02 -0800
- AW: Returning an object contain... Comba-Riepenhausen Enrique (CO)
- Re: AW: Returning an objec... Stephan Nagy
- RE: AW: Returning an objec... Comba-Riepenhausen Enrique (CO)
- RE: AW: Returning an objec... RESTREPO, ALEXANDER G [Non-Pharmacia/1000]
- Re: AW: Returning an o... Vladimir Grishchenko
- Re: AW: Returning an o... Stephan Nagy
