function

toc
<mm:function>

Gets the function value of function `name'. The function value is available as a writer.

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

(since: MMBase-1.7)
see alsonode | booleanfunction | listfunction | voidfunction | functiontag
writer attributes
functiontag attributes
nodereferrer attributes
contextreader attributes
contextwriter attributes
contextreferrer attributes
containerreferrer attributes
example 1
<mm:function name="gui" escape="none" />
    
example 2
<mm:listnodes type="object" max="5" orderby="number" directions="down">
  <p>
    Node #<mm:field name="number" />: <mm:function name="gui" escape="none" />
  </p>
</mm:listnodes>

Node #55830: May 22, 2013

Node #55829: May 21, 2013

Node #55828: May 20, 2013

Node #55827: alfred.mmbase.org/

Node #55826: May 19, 2013

example 3
<%!
public static class MyClass {

  public MyClass() {
  }
  private String p;
  public void setMyParameter(String p) {
    this.p = p;
  }
  public String myfunction() {
   return p;
  }
}
%>
<mm:functioncontainer>
   <mm:param name="myParameter">Kloink</mm:param>
   <mm:function  classname="MyClass" name="myfunction" />
</mm:functioncontainer>
Kloink
example 4
<mm:functioncontainer>
   <mm:param name="parameter1">Kloink</mm:param>
   <mm:param name="parameter2">5</mm:param>
   <p>
     Some function of the given bean: 
     <mm:function classname="org.mmbase.util.functions.ExampleBean" 
                  name="stringFunction" />
   </p>
   <p>
     Another function of the same bean:
     <mm:function classname="org.mmbase.util.functions.ExampleBean" 
                  name="integerFunction">
       <mm:isgreaterthan value="9">
         <mm:write /> is greater than 9!
       </mm:isgreaterthan>
     </mm:function>
   </p>
</mm:functioncontainer>

Some function of the given bean: [[Kloink/default]]

Another function of the same bean: 15 is greater than 9!

example 5
<%!
  public static String myFunction() {
    return "abracadabra";
  }
%>
<mm:function set="THISPAGE" name="myFunction" />
abracadabra
example 6
<mm:import externid="number">7</mm:import>
<mm:function referids="number@parameter2" 
             classname="org.mmbase.util.functions.ExampleBean" 
             name="integerFunction" />
21