|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.ui.OwEventTarget
public abstract class OwEventTarget
EventTarget Base Class. Events are generated through requests and dispatched through the targets.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Constructor Summary | |
---|---|
OwEventTarget()
|
Method Summary | |
---|---|
void |
attach(OwAppContext context_p,
String strName_p)
attach the event target to the context |
void |
detach()
remove target |
void |
disableRequestListener()
remove from request listener registry current event target, the target must be already registered as event and request listener. |
void |
enableRequestListener()
register the event target to receive onRequest events the target must already be registered |
String |
getAjaxEventURL(String strEventName_p,
String strAdditionalParameters_p)
get a URL for the requested AJAX event without rendering |
OwAppContext |
getContext()
get the context reference |
String |
getEventURL(String strEventName_p,
String strAdditionalParameters_p)
get a URL for the requested event |
String |
getFormEventFunction(String strEventName_p,
String strAdditionalParameters_p)
get a script function for the requested event sending the form data defined in the event target with getFormName() |
String |
getFormEventURL(String strEventName_p,
String strAdditionalParameters_p)
get a URL for the requested event sending the form data defined in the event target with getFormName() |
String |
getFormName()
Get the form used for the edit fields. By default return null, should be overridden by derived classes |
OwEventTarget |
getFormTarget()
get the target, that is used for form data and renders form |
String |
getID()
get the ID of the target, every target has its unique id, used to dispatch requests among the targets in a context. |
protected abstract void |
init()
init the target after the context is set. |
void |
onExternalRequest(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
overridable to receive request notifications from external sources / links |
void |
onFormEvent(javax.servlet.http.HttpServletRequest request_p)
called before a form event is caught. |
boolean |
onRequest(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
overridable to receive request notifications to receive onRequest, the target must be registered with OwAppContext.registerRequestTarget |
void |
setExternalFormTarget(OwEventTarget eventtarget_p)
override the internal form with an external one, must be called BEFORE event target is attached. |
boolean |
updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p,
boolean fSave_p)
update the target after a form event, so it can set its form fields |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OwEventTarget()
Method Detail |
---|
protected abstract void init() throws Exception
Exception
public void attach(OwAppContext context_p, String strName_p) throws Exception
context_p
- Application context to attach tostrName_p
- Name / ID under which the Target gets registered
Exception
public void enableRequestListener() throws OwException
OwException
- if registration failspublic void disableRequestListener() throws OwException
OwException
- if de-register failspublic OwAppContext getContext()
public void detach()
public String getID()
public String getEventURL(String strEventName_p, String strAdditionalParameters_p)
strEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.
public String getAjaxEventURL(String strEventName_p, String strAdditionalParameters_p)
strEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.
public String getFormEventURL(String strEventName_p, String strAdditionalParameters_p)
strEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.
public String getFormEventFunction(String strEventName_p, String strAdditionalParameters_p)
strEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.
public String getFormName()
public void setExternalFormTarget(OwEventTarget eventtarget_p) throws Exception
eventtarget_p
- OwEventTarget to be used for form data
Exception
public boolean updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p, boolean fSave_p) throws Exception
request_p
- HttpServletRequestfSave_p
- boolean true = save the changes of the form data, false = just update the form data, but do not save
Exception
public void onFormEvent(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequest
Exception
- if getFormTarget()
update call failspublic OwEventTarget getFormTarget()
public boolean onRequest(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- HttpServletRequestresponse_p
- HttpServletResponse
Exception
public void onExternalRequest(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- HttpServletRequestresponse_p
- HttpServletResponse
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |