listfunction

toc
<mm:listfunction>

Gets the function value for function `name'. The function value is supposed to be Collection, and this tags acts as a `listprovider' and `writer' tag, iterating over all entries of the resulting collection.

For more information about how function tags work generally see the the `functiontag' entry of this reference.

(since: MMBase-1.7)
see alsonode | booleanfunction | function | functioncontainer | nodelistfunction
attributes
  • add (since: MMBase-1.9)
  • retain (since: MMBase-1.9)
  • remove (since: MMBase-1.9)
  • max
    The maximum number of times to iterate.
  • offset
    How many items must be skipped before iterating
  • listdelimiter
    see: listdelimiter attribute of import
listprovider attributes
contextreader attributes
contextwriter attributes
contextreferrer attributes
functiontag attributes
nodereferrer attributes
containerreferrer attributes
writer attributes
example 1
<mm:listnodes type="mediasources" max="10">
  <mm:function name="mimetype" />:  <mm:function name="format" />
  <ul>
    <mm:listfunction name="urls" jspvar="uc">
      <li><%= ((org.mmbase.applications.media.urlcomposers.URLComposer)uc).getURL() %></li>
    </mm:listfunction>
  </ul>
</mm:listnodes>
example 2
<%!
public static java.util.List listFunction() {
   return java.util.Arrays.asList(new String[] {"abc", "def", "ghij"});
}
%>
<mm:listfunction set="THISPAGE" name="listFunction">
   <mm:write /><mm:last inverse="true">, </mm:last>
</mm:listfunction>
abc, def, ghij