I'm going to add some more the my previous post, and put the whole thing
into an understandable context... please bear with me.

In addition to the Hashtable mentioned below, I have another Vector (let's
call this 'ACCVEC').  ACCVEC contains account numbers as Integer objects.
On my JSP page, I use <bean:iterate> to list these account numbers on the
screen.

The keys in the aforementioned Hashtable are also account numbers (as
Integers).  The corresponding value is a Vector (let's call this 'INVVEC')
of invoice numbers that are related to the account.  It should be noted that
not every account number in ACCVEC is not a key in the Hashtable.  That is,
there may be some accounts that have no invoices.

What I'd like to do is create a table (in my JSP) with a list of all account
numbers (as in ACCVEC), and an associated <html:select> of invoice numbers,
if they exist.

Essentially, what I want is:

for each account number in ACCVEC {
    display the account number
    attempt to retrieve a value from the Hashtable for this account number
    if there is a INVVEC {
        for each invoice number in INNVEC {
            create a select drop down box
        }
    }
}

How should this look using Struts?
bort


"bort" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all
>
> I've created a Hashtable, who's values are Vectors:
>
> Vector a = new Vector();
> a.add("something");
> a.add("somethingelse");
>
> Vector b = new Vector();
> b.add("something");
> b.add("somethingelse");
>
> Hashtable ht = new Hashtable();
> ht.put ("key", a);
> ht.put ("anotherkey", b);
>
> request.setAttribute("attrkey", ht);
>
> What I want to be able to do is iterate through this Hashtable (in the
JSP),
> pull out a Vector, and iterate through it.  How would I do this?
>
> tia
> bort




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

Reply via email to