|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlNativeComponent
public class HtmlNativeComponent
A comonent used to represent XML elements that are associated with the inline namespace (http://www.zkoss.org/2005/zk/inline).
It contains the content that shall be sent directly to client.
It has three parts: prolog, children and epilog.
The prolog (getPrologContent()) and epilog (getEpilogContent())
are both String.
When this component is renderred (redraw(java.io.Writer)), it generates
the prolog first, the children and then the epilog.
| Nested Class Summary | |
|---|---|
static class |
HtmlNativeComponent.HtmlHelper
The HTML helper. |
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
AbstractComponent.Children |
| Nested classes/interfaces inherited from interface org.zkoss.zk.ui.ext.Native |
|---|
Native.Helper |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
_visible |
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Constructor Summary | |
|---|---|
HtmlNativeComponent()
Contructs a HtmlNativeComponent component. |
|
HtmlNativeComponent(java.lang.String tag)
Constructs a HtmlNativeComponent component with the specified tag name. |
|
HtmlNativeComponent(java.lang.String tag,
java.lang.String prolog,
java.lang.String epilog)
Contructs a HtmlNativeComponent component with the specified
prolog ad epilog. |
|
| Method Summary | |
|---|---|
void |
addDeclaredNamespace(Namespace ns)
Adds a declared namespace. |
java.util.List |
getDeclaredNamespaces()
Returns a readonly list of the declared namespaces ( Namespace), or empty if no declared namespace. |
java.lang.Object |
getDynamicProperty(java.lang.String name)
Returns the property value of the specified name. |
java.lang.String |
getEpilogContent()
Returns the epilog content. |
Native.Helper |
getHelper()
Returns the helper to generate the output of the native components. |
java.lang.String |
getPrologContent()
Returns the prolog content. |
java.lang.String |
getTag()
Returns the tag name, or null if plain text. |
boolean |
hasDynamicProperty(java.lang.String name)
Returns whether a dynamic property is defined. |
boolean |
hasTag(java.lang.String tag)
Returns whether the specified tag is allowed. |
void |
redraw(java.io.Writer out)
Redraws this component. |
void |
setDynamicProperty(java.lang.String name,
java.lang.Object value)
Sets a property with the specified name and value. |
void |
setEpilogContent(java.lang.String epilog)
Sets the epilog content. |
void |
setId(java.lang.String id)
Sets the ID. |
void |
setPrologContent(java.lang.String prolog)
Sets the prolog content. |
void |
setTag(java.lang.String tag)
Sets the tag name. |
boolean |
setVisible(boolean visible)
Sets whether this component is visible. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlNativeComponent()
HtmlNativeComponent component.
public HtmlNativeComponent(java.lang.String tag)
HtmlNativeComponent component with the specified tag name.
tag - the tag name. If null or empty, plain text is assumed.
public HtmlNativeComponent(java.lang.String tag,
java.lang.String prolog,
java.lang.String epilog)
HtmlNativeComponent component with the specified
prolog ad epilog.
| Method Detail |
|---|
public java.lang.String getTag()
public java.util.List getDeclaredNamespaces()
NativeNamespace), or empty if no declared namespace.
getDeclaredNamespaces in interface Nativepublic void addDeclaredNamespace(Namespace ns)
Native
addDeclaredNamespace in interface Nativens - the namespace (never null).public java.lang.String getPrologContent()
NativeDefault: empty ("").
getPrologContent in interface Nativepublic void setPrologContent(java.lang.String prolog)
Native
setPrologContent in interface Nativepublic java.lang.String getEpilogContent()
NativeDefault: empty ("").
getEpilogContent in interface Nativepublic void setEpilogContent(java.lang.String epilog)
Native
setEpilogContent in interface Nativepublic Native.Helper getHelper()
Native
getHelper in interface Nativepublic void setId(java.lang.String id)
ComponentComponent.getId() for more details.
When a component is constructed, an ID is generated automatically. Thus, calling this method only you need to identify a component.
setId in interface ComponentsetId in class AbstractComponentid - the identifier. It cannot be empty.
If null, it means the previous ID is removed (aka., reset)
and an anonymous ID is assigned.Pagepublic boolean setVisible(boolean visible)
Component
setVisible in interface ComponentsetVisible in class AbstractComponent
public void redraw(java.io.Writer out)
throws java.io.IOException
AbstractComponentAbstractComponent.getMoldURI() to retrieve the mold
to redraw. The mold is either an URI (String) or a
ComponentRenderer instance.
Execution.include(java.io.Writer, java.lang.String, java.util.Map, int) to generate
the output.ComponentRenderer instance, ComponentRenderer.render(org.zkoss.zk.ui.Component, java.io.Writer)
is called to generate the output.
redraw in interface Componentredraw in class AbstractComponentjava.io.IOException
public void setTag(java.lang.String tag)
throws WrongValueException
setTag in interface DynamicTagtag - the tag name. If null or empty, plain text is assumed.
WrongValueExceptionpublic boolean hasTag(java.lang.String tag)
DynamicTag
hasTag in interface DynamicTagpublic boolean hasDynamicProperty(java.lang.String name)
DynamicPropertied
hasDynamicProperty in interface DynamicPropertiedpublic java.lang.Object getDynamicProperty(java.lang.String name)
DynamicPropertied
getDynamicProperty in interface DynamicPropertied
public void setDynamicProperty(java.lang.String name,
java.lang.Object value)
throws WrongValueException
DynamicPropertiedIf a component supports only String-type values, it could use org.zkoss.lang.Objects.toString() to convert the value to a String instance.
setDynamicProperty in interface DynamicPropertiedWrongValueException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||