|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tonbeller.wcf.component.ComponentSupport
default implementation of a component
Field Summary |
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable |
EXTENSIONAL, INTENSIONAL |
Constructor Summary | |
ComponentSupport(java.lang.String id,
Component parent)
creates a component |
Method Summary | |
void |
addFormListener(FormListener listener)
|
void |
destroy(javax.servlet.http.HttpSession session)
called on session timeout or when the component is not used any more |
java.lang.Object |
getBookmarkState(int levelOfDetail)
returns a Map. |
Dispatcher |
getDispatcher()
returns a Dispatcher for this component. |
Form |
getForm()
Deprecated. Component implements Form directly |
java.lang.String |
getId()
|
java.util.Locale |
getLocale()
|
protected java.lang.String |
getNextView()
|
Component |
getParent()
returns the parent component as specified by initialize() or null, if this is the root component |
java.lang.String |
getRoleExpr()
name of a role, optionally prefixed by "!". |
void |
initialize(RequestContext context)
called once when the component is created. |
boolean |
isAutoValidate()
|
boolean |
isListeningTo(java.util.Map httpParams)
|
boolean |
isVisible()
true, if this component should be rendered |
void |
removeFormListener(FormListener listener)
|
void |
request(RequestContext context)
notified by a Dispatcher for specific HTTP Requests |
void |
revert(RequestContext context)
reverts this component to model values |
void |
setAutoValidate(boolean autoValidate)
|
void |
setBookmarkState(java.lang.Object state)
restores the visible attribute from the map |
void |
setId(java.lang.String string)
|
void |
setNextView(java.lang.String uri)
forwards to another page |
void |
setParent(Component parent)
sets the parent. |
void |
setRoleExpr(java.lang.String roleExpr)
|
void |
setVisible(boolean b)
true, if this component should be rendered |
boolean |
validate(RequestContext context)
validates user input and updates the model |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent e)
empty |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent ev)
calls destroy on the component |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.tonbeller.wcf.component.Renderable |
render |
Constructor Detail |
public ComponentSupport(java.lang.String id, Component parent)
id
- the id for the session attribute of this componentMethod Detail |
public Dispatcher getDispatcher()
Dispatcher
for this component. The dispatcher is local
to this component (i.e. the component may clear()
it). The dispatcher
is registered with the Controller and functional.
public void initialize(RequestContext context) throws java.lang.Exception
initialize
in interface LifeCycle
java.lang.Exception
destroy(javax.servlet.http.HttpSession)
,
valueBound(javax.servlet.http.HttpSessionBindingEvent)
,
ComponentTag.doEndTag()
public void destroy(javax.servlet.http.HttpSession session) throws java.lang.Exception
destroy
in interface LifeCycle
java.lang.Exception
initialize(com.tonbeller.wcf.controller.RequestContext)
,
valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
public void request(RequestContext context) throws java.lang.Exception
RequestListener
request
in interface RequestListener
context
- the current request
java.lang.Exception
public void valueBound(javax.servlet.http.HttpSessionBindingEvent e)
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent ev)
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
public java.lang.String getId()
public boolean isVisible()
isVisible
in interface Visible
public void setVisible(boolean b)
setVisible
in interface Visible
b
- public Form getForm()
Form
for this component. The Form
is local to
this component.
public void setId(java.lang.String string)
string
- public java.util.Locale getLocale()
public java.lang.String getRoleExpr()
RoleExprHolder
getRoleExpr
in interface RoleExprHolder
public void setRoleExpr(java.lang.String roleExpr)
setRoleExpr
in interface RoleExprHolder
roleExpr
- public java.lang.Object getBookmarkState(int levelOfDetail)
getBookmarkState
in interface Bookmarkable
levelOfDetail
- INTENSIONAL or EXTENSIONAL
public void setBookmarkState(java.lang.Object state)
setBookmarkState
in interface Bookmarkable
state
- a mappublic void addFormListener(FormListener listener)
addFormListener
in interface Form
listener
- public void removeFormListener(FormListener listener)
removeFormListener
in interface Form
listener
- public void revert(RequestContext context)
FormListener
revert
in interface FormListener
context
- public boolean validate(RequestContext context)
FormListener
validate
in interface FormListener
context
-
public Component getParent()
Component
getParent
in interface Component
public void setParent(Component parent)
parent
- The parent to set.public void setNextView(java.lang.String uri)
setNextView
in interface Component
uri
- if uri starts with "/" it will be interpreted
as context relative path (i.e. the context will be prepended),
otherwise it will be interpreted as relative to the current
page.protected java.lang.String getNextView()
public boolean isAutoValidate()
public void setAutoValidate(boolean autoValidate)
autoValidate
- The autoValidate to set.public boolean isListeningTo(java.util.Map httpParams)
isListeningTo
in interface Component
httpParams
- map of http parameters that may identify a RequestListener of this component
httpParams
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |