Menu

PprEvent

Barry Goodsell

PprEvent

Package [com.oaframework.toolkit.common.util]

The PprEvent class implements the [UiEvent] interface, to provide an object that represents Partial Page Rendering event. The class constructor is private; instances must be created by calling the static create method. This class effectively simplifies the means of identifying whether a PPR event has been fired or not. PprEvent's can also be used as parameters to some of the methods in the [Navigation] class.

getName()

Returns the name of the PprEvent.

create()

Static method to create a new PprEvent instance.

isTriggered()

Returns true if the Partial Page Rendering event has been fired.

Usage

Suppose that you have defined a poplist in your user interface which you want to fire a PPR Event when the value is changed:

import com.oaframework.toolkit.util.PprEvent;
import com.example.test.Navigation;

public class ExampleCO extends OAControllerImpl
{
  public static final PprEvent ORG_POPLIST = PprEvent.create("pprOrgPoplist");

  public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
    ....
  }

  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);

    if (ORG_POPLIST.isTriggered(pageContext))
    {
      // Handle PPR Event for the change of Poplist value
    }

  }
}

Related

Wiki: Navigation
Wiki: UiEvent
Wiki: com.oaframework.toolkit.common.util

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.