Class PageBean

java.lang.Object
org.eclnt.jsfserver.pagebean.PageBean
All Implemented Interfaces:
IPageBean, IDynamicContentBindingObject
Direct Known Subclasses:
DefaultDispatchedPageBean, DefaultScreens, DynBeanTreeUI, DynBeanUI, GridDetails, KEYSELECTORBinding, LogViewer, PageBeanComponentBase, ServerFileBrowser, StreamStoreNewContentUI, WorkpageContainerRendererIconSelectorRight, WorkpageContainerRendererStackedPane, WorkpageContainerRendererVerticalMiniView, WorkpageContainerRendererViaHideablePane

public abstract class PageBean extends Object implements IPageBean, IDynamicContentBindingObject
Default implementation of interface IPageBean.

This typically is the central class you derive yout straigh page bean implementations from. - If your pages need direct access to the workplace management (which is an optional addon!), then you WorkpageDispatchedPageBean as base of your classes.
  • Field Details

  • Constructor Details

    • PageBean

      public PageBean()
  • Method Details

    • getPageName

      public abstract String getPageName()
      Description copied from interface: IPageBean
      Name of page that is managed by the bean. This can either be a static return value that stays fix for the whole lifecycle of the bean, or it may also be a value that changed - in case there are several pages that are possible to be managed by the page bean.
      Specified by:
      getPageName in interface IPageBean
    • getRootExpressionUsedInPage

      public abstract String getRootExpressionUsedInPage()
      Description copied from interface: IPageBean
      Inside the page definition the bean is addressed via a certain root expression - e.g. "#{d.XYZBean}". The page bean management requires this expression in order to execute certain expression replacements when loading the page at runtime.
      Specified by:
      getRootExpressionUsedInPage in interface IPageBean
    • getPageModifier

      public final IPageModifier getPageModifier()
      Description copied from interface: IPageBean
      Function to update the layout XML that is read by the page bean.
      Specified by:
      getPageModifier in interface IPageBean
    • getActualRootExpression

      public final String getActualRootExpression()
      This method is called internally during page processing.
      Specified by:
      getActualRootExpression in interface IPageBean
    • setActualRootExpression

      public final void setActualRootExpression(String rootExpression)
      This method is called internally during page processing.
      Specified by:
      setActualRootExpression in interface IPageBean
    • getPopups

      public Map<String,IPageBean> getPopups()
      Page beans which are opened as modal or modeless popup are stored in this Map. The key of the map is a generated one. - The page bean is added by method openModalPopup(IPageBean, String, int, int, IModalPopupListener) or by method openModelessPopup(IPageBean, String, int, int, IModelessPopupListener). The page bean is removed from the map by closePopup(IPageBean).

      The map must not be modified from outside!
    • openModalPopup

      public ModalPopup openModalPopup(IPageBean pageBean, String title, int width, int height, ModalPopup.IModalPopupListener popupListener)
      Opens the passed pageBean-instance in a modal dialog.
      Specified by:
      openModalPopup in interface IPageBean
      Parameters:
      width - If passes as 0 then the sizing is done automatically - following the minium size of the bean content.- Pay attention: in case the pageBean is wrapped e.g. in a SCROLLPANE then this size may be very small.
      height - If passes as 0 then the sizing is done automatically - following the minium size of the bean content.- Pay attention: in case the pageBean is wrapped e.g. in a SCROLLPANE then this size may be very small.
      popupListener - Implementation of interface that is called when the dialog is requested to be closed by the user, e.g. by pressing the close-icon or by pressing the Escape-key.
    • closePopup

      public void closePopup(IPageBean pageBean)
      Specified by:
      closePopup in interface IPageBean
    • openModelessPopup

      public ModelessPopup openModelessPopup(IPageBean pageBean, String title, int width, int height, ModelessPopup.IModelessPopupListener popupListener)
      Opens the passed pageBean-instance in a modal dialog.

      Please check documentation for method openModalPopup(IPageBean, String, int, int, IModalPopupListener).
      Specified by:
      openModelessPopup in interface IPageBean
    • pbx

      public String pbx(String partialExpression)
      Builds a full expression ("page bean expression") out of some partial, local expression.

      If building dynamic pages then you quite often need to build epxressions to properties/methods that are provided as part of your page bean. This method builds these expressions by using the root expression of the page (getRootExpressionUsedInPage() and concatenating the partial expression into this root expression.

      Example: the root expression is "#{d.AddressUI}", the partial epxression is "firstName". In this case the full expression returned by this method is "#{d.AddressUI.firstName}".
    • readPageLayoutXML

      public String readPageLayoutXML()
      Reads the layout definition of this page bean. The XML that is returned is the original XML of the layout (e.g. contained in a JSP-page). With this function you can access the layout at runtime - and e.g. take over meta data defined in the page into your processing.
    • onBeforeRendering

      public void onBeforeRendering()
      Called before processing the render phase with page bean. This method is called with every roundtrip that is executed between UI-client and server.
      Specified by:
      onBeforeRendering in interface IPageBean
    • getStamp

      public long getStamp()
      Description copied from interface: IPageBean
      Each page bean has a creation stamp which is unique within a VM context. The stamp does not need to be unique "forever" (i.e. it's not a UUID). It serves as information for checking if a bean changed: instead of keeping the bean before and then comparing with the current bean with "==", you can keep the stamp information and compare the stamps. This means that in such situations the "bean before" can be garbage collected and is not kept just for comparison reason. - The value "0" is a reserved value and is never used as stamp.
      Specified by:
      getStamp in interface IPageBean
    • buildContentReplaceString

      public String buildContentReplaceString(IPageBean pageBean)
      Internal usage.
    • initializePageModifier

      protected void initializePageModifier()
      Internal usage.