Package 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
,LogViewer
,PageBeanComponentBase
,ServerFileBrowser
,StreamStoreNewContentUI
,WorkpageContainerRendererIconSelectorRight
,WorkpageContainerRendererStackedPane
,WorkpageContainerRendererVerticalMiniView
,WorkpageContainerRendererViaHideablePane
Default implementation of interface
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
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildContentReplaceString
(IPageBean pageBean) Internal usage.void
closePopup
(IPageBean pageBean) Closes a dialog the was previously opened viaopenModalPopup(IPageBean, String, int, int, IModalPopupListener)
oropenModelessPopup(IPageBean, String, int, int, IModelessPopupListener)
.final String
This method is called internally during page processing.final IPageModifier
Function to update the layout XML that is read by the page bean.abstract String
Name of page that is managed by the bean.Page beans which are opened as modal or modeless popup are stored in this Map.abstract String
Inside the page definition the bean is addressed via a certain root expression - e.g.long
getStamp()
Each page bean has a creation stamp which is unique within a VM context.protected void
Internal usage.void
Called before processing the render phase with page bean.openModalPopup
(IPageBean pageBean, String title, int width, int height, ModalPopup.IModalPopupListener popupListener) Opens the passed pageBean-instance in a modal dialog.openModelessPopup
(IPageBean pageBean, String title, int width, int height, ModelessPopup.IModelessPopupListener popupListener) Opens the passed pageBean-instance in a modal dialog.Builds a full expression ("page bean expression") out of some partial, local expression.Reads the layout definition of this page bean.final void
setActualRootExpression
(String rootExpression) This method is called internally during page processing.
-
Field Details
-
m_pageModifier
-
-
Constructor Details
-
PageBean
public PageBean()
-
-
Method Details
-
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 interfaceIPageBean
-
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 interfaceIPageBean
-
getPageModifier
Description copied from interface:IPageBean
Function to update the layout XML that is read by the page bean.- Specified by:
getPageModifier
in interfaceIPageBean
-
getActualRootExpression
This method is called internally during page processing.- Specified by:
getActualRootExpression
in interfaceIPageBean
-
setActualRootExpression
This method is called internally during page processing.- Specified by:
setActualRootExpression
in interfaceIPageBean
-
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 methodopenModalPopup(IPageBean, String, int, int, IModalPopupListener)
or by methodopenModelessPopup(IPageBean, String, int, int, IModelessPopupListener)
. The page bean is removed from the map byclosePopup(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 interfaceIPageBean
- 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
Closes a dialog the was previously opened viaopenModalPopup(IPageBean, String, int, int, IModalPopupListener)
oropenModelessPopup(IPageBean, String, int, int, IModelessPopupListener)
.- Specified by:
closePopup
in interfaceIPageBean
-
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 methodopenModalPopup(IPageBean, String, int, int, IModalPopupListener)
.- Specified by:
openModelessPopup
in interfaceIPageBean
-
pbx
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
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 interfaceIPageBean
-
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. -
buildContentReplaceString
Internal usage. -
initializePageModifier
protected void initializePageModifier()Internal usage.
-