wicket.util.string.interpolator
Class PropertyVariableInterpolator
java.lang.Object
wicket.util.string.interpolator.VariableInterpolator
wicket.util.string.interpolator.PropertyVariableInterpolator
public final class PropertyVariableInterpolator
- extends VariableInterpolator
Interpolates values into strings that are produced by interpreting property
expressions against a beans model.
The interpolate(String string, Object model) method takes a string such as
"My name is ${name}" and a beans model such as a Person, and reflects on the
object using any property expressions found inside ${} markers in the string.
In this case, if the Person model had a getName() method, the results of
calling that method would be substituted for ${name}. If getName() returned
Jonathan, interpolate() would then return "My name is Jonathan".
- Author:
- Jonathan Locke
|
Method Summary |
protected java.lang.String |
getValue(java.lang.String variableName)
Gets a value for a variable name during interpolation |
static java.lang.String |
interpolate(java.lang.String string,
java.lang.Object object)
Interpolates string, substituting values for property expressions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
interpolate
public static java.lang.String interpolate(java.lang.String string,
java.lang.Object object)
- Interpolates string, substituting values for property expressions
- Parameters:
string - String containing property expressions like ${xyz}object - The object to reflect on
- Returns:
- The interpolated string
getValue
protected java.lang.String getValue(java.lang.String variableName)
- Gets a value for a variable name during interpolation
- Specified by:
getValue in class VariableInterpolator
- Parameters:
variableName - The variable
- Returns:
- The value
Copyright © 2004-2007 Wicket developers. All Rights Reserved.