you must have meant...

request.setAttribute("myObj",it);

Despite my misgivings about exclamation marks, I like your Torque primer.


On Sunday, August 3, 2003, at 12:20 PM, Mark Lowe wrote:


ArrayLists are handy, and you need to read some of the excellent docs that are provided..

If your iterator is taken from your model (DB i should imagine) you wont want to be dumping its contents to your presentation layer without copying the contents to mediating structure. If this isn't the case then thats fine and dandy, but judging by your previous question I doubt you are..

I have no idea what you;re talking about with setRequest, keep up crack smoking its obviously workin' for you..

Cheers Mark

P.s. Exclamation marks are rude !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

On Sunday, August 3, 2003, at 11:20 AM, <[EMAIL PROTECTED]> wrote:


Hi Mark,
why would I want to iterate over my data just to put it into an
ArrayList? I thought the use of an Iterator is to prevent me doing that?



I can set move the setRequest to my ActionClass, so now it works for me.
Thanks!


Stephan

Mark Lowe <[EMAIL PROTECTED]> schrieb am 03.08.2003, 11:10:40:
If your iterator is straight from you model (DB stuff) then you'll at
least want to copy into some other structure.

ArrayList myList = new ArrayList();

YourObj yourObj = new YourObj();
Iterator it = yourObj.iterator();

while(it.hasMoreElements()) {
        myList.add(it.next());
}

request.setAttribute("mylist",myLIst.toArray());



On Sunday, August 3, 2003, at 09:54 AM,
wrote:


Hi message, I get an "broken link" error :-(


message message schrieb am 03.08.2003, 09:31:21:

You may want to have a look at this page. http://developer.novell.com/tech/1126.html. It shows, using struts, on how to retrieve and display data from a database.


From:
Reply-To: "Struts Users Mailing List"
To: Struts Users Mailing List
Subject: Call methods from JSTL
Date: Sun,  3 Aug 2003 08:06:01 +0200


hi list, I don't manage to use methods from my classes with JSTL.

This is normal Java code:
BuchKatalog bk = new BuchKatalog();
java.util.Iterator i = bk.getBuecher();


How can I achieve the same with JSTL? (tons of examples to continue afterwards, but none to this point .-()

------------------------------------------------------------------ ---
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



_________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


------------------------------------------------------------------- --
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]

--------------------------------------------------------------------- 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]



Reply via email to