Ausgabe einer DB Anfrage in jsp !?

batok

Grünschnabel
Hallo leute :)

habe mal wieder ein kleines Problem.

Und zwar:
Ich speichere das Ergebnis einer DB Anfrage (Statement dynamisch erzeugt) in einer ArrayList (Ergebnisliste ). Mein Problem ist, wie ich nun diese Liste richtig ausgebe.
Die Ausgabe sieht momentan wie folgt aus:
Code:
Tabelle
Auswahl   - ID                           - Datum          - Kundennamen
checkbox  - 1 
checkbox  - heute
checkbox  - TestKundenNamen

Hinzukommt das die genaue Spaltenzahl erst zur Laufzeit ermittelt wird.
Hier einmal der Code für die Ausgabe:

PHP:
<logic:notEmpty name="ergebnisliste ">
 <div style="width:820px; height:620px; overflow:auto; border:2px; margin:1em;">
  <table border="1">
   <tr bgcolor="<%=bgColor%>">
    <th bgColor=#C8D2ED>Auswahl</th>
  
  	 <logic:iterate id="eintrag" indexId="rowIndex" collection="<%=ErgebnisListe %>" type="java.lang.String">
	  <%onmouseover = (rowIndex.intValue() % 2 == 0 ) ?	"this.style.backgroundColor='#C8D2EE';this.style.color='#000'"
													  : "this.style.backgroundColor='#C8D2EE';this.style.color='#000'";
		onmouseout  = (rowIndex.intValue() % 2 == 0 ) ?	"this.style.backgroundColor='#EEEEEE';this.style.color='#000'"
													  :	"this.style.backgroundColor='#FFFFFF';this.style.color='#000'";
	  %>
	  
	  <tr bgcolor="<%=bgColor%>" onmouseover="<%=onmouseover%>" onmouseout="<%=onmouseout%>">
	   <td height="16" class="mittig"><input type="checkbox" name="<%=zeilenIndex%>"></td>
	   <td height="16" class="mittig"><bean:write name="eintrag" /></td>
	  </tr>
	  <%bgColor = (rowIndex.intValue() % 2 == 0 ) ? "#EEEEEE" : "#FFFFFF";%>
	 </logic:iterate>

  </table>
 </div>
</logic:notEmpty>

Bin für jeden Vorschlag dankbar ...

Gruß
batok
 

Neue Beiträge

Zurück