|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.groiss.gui.HTMLPage
public class HTMLPage
Field Summary | |
---|---|
protected java.lang.String |
contentType
|
protected java.lang.String |
page
|
Constructor Summary | |
---|---|
HTMLPage()
This class can be used to construct HTML pages from templates and values. |
|
HTMLPage(java.lang.String resource)
Creates a HTMLPage with a content loaded from a file in classpath. |
|
HTMLPage(java.lang.String resource,
Resource res)
Creates a HTMLPage with a content loaded from a file in classpath. |
Method Summary | |
---|---|
java.lang.String |
getContentType()
This method returns the content type. |
void |
setContentType(java.lang.String type)
Set the content type. |
void |
setMask(java.lang.String s)
Deprecated. |
HTMLPage |
setPage(java.lang.String s)
Set the content of the page. |
java.lang.String |
show()
This method returns the page contents. |
void |
substEncoded(java.lang.String field,
java.lang.String value)
Substitutes the field named by the first argument with the second argument. |
void |
substitute(java.lang.String field,
long value)
Substitutes the field named by the first argument with the second argument. |
void |
substitute(java.lang.String field,
java.lang.Object value)
Substitutes the field named by the first argument with the second argument. |
void |
substitute(java.lang.String field,
java.lang.String value)
Substitutes the field named by the first argument with the second argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String page
protected java.lang.String contentType
Constructor Detail |
---|
public HTMLPage()
public HTMLPage(java.lang.String resource)
public HTMLPage(java.lang.String resource, Resource res)
Method Detail |
---|
public HTMLPage setPage(java.lang.String s)
s
- the content of the pagepublic void substitute(java.lang.String field, java.lang.String value)
field
- the place-holdervalue
- the value to be insertedpublic void substEncoded(java.lang.String field, java.lang.String value)
field
- the place-holdervalue
- the value to be insertedpublic void substitute(java.lang.String field, long value)
field
- the place-holdervalue
- the value to be insertedpublic void substitute(java.lang.String field, java.lang.Object value)
field
- the place-holdervalue
- the value to be inserted, toString is called on the object.public java.lang.String show()
show
in interface Page
public java.lang.String getContentType()
getContentType
in interface Page
public void setContentType(java.lang.String type)
type
- the content type, for example "text/plain"@Deprecated public void setMask(java.lang.String s)
s
- the template of the page
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |