|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Basic interface that all page controls must implement. In addition to implementing this interface, a page control must also be serializable.
Although not required, it is recommended that custom page controls inherit from AgpControlBase. AgpControlBase, together with its base class AgpTag, provide a convenient base implementation for serialization and HTML generation.
Method Summary | |
void |
generateHTML(String namespace,
PrintWriter writer)
Generates the HTML that the server should return to the browser for rendering at run-time. |
String |
getPrefix()
Returns the prefix of the default name for the control. |
int |
notifyPageLoaded(AgpPage parentpage,
AgiHttpServletRequest req,
AgiHttpServletResponse resp)
Invoked when the page is first loaded. |
void |
notifyPageRequestBegin(AgiHttpServletRequest req,
AgiHttpServletResponse resp)
Invoked when the page request is begun. |
void |
notifyPageRequestEnd(AgiHttpServletRequest req,
AgiHttpServletResponse resp)
Invoked each time that a request is finished. |
AgiPageSubmitProcessor |
notifyPostValue(String name,
String value)
Handles any processing of new values. |
AgiPageSubmitProcessor |
notifyPostValues(String name,
String[] values)
Invoked when an HTTP POST request includes a multi-valued field falling under the namespace of this control. |
Method Detail |
public String getPrefix()
public int notifyPageLoaded(AgpPage parentpage, AgiHttpServletRequest req, AgiHttpServletResponse resp) throws IOException, ServletException
parentpage
- the parent page.req
- a servlet request.resp
- a servlet reqponse.This method must return an OR'ed set of flags indicating what other interface methods it would like to be called on:
NOTIFY_REQUEST_BEGIN
- notifies this control when the page is requestedNOTIFY_REQUEST_END
- notifies this control when the page completed a requestNOTIFY_POST_VALUE_ALWAYS
- notifies this control always when all posted values are deliveredGENERATE_HTML
- notifies this control to generate its HTML.AgiPageControl.notifyPageRequestBegin(AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPageRequestEnd(AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPostValue(String name, String value)
public void notifyPageRequestBegin(AgiHttpServletRequest req, AgiHttpServletResponse resp) throws IOException, ServletException
req
- a servlet request.resp
- a servlet response.AgiPageControl.notifyPageLoaded(AgpPage parentpage, AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPageRequestEnd(AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPostValue(String name, String value)
public void notifyPageRequestEnd(AgiHttpServletRequest req, AgiHttpServletResponse resp) throws IOException, ServletException
req
- a servlet request.resp
- a servlet response.AgiPageControl.notifyPageLoaded(AgpPage parentpage, AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPageRequestBegin(AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPostValue(String name, String value)
public void generateHTML(String namespace, PrintWriter writer) throws IOException, ServletException
namespace
- name anything in HTML using this namespace.
If this is a simple control, the namespace may be used as the name.PrintWriter
- a character output stream.This Java code fragment generates the current date-time and put it in a square bracket:
writer.write("[" + new Date() + "]");
public AgiPageSubmitProcessor notifyPostValue(String name, String value) throws IOException, ServletException
name
- the namespace has been stripped off from the name.value
- the value.AgiPageControl.notifyPageLoaded(AgpPage parentpage, AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPageRequestBegin(AgiHttpServletRequest req, AgiHttpServletResponse resp)
,
AgiPageControl.notifyPageRequestEnd(AgiHttpServletRequest req, AgiHttpServletResponse resp)
public AgiPageSubmitProcessor notifyPostValues(String name, String[] values) throws IOException, ServletException
name
- The namespace has been stripped off
from the name.values
- The value as an array of strings (String[])
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |