|
![]() |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsunlabs.brazil.template.Template
sunlabs.brazil.template.SetTemplate
sunlabs.brazil.template.MultipartSetTemplate (view source)
public class MultipartSetTemplate
Version of the SetTemplate that reflects form/multipart data
in Request.props.
For ordinary forms, the values placed into request.props
are the same as for forms of type www-url-encoded
, or
method=get
, as long as the query
option
is set.
For file input fields (e.g. <input type=file...>
),
the file content is associated with the field name, and the
properties
name.filename
,
name.type
,
and
name.encoding
are set to to the name of the file uploaded, its type, and
(unless noEncode
is set), the encoding, which is
either none (for text files), or Base64.
The file contents are automatically Base64 encoded for binary files.
Properties:
query
.
saveName
entry.
name
saveName
defaults to:
${prefix}-${fieldName}-${fileName}
Field Summary |
---|
Fields inherited from class sunlabs.brazil.template.Template |
---|
debug |
Constructor Summary | |
---|---|
MultipartSetTemplate()
|
Method Summary | |
---|---|
boolean |
init(RewriteContext hr)
Chain the session-id properties into the request chain, if there are any. |
void |
tag_get(RewriteContext hr)
Replace the tag "get" with the value of the variable specified by the "name" attribute. |
void |
tag_import(RewriteContext hr)
Import all the data from the named namespace. |
void |
tag_property(RewriteContext hr)
Convert the html tag "property" in to the request's property DEPRECATED - use "get" |
void |
tag_set(RewriteContext hr)
Set the value of a variable. |
void |
tag_slash_tag(RewriteContext hr)
Insert a literal ">" |
void |
tag_tag(RewriteContext hr)
Insert a literal "<". |
Methods inherited from class sunlabs.brazil.template.SetTemplate |
---|
doImport, file2path, init, load, respond, store, tag_namespace, tag_slash_namespace, tag_unimport |
Methods inherited from class sunlabs.brazil.template.Template |
---|
done |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultipartSetTemplate()
Method Detail |
---|
public boolean init(RewriteContext hr)
SetTemplate
init
in interface TemplateInterface
init
in class SetTemplate
public void tag_set(RewriteContext hr)
SetTemplate
Attributes:
tag_set
in class SetTemplate
public void tag_property(RewriteContext hr)
SetTemplate
tag_property
in class SetTemplate
public void tag_get(RewriteContext hr)
SetTemplate
Attributes:
max
characters.
Max must be at least one, and truncation occurs after
any conversions.
set
attribute, and not inserted into the
HTML stream. If none of "namespace", "convert", or "match"
is used, then this simply copies the property from one name
to another.
<get foo>
is equivalent to:
<get name="foo">
.
tag_get
in class SetTemplate
public void tag_import(RewriteContext hr)
SetTemplate
tag_import
in class SetTemplate
public void tag_tag(RewriteContext hr)
SetTemplate
<tag>a href=<property href></tag>
The [optional] attribute "name" may be used to specify the name of the tag, which will be emmitted just after the "<".
tag_tag
in class SetTemplate
public void tag_slash_tag(RewriteContext hr)
SetTemplate
tag_slash_tag
in class SetTemplate
|
Version Kenai-svn-r24, Generated 08/18/09 Copyright (c) 2001-2009, Sun Microsystems. |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |