Java Mailing List Archive

Home » FreeMarker-user »

[FreeMarker-user] Listing enumerations

Tim Pizey


Replies: Find Java Web Hosting

Author LoginPost Reply

I have a method which returns an Enumeration, but when it is rendered
with #list or #foreach
an exception is thrown:

?size is unsupported for: freemarker.ext.beans.OverloadedMethodModel
The problematic instruction:
==> list melati.database.displayTables as table [on line 67, column 50
in org/melati/admin/Top.fml]

Java backtrace for programmers:
freemarker.template.TemplateModelException: ?size is unsupported for:
 at freemarker.ext.beans.OverloadedMethodModel.size (
 at freemarker.core.IteratorBlock$Context.runLoop(
 at freemarker.core.Environment.visit (

The template is:

<select name="table" OnChange="submit();" title="Select table to edit">
<#assign lasttype = "">
<#assign selected = false>
<#list melati.database.displayTables as table>
<#if !table.tableInfo.category.equals(lasttype)>
  <option value="">&nbsp;</option>
  <option value="">${}</option>
  <option value="">============</option>
<#assign lasttype = table.tableInfo.category>
<option value="${}"
<#if !selected>
 <#if melati.table>
  <#if melati.table.equals(table)>
  <#assign selected = true>
  <#if table.getName().equals(admin.getPrimaryDisplayTable(melati))>
   <#assign selected = true>
</#if>> ${ml.rendered(table.displayName)}</option>

I am using BeanWrapper.

The documentation for #list
says, as far as I can understand, that an enumeration and and iterator
should be usable.

Sorry if this is a newbie error.

thanks in advance

Tim Pizey

Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
FreeMarker-user mailing list
©2008 - Jax Systems, LLC, U.S.A.