You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by ronsilver <ve...@hawaii.com> on 2002/04/05 10:34:44 UTC

hashtable answers

this is the answer to my question !!!!
 
 
methods of the form-class ( struts )
 
public void setVector(Vector v)
 
public Vector getVector()
 
public void setHash(Hashtable hash)
 
public Hashtable getHash()
 
the form-class is defined as "simpleForm" in the struts-config
 
this should be enough to explain the code
 
reminder : this code loops through each vector-element
 
each vector-element consists of a hashtable which key/value pairs are to
be displayed
 
#set ($criteria = $simpleForm.vector)
 
#foreach( $vec in $criteria )
    #set($hash = $simpleForm.hash)
        #foreach($key in $hash.keySet())
            <b>$hash.get($key)</b><br>
        #end
#end