|
||||||||||
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 | |
---|---|
String |
decoded(String s)
Decode a UTF-8 URL encoded string. |
String |
encoded(String s)
Encode a String as a UTF-8 URL. |
String |
escaped(Persistent o)
Get the DisplayString of a Persistent and
escape that using the current locale and a MEDIUM DateFormat. |
String |
escaped(String s)
Escape a String. |
AttributeMarkupLanguage |
getAttr()
The AttributeMarkupLanguage associated with this MarkupLanguage. |
String |
getName()
Get the name of this Markup Language. |
String |
input(Field field)
Get an input widget for this Field. |
String |
inputAs(Field field,
String templetName)
Get an input widget for this Field defined by name. |
String |
rendered(Field field,
int style)
Render a Field Object in a MarkupLanguage specific way, returning a String. |
String |
rendered(Field field,
int style,
int limit)
Render a Field Object in a MarkupLanguage specific way, returning a String. |
String |
rendered(Object o)
Render an Object in a MarkupLanguage specific way, returning a String. |
String |
rendered(String s,
int limit)
Render a String in a MarkupLanguage specific way, limiting it's length. |
String |
renderedMarkup(String s)
|
String |
renderedStart(Field field)
Render a Date Field Object in a MarkupLanguage specific way, returning a START Date format String. |
String |
searchInput(Field field,
String nullValue)
Get an input widget for this Field specifying the null value. |
Method Detail |
---|
AttributeMarkupLanguage getAttr()
String getName()
String rendered(Object o)
o
- - the Object to be rendered
String renderedMarkup(String s)
s
- markup fragment to render
String rendered(String s, int limit)
s
- - the string to be renderedlimit
- - the lenght to trim the string to
String rendered(Field field, int style) throws TemplateEngineException
field
- - the Field to be renderedstyle
- - a style to format this Field.
TemplateEngineException
- - if there is a problem with the
ServletTemplateEngine(java.lang.Object,org.melati.poem.PoemLocale, int)
String rendered(Field field, int style, int limit) throws TemplateEngineException
field
- - the Field to be renderedstyle
- - a DateFormat style to format this Field.limit
- - the length to trim the rendered string to
TemplateEngineException
- - if there is a problem with the
ServletTemplateEngineString renderedStart(Field field)
field
- - the Field to be rendered
(java.lang.Object,org.melati.poem.PoemLocale, int)
String input(Field field) throws TemplateEngineException, NotFoundException
field
- The Field
NotFoundException
- if template not found
TemplateEngineException
String inputAs(Field field, String templetName) throws TemplateEngineException, NotFoundException
field
- The FieldtempletName
- the templet to use instead of the default
NotFoundException
- if template not found
TemplateEngineException
String searchInput(Field field, String nullValue) throws TemplateEngineException, NotFoundException
field
- The FieldnullValue
- the value to use for null for example in a dropdown.
NotFoundException
- if template not found
TemplateEngineException
String escaped(String s)
s
- the String to escape
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
-
String encoded(String s)
s
- the String to encode
String decoded(String s)
s
-
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |