i get a list from my java code and I would like to create a matrix from this list.
In my jsp I have a select and I would like to display in a table the values of my matrix in relation to value in my select choice
my list in my java
<html:select property="immeuble.zone" size="1" styleId="zone" styleClass="saisie">
<html:optionsCollection property="optionsZone" label="libelle" value="code"/>
</html:select>
my lsit in my jsp
List optionsZone = new ArrayList(3);
optionsZone.add(new CodeLibelleBean("1","1"));
optionsZone.add(new CodeLibelleBean("2","2"));
optionsZone.add(new CodeLibelleBean("3","3"));
my list in want display
HashMap Tarif = new HashMap();
Tarif.put("1","100");
Tarif.put("1","150");
Tarif.put("1","180");
Tarif.put("2","200");
Tarif.put("2","250");
Tarif.put("2","290");
Tarif.put("3","300");
Tarif.put("3","350");
Tarif.put("3","360");
I’m not sure I understood your question, but probably you want to pass your arrays to Javascript and do some operations with them there. If this is the case, you will need to use some Java JSON converter.
Here is a starting point for that: https://stackoverflow.com/questions/338586/a-better-java-json-library