Proxy generator creates cardlist. Still needs work.

This commit is contained in:
jendave
2011-10-22 07:43:30 +00:00
parent 31eefd4f13
commit 0b2267a102
2 changed files with 15 additions and 7 deletions

View File

@@ -658,13 +658,20 @@ public class DeckManager {
root.put("title", d.getName());
List<String> list = new ArrayList<String>();
for (Card card : d.getMain().toForgeCardList().toArray()) {
//System.out.println(card.getSets().get(0).URL);
list.add(card.getSets().get(0).URL);
//System.out.println(card.getSets().get(card.getSets().size() - 1).URL);
list.add(card.getSets().get(card.getSets().size() - 1).URL);
}
List<String> nameList = new ArrayList<String>();
for (Card card : d.getMain().toForgeCardList().toArray()) {
//System.out.println(card.getSets().get(card.getSets().size() - 1).URL);
nameList.add(card.getName());
}
root.put("urls", list);
root.put("cardBorder", cardBorder);
root.put("height", height);
root.put("width", width);
root.put("cardlistWidth", width - 11);
root.put("nameList", nameList);
/* Merge data-model with template */
//StringWriter sw = new StringWriter();

View File

@@ -18,11 +18,12 @@
<img src="${url}" height="${height}" width="${width}" style="margin: 0 ${cardBorder}px ${cardBorder}px 0;">
</#list>
<br>
<table title="Spirited Away" style="font-size:10px;" border=1 cellpadding="5" cellspacing="1">
<table style="font-size:10px;" border=1 cellpadding="5" cellspacing="1">
<tr>
<td width="211">
</td>
<td width="211">
<td width="${cardlistWidth}">
<#list nameList as name>
${name}<br>
</#list>
</td>
</tr>
</table>