org.eclnt.jsfserver.pagebean

## Class PageBean

- java.lang.Object
- - org.eclnt.jsfserver.pagebean.PageBean

- All Implemented Interfaces:
    IPageBean, IDynamicContentBindingObject
  Direct Known Subclasses:
    DefaultDispatchedPageBean, DefaultScreens, DynBeanTreeUI, DynBeanUI, GridDetails, KEYSELECTORBinding, PageBeanComponent, ServerFileBrowser, StreamStoreNewContentUI, WorkpageContainerRendererIconSelectorRight, WorkpageContainerRendererStackedPane, WorkpageContainerRendererVerticalMiniView, WorkpageContainerRendererViaHideablePane

      public abstract class PageBean
      extends java.lang.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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PageBean()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `buildContentReplaceString(IPageBean pageBean)` Internal usage.
    `void` | `closePopup(IPageBean pageBean)` Closes a dialog the was previously opened via `#openModalPopup(IPageBean, String, int, int, IModalPopupListener)` or `#openModelessPopup(IPageBean, String, int, int, IModelessPopupListener)`.
    `java.lang.String` | `getActualRootExpression()` This method is called internally during page processing.
    `abstract java.lang.String` | `getPageName()` Name of page that is managed by the bean.
    `java.util.Map<java.lang.String,IPageBean>` | `getPopups()`
    `abstract java.lang.String` | `getRootExpressionUsedInPage()` Inside the page definition the bean is addressed via a certain root expression - e.g.
    `void` | `initializePageBean(java.util.Map<java.lang.String,java.lang.String> initData)` See `IPageBean.initializePageBean(Map)`.
    `boolean` | `isInitialized()` See `IPageBean.isInitialized()`.
    `void` | `onBeforeRendering()` Called before processing the render phase with page bean.
    `ModalPopup` | `openModalPopup(IPageBean pageBean, java.lang.String title, int width, int height, ModalPopup.IModalPopupListener popupListener)` Opens the passed pageBean-instance in a modal dialog.
    `ModelessPopup` | `openModelessPopup(IPageBean pageBean, java.lang.String title, int width, int height, ModelessPopup.IModelessPopupListener popupListener)` Opens the passed pageBean-instance in a modal dialog.
    `java.lang.String` | `pbx(java.lang.String partialExpression)` Builds a full expression ("page bean expression") out of some partial, local expression.
    `java.lang.String` | `readPageLayoutXML()` Reads the layout definition of this page bean.
    `void` | `setActualRootExpression(java.lang.String rootExpression)` This method is called internally during page processing.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PageBean

          public PageBean()

  - ### Method Detail

    - #### getPageName

          public abstract java.lang.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 java.lang.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`

    - #### initializePageBean

          public void initializePageBean(java.util.Map<java.lang.String,java.lang.String> initData)

      See `IPageBean.initializePageBean(Map)`. Implementations must call their super-implementation, because the initialized-flag needs to be set after initialization!
      Specified by:
        `initializePageBean` in interface `IPageBean`

    - #### isInitialized

          public boolean isInitialized()

      See `IPageBean.isInitialized()`.
      Specified by:
        `isInitialized` in interface `IPageBean`

    - #### getActualRootExpression

          public final java.lang.String getActualRootExpression()

      This method is called internally during page processing.
      Specified by:
        `getActualRootExpression` in interface `IPageBean`

    - #### setActualRootExpression

          public final void setActualRootExpression(java.lang.String rootExpression)

      This method is called internally during page processing.
      Specified by:
        `setActualRootExpression` in interface `IPageBean`

    - #### getPopups

          public java.util.Map<java.lang.String,IPageBean> getPopups()

    - #### openModalPopup

          public ModalPopup openModalPopup(IPageBean pageBean,
                                           java.lang.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)

      Closes a dialog the was previously opened via `#openModalPopup(IPageBean, String, int, int, IModalPopupListener)` or `#openModelessPopup(IPageBean, String, int, int, IModelessPopupListener)`.
      Specified by:
        `closePopup` in interface `IPageBean`

    - #### openModelessPopup

          public ModelessPopup openModelessPopup(IPageBean pageBean,
                                                 java.lang.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 java.lang.String pbx(java.lang.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 java.lang.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.
      Specified by:
        `onBeforeRendering` in interface `IPageBean`

    - #### buildContentReplaceString

          public java.lang.String buildContentReplaceString(IPageBean pageBean)

      Internal usage.

Copyright © CaptainCasa Gmbh. All Rights Reserved.