org.mmbase.bridge.jsp.taglib.functions
Class Functions

java.lang.Object
  extended by org.mmbase.bridge.jsp.taglib.functions.Functions

public class Functions
extends Object

Functions for EL variables, and XSL. Like this: 1,2,123 YES! NO!

Since:
MMBase-1.8
Version:
$Id: Functions.java 37706 2009-08-12 09:37:14Z michiel $
Author:
Michiel Meeuwissen
To Do:
EXPERIMENTAL

Constructor Summary
Functions()
           
 
Method Summary
static Map<String,String> applicationContext(String path)
           
static boolean contains(Collection col, Object obj)
          MMBase specific 'contains' (for Collections).
static String directory(String file)
           
static String escape(String escaper, Object string)
          Provides the 'escape' functionality of taglib.
static String escapeString(String escaper, String string)
          This version of escape(String, Object) simply asks for a string.
static boolean hasAlias(Node node, String alias)
          Checks if the supplied node has the supplied alias
static String link(String page)
           
static Object managerProperty(String nodeManager, String name)
           
static Object moduleProperty(String module, String name)
           
static Object property(String name)
           
static void remove(Collection col, Object obj)
          MMBase specific 'remove' (for Collections).
static LocalizedString string(LocalizedString s)
           
static String treefile(String page, PageContext pageContext, Object objectList)
           
static String treelink(String page, Object objectList)
           
static String url(String page, PageContext pageContext)
          MMBase url generation for EL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Functions

public Functions()
Method Detail

contains

public static boolean contains(Collection col,
                               Object obj)
MMBase specific 'contains' (for Collections). For strings use fn:contains.


remove

public static void remove(Collection col,
                          Object obj)
MMBase specific 'remove' (for Collections).


escapeString

public static String escapeString(String escaper,
                                  String string)
This version of escape(String, Object) simply asks for a string. This often work better in XSL {taglib:escape('text/xml', @link)} may otherwise give e.g. the toString of a NodeIterator, which we cannot recognize withouth introducing dependencies.

Since:
MMBase-1.8.7

escape

public static String escape(String escaper,
                            Object string)
Provides the 'escape' functionality of taglib. Can be used in EL (using mm:escape('p', value)) and XSLT (using taglib:escape('p', mytag))


directory

public static String directory(String file)

url

public static String url(String page,
                         PageContext pageContext)
MMBase url generation for EL

Since:
MMBase-1.8.2

link

public static String link(String page)
Since:
MMBase-1.8.5

managerProperty

public static Object managerProperty(String nodeManager,
                                     String name)
Since:
MMBase-1.8.6

moduleProperty

public static Object moduleProperty(String module,
                                    String name)
Since:
MMBase-1.8.6

property

public static Object property(String name)
Since:
MMBase-1.8.6

treefile

public static String treefile(String page,
                              PageContext pageContext,
                              Object objectList)
                       throws JspTagException,
                              IOException
Throws:
JspTagException
IOException
Since:
MMBase-1.8.4

treelink

public static String treelink(String page,
                              Object objectList)
                       throws JspTagException,
                              IOException
Throws:
JspTagException
IOException
Since:
MMBase-1.8.5

string

public static LocalizedString string(LocalizedString s)
Since:
MMBase-1.9

hasAlias

public static boolean hasAlias(Node node,
                               String alias)
Checks if the supplied node has the supplied alias

Parameters:
node - the MMBase node to check for existing alias
alias - Name of the alias to check
Returns:
true if the alias exists for the node or false if not

applicationContext

public static Map<String,String> applicationContext(String path)
Since:
MMBase-1.8.7


MMBase 2.0-SNAPSHOT - null