|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MarkupLanguage
MarkupLanguage provides a variety of methods for rendering objects in a template. Each object to be rendered has 3 methods: 1 - String rendered(Object o) - this will render the object to a String 2 - void render(Object o) - renders the object to melati.getWriter() 3 - void render(Object o, MelatiWriter w) - render the object to w. When this class was written it was thought that for maximum efficiency one should render the object direct to the output stream using method (2) above. However now all but (1) is deprecated.
| Method Summary | |
|---|---|
java.lang.String |
decoded(java.lang.String s)
Decode a UTF-8 URL encoded string. |
java.lang.String |
encoded(java.lang.String s)
Encode a String as a UTF-8 URL. |
java.lang.String |
escaped(Persistent o)
Get the DisplayString of a Persistent and
escape that using the current locale and a MEDIUM DateFormat. |
java.lang.String |
escaped(java.lang.String s)
Escape a String. |
AttributeMarkupLanguage |
getAttr()
The AttributeMarkupLanguage associated with this MarkupLanguage. |
java.lang.String |
getName()
Get the name of this Markup Language. |
java.lang.String |
input(Field field)
Get an input widget for this Field. |
java.lang.String |
inputAs(Field field,
java.lang.String templetName)
Get an input widget for this Field defined by name. |
java.lang.String |
rendered(Field field,
int style)
Render a Field Object in a MarkupLanguage specific way, returning a String. |
java.lang.String |
rendered(Field field,
int style,
int limit)
Render a Field Object in a MarkupLanguage specific way, returning a String. |
java.lang.String |
rendered(java.lang.Object o)
Render an Object in a MarkupLanguage specific way, returning a String. |
java.lang.String |
rendered(java.lang.String s,
int limit)
Render a String in a MarkupLanguage specific way, limiting it's length. |
java.lang.String |
renderedMarkup(java.lang.String s)
|
java.lang.String |
renderedStart(Field field)
Render a Date Field Object in a MarkupLanguage specific way, returning a START Date format String. |
java.lang.String |
searchInput(Field field,
java.lang.String nullValue)
Get an input widget for this Field specifying the null value. |
| Method Detail |
|---|
AttributeMarkupLanguage getAttr()
java.lang.String getName()
java.lang.String rendered(java.lang.Object o)
throws java.io.IOException
o - - the Object to be rendered
java.io.IOException - - if there is a problem during rendering
java.lang.String renderedMarkup(java.lang.String s)
throws java.io.IOException
s - markup fragment to render
java.io.IOException - if there is a problem during rendering
java.lang.String rendered(java.lang.String s,
int limit)
throws java.io.IOException
s - - the string to be renderedlimit - - the lenght to trim the string to
java.io.IOException - - if there is a problem during rendering
java.lang.String rendered(Field field,
int style)
throws TemplateEngineException,
java.io.IOException
field - - the Field to be renderedstyle - - a style to format this Field.
java.io.IOException - - if there is a problem during rendering
TemplateEngineException - - if there is a problem with the
ServletTemplateEngine(java.lang.Object,org.melati.poem.PoemLocale, int)
java.lang.String rendered(Field field,
int style,
int limit)
throws TemplateEngineException,
java.io.IOException
field - - the Field to be renderedstyle - - a DateFormat style to format this Field.limit - - the length to trim the rendered string to
java.io.IOException - - if there is a problem during rendering
TemplateEngineException - - if there is a problem with the
ServletTemplateEngine
java.lang.String renderedStart(Field field)
throws java.io.IOException
field - - the Field to be rendered
java.io.IOException - - if there is a problem during rendering(java.lang.Object,org.melati.poem.PoemLocale, int)
java.lang.String input(Field field)
throws TemplateEngineException,
java.io.IOException,
NotFoundException
field - The Field
NotFoundException - if template not found
TemplateEngineException
java.io.IOException
java.lang.String inputAs(Field field,
java.lang.String templetName)
throws TemplateEngineException,
java.io.IOException,
NotFoundException
field - The FieldtempletName - the templet to use instead of the default
NotFoundException - if template not found
TemplateEngineException
java.io.IOException
java.lang.String searchInput(Field field,
java.lang.String nullValue)
throws TemplateEngineException,
java.io.IOException,
NotFoundException
field - The FieldnullValue - the value to use for null for example in a dropdown.
NotFoundException - if template not found
TemplateEngineException
java.io.IOExceptionjava.lang.String escaped(java.lang.String s)
s - the String to escape
java.lang.String escaped(Persistent o)
Persistent and
escape that using the current locale and a MEDIUM DateFormat.
See org/melati/admin/SelectionWindowSelection.wm
See org/melati/admin/Update.wm
o -
java.lang.String encoded(java.lang.String s)
s - the String to encode
java.lang.String decoded(java.lang.String s)
s -
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||