org.jscience.sociology.forms.view
Interface ContentGenerator

All Known Implementing Classes:
SimpleContentGenerator

public interface ContentGenerator

Defines the interface for a class that will be responsible for
a- generating form presentation
b- forwarding the request to the form's "action"
This interface gives the user freedom to apply all kinds of presentation techniques.

org.jscience.sociology.forms.util.SimpleContentGenerator is an implementing class that can be used for building presentation with JSP/JavaBeans/Tag Libraries.

See Also:
SimpleContentGenerator

Method Summary
 void forwardToFormAction(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Form form)
          This method is responsible for doing the clean up work and forwarding the request to be processed.
 void sendFormContent(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Form form)
          This method is responsible for generating form presentation and sending it back to client.
 

Method Detail

sendFormContent

void sendFormContent(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp,
                     Form form)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This method is responsible for generating form presentation and sending it back to client. By implementing this method, the user is free to apply his own presentation technique.

Parameters:
req - the HttpServletRequest object.
resp - the HttpServletResponse object.
form - the Form object going to be presented.
Throws:
javax.servlet.ServletException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!

forwardToFormAction

void forwardToFormAction(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp,
                         Form form)
                         throws javax.servlet.ServletException,
                                java.io.IOException
This method is responsible for doing the clean up work and forwarding the request to be processed.

Parameters:
req - the HttpServletRequest object.
resp - the HttpServletResponse object.
form - the Form object that was presented.
Throws:
javax.servlet.ServletException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!