tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric W Hauser <ehau...@indiana.edu>
Subject RE: Is it possible: get DB fields with a taglib, process with a form bean
Date Thu, 17 Jul 2003 13:50:41 GMT
If you are looking for information about a Map, look at the Java API...The
interface I'm talking about is java.util.Map, so you'll actually have to
use an implementation such as HashMap...Map's are extrememly useful
collections, so I would recommend going to java.sun.com and doing some
searching...There are a lot of good tutorials there...

If you are looking for information of JSTL, try googling the topic...Off
the top of my head, there is a really good article at IBM's developerWorks
on the subject...If you're looking for a book, Shawn Bayern's it good for
programmers and nonprogrammers alike...


On Wed, 16 Jul 2003, Jonathon Brozny wrote:

> 
> 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:ehauser@indiana.edu]
> 
> 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: taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> > 
> > 
> > 
> 
> -------------------
> Eric Hauser
> ehauser@indiana.edu
> (317) 679-4766
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 
> 

-------------------
Eric Hauser
ehauser@indiana.edu
(317) 679-4766


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message