borland Packages  Class Hierarchy  internetbeans Package 

IxPageProducer class

java.lang.Object
   +----com.borland.internetbeans.PageProducer
           +----com.borland.internetbeans.IxPageProducer

About the IxPageProducer class

Variables  Properties  Methods

Implements Binder, Renderable, Serializable, Cloneable

Note: This package is a feature of JBuilder Professional and Enterprise.

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.

Rendering pages

To render the session-specific view of a page inside the HttpServlet.doGet (or doPost), include the call:

  ixPageProducer.servletGet( this, request, response );

Handling request parameters

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.

Handling submit events

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();
  }

IxPageProducer variables

Variables implemented in com.borland.internetbeans.PageProducer

IxPageProducer properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in com.borland.internetbeans.PageProducer

Properties implemented in java.lang.Object

IxPageProducer methods

Methods implemented in this class

Methods implemented in com.borland.internetbeans.PageProducer

Methods implemented in java.lang.Object


IxPageProducer properties

dataModule

 public DataModule getDataModule()
 public void setDataModule(DataModule newDataModule)
Creates a DataModuleTupleModel for a DataModule and associates it with the page.

Parameters:

newDataModule
The DataModule that's providing the dataSets used by the components bound to the PageProducer.

tupleModel

 public void setTupleModel(TupleModel newTupleModel)
Associates a data model with the page.

Parameters:

newTupleModel
The data model for the components bound to the PageProducer

IxPageProducer methods

getSessionComponent(javax.servlet.http.HttpSession, component)

  public IxComponent getSessionComponent(HttpSession session, IxComponent component)
Returns the instance of a particular component that was replicated for the session.

Parameters:

session
The user session to search
component
The original component assigned to the IxPageProducer

getSessionDataModule(javax.servlet.http.HttpSession)

  public DataModule getSessionDataModule(HttpSession session)
Returns the instance of the DataModule that was replicated for the session.

getSessionDataSet(javax.servlet.http.HttpSession)

  public DataSet getSessionDataSet(HttpSession session)
Returns the instance of the DataSet that was replicated for the session.

getSessionTupleModel(javax.servlet.http.HttpSession)

  public TupleModel getSessionTupleModel(HttpSession session)
Returns the instance of the TupleModel that was replicated for the session.

postFields(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession)

  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.

Parameters:

request
The request object
session
The properly-initialized user session

servletGet(javax.servlet.http.HttpServlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

  public void servletGet(HttpServlet servlet, HttpServletRequest request, HttpServletResponse response)
Performs basic HTTP GET processing:

Parameters:

servlet
The servlet instance making the request
request
The request object passed to the servlet's service method by the servlet container
response
The response object passed to the servlet's service method by the servlet container

servletPost(javax.servlet.http.HttpServlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

  public void servletPost(HttpServlet servlet, HttpServletRequest request, HttpServletResponse response)
Performs basic HTTP POST processing:

Parameters:

servlet
The servlet instance making the request
request
The request object passed to the servlet's service method by the servlet container
response
The response object passed to the servlet's service method by the servlet container