Thank you

I am using struts, and am relatively new to java, I have never dealt with a
map??, and don't know what JSTL is, but I am reading up on it now. If there
is a resource that shows something like this it would be appreciated.

-----Original Message-----
From: Eric W Hauser [mailto:[EMAIL PROTECTED]

i'm guessing that you are using Struts...so, why don't you just get those
fields out of the database in an Action class and set them as a request
attribute? maybe you could store them in a Map with constants in your JSP
as your keys and then use JSTL to retreive those values? If you're doing
that, I would even go one step further and define those constants in your
application resources file...But try this:

<html:select value="<c:out
value="requestScope.selectMap['MY_FIELD_NAME']"/>"> 

I know this has been a big discussion of late, but I would stay away from
a tag library that grabs stuff out of a database. If you're using Struts,
why would you want to give up the benefits of the MVC2 pattern by adding
tags that do logic to your view? 

On Wed, 16 Jul 2003, Jonathon Brozny wrote:

> I am working on a project that requires many list boxes to be populated
from
> a database.
> 
> I have done a lot of readying on this and managed to create a taglib that
> will get my database fields and put it into a dropdown list, but I have to
> use Form Beans for validation, which I could not figure out how to
combined.
> 
> Can anyone point me to a place that shows something like this, or give me
an
> idea if this can be done?
> 
> 
> This is what I am thinking. I need to use the..
> <html:select ...
> for my form bean processing, but would like to fill it with a custom
taglib
> that gets fields from a database.
> 
> Thanks in advance for the help.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-------------------
Eric Hauser
[EMAIL PROTECTED]
(317) 679-4766


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