|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.arsdigita.toolbox.ui.NullComponent
| Field Summary | |
static String |
versionId
|
| Fields inherited from interface com.arsdigita.bebop.Component |
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE |
| Constructor Summary | |
NullComponent()
|
|
| Method Summary | |
Iterator |
children()
Returns an iterator over the children of this component. |
void |
generateXML(PageState state,
Element parent)
Adds a DOM subtree representing this component under the given parent node. |
String |
getClassAttr()
Gets the class attribute. |
String |
getIdAttr()
Gets the id attribute. |
String |
getKey()
Retrieves the programmer-supplied key. |
String |
getStyleAttr()
Gets the style attribute. |
boolean |
isLocked()
Return whether an object is locked and thus immutable, or can still be modified. |
boolean |
isVisible(PageState state)
Determines whether the component is visible in the request represented by state. |
void |
lock()
Lock an object. |
void |
register(Form form,
FormModel model)
Registers form parameters with the form model for this form. |
void |
register(Page page)
Registers state parameters for the page with its model. |
void |
respond(PageState state)
Responds to the request. |
void |
setClassAttr(String clacc)
Sets the class attribute. |
void |
setIdAttr(String id)
Sets the id attribute. |
Component |
setKey(String key)
Supplies a key for making parameter names unique. |
void |
setStyleAttr(String style)
Sets the style attribute. |
void |
setVisible(PageState state,
boolean visible)
Changes the visibility of the component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String versionId
| Constructor Detail |
public NullComponent()
| Method Detail |
public void generateXML(PageState state,
Element parent)
ComponentAdds a DOM subtree representing this component under the given
parent node. Uses the request values stored in state.
generateXML in interface Componentstate - represents the current requestparent - the node under which the DOM subtree should be added
public void respond(PageState state)
throws javax.servlet.ServletException
ComponentResponds to the request. This method is only called if the request
was made from a link or form that the component put on the page in the
PageState.stateAsURL() previous request.
No output should be generated on the HTTP response. The component
can store intermediate results in the state by calling
setAttribute.
This method is called before any output is printed to the HTTP response so that the component can forward to a different page and thereby commit the response.
respond in interface Componentstate - represents the current request
javax.servlet.ServletExceptionpublic Iterator children()
Componentnull) iterator.
children in interface Componentpublic void register(Page page)
Componentparam would do
the following in the body of this method:
p.addComponent(this); p.addComponentStateParam(this, param);You should override this method to set the default visibility of your component:
public void register(Page p) {
super.register(p);
p.setVisibleDefault(childNotInitiallyShown,false);
p.setVisibleDefault(anotherChild, false);
}
Always call super.register when you override
register. Otherwise your component may
malfunction and produce errors like "Widget ... isn't
associated with any Form"
register in interface Component
public void register(Form form,
FormModel model)
Componentform
sections and widgets
(components that have a connection to an HTML form). Other
components can implement it as a no-op.
register in interface Componentpublic String getClassAttr()
Component
getClassAttr in interface ComponentComponent.setClassAttr(String),
Standard Attributespublic void setClassAttr(String clacc)
Component
setClassAttr in interface Componentclacc - a valid XML nameComponent.getClassAttr()public String getStyleAttr()
Component
getStyleAttr in interface ComponentComponent.setStyleAttr(java.lang.String),
Standard Attributespublic void setStyleAttr(String style)
Componentstyle should be a valid CSS
style, because its value will be copied verbatim to the output and
appear as a style attribute in the top level XML or HTML
output element.
setStyleAttr in interface Componentstyle - a valid CSS style description for use in the
style attribute of an HTML tagpublic String getIdAttr()
Component
getIdAttr in interface ComponentComponent.setIdAttr(String id)public void setIdAttr(String id)
Componentid
should be an XML name
that is unique within the Page in which this component is
contained. The value of id is copied literally to the
output and not used for internal processing.
setIdAttr in interface Componentid - a valid XML identifierpublic Component setKey(String key)
Component
setKey in interface Componentpublic String getKey()
Component
getKey in interface Componentpublic boolean isVisible(PageState state)
Componentstate.
isVisible in interface Componentstate - represents the current request
true if the component is visible in the request;
false otherwise.setVisible,
Description of Visibility
above
public void setVisible(PageState state,
boolean visible)
Component
setVisible in interface Componentstate - represents the current requestvisible - true if the component should be visiblepublic void lock()
LockablesetXXX method
should lead to an exception.
Most lockable Bebop classes throw an IllegalStateException if an attempt is made to modify a
locked instance.
lock in interface Lockablepublic boolean isLocked()
Lockable
isLocked in interface Lockable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||