|
WEB4J Development Tools 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objecthirondelle.web4jtools.util.Functions
public final class Functions
Utility functions called from JSPs, using JSTL functions.
Most of these functions are related to code generation. If the formatting provided by this class is not adequate for your needs, you will need to change its implementation.
These items are referenced in web4j.tld. Since these functions are mostly used in pages served as plain text, it is appropriate that they return String instead of SafeText.
The text passed as incoming argument to these methods should be in a 'natural text' style, as in 'Jet Engine', and not formatted in any special way (such as 'JetEngine' or 'JET_ENGINE').
Method Summary | |
---|---|
static String |
asArgument(String aFieldName)
Format as an argument to a method or a constructor: aLikeThis. |
static String |
asConstant(String aFeatureName)
Format as a Java constant : LIKE_THIS. |
static String |
asControl(Field aField)
Present a field as a complete HTML form control. |
static String |
asDbIdentifier(String aFieldName)
Format as a table or column name in an SQL statement: LikeThis. |
static String |
asELIdentifier(String aFieldName)
Format as a JSP Expression Language reference to an object or a property: likeThis. |
static String |
asField(String aFieldName)
Format as an object field reference: fLikeThis. |
static String |
asLocal(String aName)
Format as a local object in the body of a method: likeThis. |
static String |
asType(String aText)
Format as a Java class name identifier : LikeThis. |
static String |
checks(Field aField)
Generate text snippet used for performing validations with the Check class. |
static String |
fileURL(String aFileName)
Return a file:// URI for the given file. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String asConstant(String aFeatureName)
Any spaces are replaced with an underscore, and the text is converted to upper case.
public static String asType(String aText)
Any spaces are removed.
public static String asArgument(String aFieldName)
public static String asField(String aFieldName)
public static String asDbIdentifier(String aFieldName)
public static String asELIdentifier(String aFieldName)
public static String asLocal(String aName)
public static String asControl(Field aField)
public static String checks(Field aField)
'Check.range(1, 100), Check.isRegex()'
public static String fileURL(String aFileName)
|
WEB4J Development Tools 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |