Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.servlets.controls.content.backing
Class AbstractJspBacking

    java.lang.Object
      com.bea.netuix.servlets.controls.content.backing.AbstractJspBacking

All Implemented Interfaces
  JspBacking, Serializable

    public class AbstractJspBacking

extends Object
implements JspBacking

Abstract base class for all JSP backing files. This class provides the default implementation for all the methods specified in the `JspBacking` interface, and provides an additional method to determe if the request was initiated from within this portlet.

A backing file is a simple Java class implementing the JspBacking interface. Backing files work in conjunction with JSPs. The JSPs allow the developer to code the presentation logic, while the backing files allows the developer to code simple business logic. Backing files are always run before the JSPs. A backing file has a lifecycle with four methods (see below). These methods are run 'in order' on all objects. The developer may effect the underlying object from the `BackingContext`. The `BackingContext` should be used from the Backing file and the `PresentationContext` should be used from the JSPs.

Alternately the developer can implement the `JspBacking` file instead of extending this class.

See Also
  `JspBacking`, `BackingContext`, `PortletBackingContext`, `BookBackingContext`, `PageBackingContext`, Serialized Form

Field Summary
`protected static Debug` | `_debug`

Constructor Summary
`AbstractJspBacking()`

Method Summary
`void` | `dispose()` This method is called at the end of serving the request, after the JSP has rendered.
`boolean` | `handlePostbackData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` The purpose of this method is to let an implementation process request data.
`void` | `init(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` This method is called once per request, and backing files can do request-scoped initialization by implementing this method.
`protected boolean` | `isRequestTargeted(javax.servlet.http.HttpServletRequest request)` This method returns `true` if the current request is due an action within the window/portlet of this backing file.
`boolean` | `preRender(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` This method is called before rendering the JSP that this backing file is associated with.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _debug

    protected static Debug _debug

Constructor Detail

### AbstractJspBacking

    public AbstractJspBacking()

Method Detail

### init

    public void init(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)

  Description copied from interface: `JspBacking`

  This method is called once per request, and backing files can do request-scoped initialization by implementing this method. This method is run on the window (book/page/portlet) even if the window is not currently on a selected page.

  Specified by:
    `init` in interface `JspBacking`
  Parameters
    `request` - HTTP request
    `response` - HTTP response

### handlePostbackData

    public boolean handlePostbackData(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)

  Description copied from interface: `JspBacking`

  The purpose of this method is to let an implementation process request data.

  This method should return `true` if it changes the window mode, window state, or the current page. If the method returns true, any caches are invalidated, and event processing is run on this control.

  Specified by:
    `handlePostbackData` in interface `JspBacking`
  Parameters
    `request` - HTTP request
    `response` - HTTP response
  Returns
    boolean true if the window mode, state, or current page were changed

### preRender

    public boolean preRender(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)

  Description copied from interface: `JspBacking`

  This method is called before rendering the JSP that this backing file is associated with. This method will not be run if the book/page/portlet is not being rendered (displayed). This is useful if heavy business logic only needs to be run if this portlet is on a selected page.

  This method should return `true` to let the framework render the JSP. If this method returns `false`, the framework will not render the content JSP.

  Note: if you don't want the Window (book, page or portlet) to render at all, call `setVisible(false)` on the backing context.

  Specified by:
    `preRender` in interface `JspBacking`
  Parameters
    `request` - HTTP request
    `response` - HTTP response
  Returns
    boolean true if the content JSP should be rendered.
  See Also
    `BackingContext`, `PortletBackingContext`, `BookBackingContext`, `PageBackingContext`

### dispose

    public void dispose()

  Description copied from interface: `JspBacking`

  This method is called at the end of serving the request, after the JSP has rendered.

  Specified by:
    `dispose` in interface `JspBacking`

### isRequestTargeted

    protected boolean isRequestTargeted(javax.servlet.http.HttpServletRequest request)

  This method returns `true` if the current request is due an action within the window/portlet of this backing file. Returns `false` otherwise.

  Parameters
    `request` - HttpRequest
  Returns
    true if the request came from within this portlet

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.