Re: MySQL LAST_INSERT_ID( )

2003-07-22 Thread Rick Ross
Correct! and nicely done, I might add. Thank you. R - Original Message - From: "Michael Nascimento Santos" <[EMAIL PROTECTED]> To: "Tag Libraries Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 22, 2003 2:54 PM Subject: Re: MySQL LAST_INSERT_ID( ) > I guess you must be inside the

RE: if with 2 script element not working

2003-07-22 Thread Karr, David
First of all, it's hard to help if you don't say what's happening. Saying "it doesn't work" isn't enough. It might be useful if you would print out the values you're comparing. If they're really not equal, then they really won't be equal :) . > -Original Message- > From: Thomas Martin [ma

Re: MySQL LAST_INSERT_ID( )

2003-07-22 Thread Michael Nascimento Santos
I guess you must be inside the same transaction to achieve what you want. Try to use to make both statements run inside the same transaction. []s Michael - Original Message - From: "Rick Ross" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 22, 2003 6:54 PM Subject: MySQ

MySQL LAST_INSERT_ID( )

2003-07-22 Thread Rick Ross
I have a bad feeling about this, but I haven't been able to access the LAST_INSERT_ID( ) from mySQL. In mySQL you can have one column that is automatically incremented (usually the primary key field). You don't specify a value for this field in your INSERT statement or you specify NULL. Either w

taglibs-user@jakarta.apache.org

2003-07-22 Thread Thomas Martin
The forEach work but not the if.

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Rick Reumann
On Tue, 2003-07-22 at 12:41, Kris Schneider wrote: > public static Map getConstantFieldsAsMap(Class cls) > throws IllegalAccessException { > Field[] allFields = cls.getDeclaredFields(); > int numFields = allFields.length; > Map propMap = new HashMap(numFields); >

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Rick Reumann
On Tue, 2003-07-22 at 12:13, Karr, David wrote: > > So for every constant value that you want to use, in every JSP page, > you're going to have a call to the "bind" tag from the unstandard > library? This is as opposed to a single block of code in a servlet to > load the constants into a bean a

Re: One loop for two arrays

2003-07-22 Thread Felipe Leme
On Tuesday 22 July 2003 01:50 pm, Kris Schneider kris-at-dotech.com |jakarta| wrote: > The type of the "varStatus" attribute is > javax.servlet.jsp.jstl.core.LoopTagStatus. This interface exports a number Yes, I know :( > of properties, including "index" and "count". I think you need: > I took

Re: One loop for two arrays

2003-07-22 Thread Kris Schneider
The type of the "varStatus" attribute is javax.servlet.jsp.jstl.core.LoopTagStatus. This interface exports a number of properties, including "index" and "count". I think you need: Quoting Felipe Leme <[EMAIL PROTECTED]>: > On Tuesday 22 July 2003 12:44 pm, Vincent Peytavin wrote: > > > > >

RE: Length of collection using EL?

2003-07-22 Thread Chen, Gin
Use the archives.. its been discussed SO many times already. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 12:41 PM To: [EMAIL PROTECTED] Subject: Length of collection using EL? Does anyone know how to get the length of a collection using t

RE: Length of collection using EL?

2003-07-22 Thread Karr, David
This has been discussed numerous times on this list. The EL can reference javabean properties, and elements of collections and maps. That's it. The length of a collection is not a javabean property. It's straightforward to implement a simple class called "CollectionBean" (and "MapBean") that is

Length of collection using EL?

2003-07-22 Thread Sgarlata Matt
Does anyone know how to get the length of a collection using the EL? I am trying to do one of the tests below. Note that "children" is a List. or And get this error: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${compo

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Kris Schneider
I think I've posted this before, either here or in struts-user. At app startup, process the classes you need and store each in application scope using their class names as keys (or whatever makes the most sense to you). public static Map getConstantFieldsAsMap(Class cls) throws IllegalAc

Re: One loop for two arrays

2003-07-22 Thread Felipe Leme
On Tuesday 22 July 2003 12:44 pm, Vincent Peytavin wrote: > >// Something which puts in 'surname' the value of 'list2[i]' > > I think the "something" could be something like:: Is that what you want? Felipe - To unsu

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Karr, David
> -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > > On Tue, 2003-07-22 at 10:54, Karr, David wrote: > > > If you have a bunch of constants that you might want to reference, you > > might consider processing a class with reflection, loading all the > > "static final" va

RE: One loop for two arrays

2003-07-22 Thread Chen, Gin
You were on the right track. Use the varStatus with a c:set. I'm not sure what the problem is. -Tim -Original Message- From: Vincent Peytavin [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 11:52 AM To: [EMAIL PROTECTED] Subject: Re: One loop for two arrays > Sounds like a Map mig

Re: One loop for two arrays

2003-07-22 Thread Vincent Peytavin
> Sounds like a Map might be more applicable - names as > keys, surnames as values. Please, don't focus on the name/surname : this is not the problem. I have several arrays, and i need to go through them in the same time (based on the same index). How can i do that? -- Vincent

Re: One loop for two arrays

2003-07-22 Thread Michael Duffy
Sounds like a Map might be more applicable - names as keys, surnames as values. --- Vincent Peytavin <[EMAIL PROTECTED]> wrote: > Hello, > > I have 2 arrays, where elements correspond, that's > to say list1[i] go with > list2[i]. > For example, imagine list1 stands for "names" and > "list2" for "

One loop for two arrays

2003-07-22 Thread Vincent Peytavin
Hello, I have 2 arrays, where elements correspond, that's to say list1[i] go with list2[i]. For example, imagine list1 stands for "names" and "list2" for "surnames". names[0]=Peytavin surnames[0]=Vincent names[1]=Jackson surnames[1]=Michael ... The difficulty is to set in a variable 'sur

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Rick Reumann
On Tue, 2003-07-22 at 10:54, Karr, David wrote: > If you have a bunch of constants that you might want to reference, you > might consider processing a class with reflection, loading all the > "static final" variables into a hashmap, keyed by the variable name. > The resulting references in your J

Re: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Rick Reumann
On Tue, 2003-07-22 at 10:52, Henri Yandell wrote: > Unsure if JSTL 1.1 will allow this, but using the Unstandard taglib you > can do: > > > > .. > > > http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html Killer! I'll have to check this out right now. -- Rick -

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Karr, David
The pre-JSP 2.0 version of the JSTL can reference properties of JavaBeans, and entries of collections and maps. That's it. If you have a bunch of constants that you might want to reference, you might consider processing a class with reflection, loading all the "static final" variables into a hash

Re: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Henri Yandell
Unsure if JSTL 1.1 will allow this, but using the Unstandard taglib you can do: .. http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html Hen On 22 Jul 2003, Rick Reumann wrote: > I'm wondering if there is a way I could compare a scoped variable to a > static constant vari

Way to compare scoped value to a class constant variable?

2003-07-22 Thread Rick Reumann
I'm wondering if there is a way I could compare a scoped variable to a static constant variable that is in a class? For example in Const class I have some levels like: public static final int JVP_LEVEL = 3; It would be nice if in my JSP I could do (after the import up top).. I know I could ju