borland Packages Class Hierarchy internetbeans Package
java.lang.Object +----com.borland.internetbeans.PageProducer +----com.borland.internetbeans.IxPageProducer
Variables Properties Methods
Implements Binder, Renderable, Serializable, Cloneable
Data- and servlet-aware component for rendering template pages with dynamic content.
This component is usually instantiated as a member of a servlet. Other
Ix controls are also instantiated, and assigned to the IxPageProducer
.
All the required data and template page hookup is performed during servlet
initialization. The IxPageProducer
performs the necessary session
management to track users and present them with their view of the data.
When using data from a DataExpress DataModule
, you must also
assign it to the IxPageProducer
's dataModule
property
to enable automatic session management.
To render the session-specific view of a page inside the
HttpServlet.doGet
(or doPost
), include the call:
ixPageProducer.servletGet( this, request, response );
To automatically apply parameter values in the HttpServlet.doPost
(or doGet
), include the call:
ixPageProducer.servletPost( this, request, response );
In the doPost
, the call to servletPost
is
usually followed by a call to the servlet's doGet
to
redisplay the same page updated, or a redirect to another page to
indicate the success or failure of the parameter posting.
The final action of servletPost
is to determine if
a parameter in the request matches an IxSubmitButton
assigned to the IxPageProducer
. If so, the submitPerformed
event of that component is fired with a SubmitEvent
object.
A typical event handler will require session-specific data model
instance to perform the appropriate action. Use the appropriate
IxPageProducer
method to get that instance. For example,
when using a single DataSet
, the event handler for a
Next button would minimally be:
void nextButton_submitPerformed( SubmitEvent e ) { ixPageProducer.getSessionDataSet( e.getSession() ).next(); }
public DataModule getDataModule() public void setDataModule(DataModule newDataModule)Creates a
DataModuleTupleModel
for a DataModule
and associates it with the page.
newDataModule
DataModule
that's providing the dataSets used by the components bound to the PageProducer.
public void setTupleModel(TupleModel newTupleModel)Associates a data model with the page.
newTupleModel
public IxComponent getSessionComponent(HttpSession session, IxComponent component)Returns the instance of a particular component that was replicated for the session.
session
component
IxPageProducer
public DataModule getSessionDataModule(HttpSession session)Returns the instance of the
DataModule
that was replicated for the session.
public DataSet getSessionDataSet(HttpSession session)Returns the instance of the
DataSet
that was replicated for the session.
public TupleModel getSessionTupleModel(HttpSession session)Returns the instance of the
TupleModel
that was replicated for the session.
protected void postFields(HttpServletRequest request, HttpSession session)Performs the request parameter processing, writing values to fields, matching the submit control, and firing the submit event.
request
session
public void servletGet(HttpServlet servlet, HttpServletRequest request, HttpServletResponse response)Performs basic HTTP GET processing:
HttpSession
for user request, if necessary.
servlet
request
response
public void servletPost(HttpServlet servlet, HttpServletRequest request, HttpServletResponse response)Performs basic HTTP POST processing:
IxSubmitButton
was used to submit the form; if so, fires its submitPerformed
event.
servlet
request
response