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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildContentReplaceString(IPageBean pageBean) Internal usage.voidclosePopup(IPageBean pageBean) Closes a dialog the was previously opened viaopenModalPopup(IPageBean, String, int, int, IModalPopupListener)oropenModelessPopup(IPageBean, String, int, int, IModelessPopupListener).final StringThis method is called internally during page processing.When opening a popup by methodopenModalPopup(IPageBean, String, int, int, IModalPopupListener)oropenModelessPopup(IPageBean, String, int, int, IModelessPopupListener)an instance ofModalPopuporModelessPopupis created, representing the popup which is opened.final IPageModifierFunction to update the layout XML that is read by the page bean.abstract StringName of page that is managed by the bean.Page beans which are opened as modal or modeless popup are stored in this Map.abstract StringInside the page definition the bean is addressed via a certain root expression - e.g.longgetStamp()Each page bean has a creation stamp which is unique within a VM context.protected voidInternal usage.voidCalled 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 voidsetActualRootExpression(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:IPageBeanName 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:
getPageNamein interfaceIPageBean
-
getRootExpressionUsedInPage
Description copied from interface:IPageBeanInside 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:
getRootExpressionUsedInPagein interfaceIPageBean
-
getPageModifier
Description copied from interface:IPageBeanFunction to update the layout XML that is read by the page bean.- Specified by:
getPageModifierin interfaceIPageBean
-
getActualRootExpression
This method is called internally during page processing.- Specified by:
getActualRootExpressionin interfaceIPageBean
-
setActualRootExpression
This method is called internally during page processing.- Specified by:
setActualRootExpressionin 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! -
getModalModelessPopupForPopupPageBean
When opening a popup by methodopenModalPopup(IPageBean, String, int, int, IModalPopupListener)oropenModelessPopup(IPageBean, String, int, int, IModelessPopupListener)an instance ofModalPopuporModelessPopupis created, representing the popup which is opened. For this popup you can set certain parameters like style, decoration mode, position, close behavior.
With this method you can retrieve the popup instance for a page bean that is opened as popup.- Returns:
- May return null of the pageBean passed is not opened as popup.
-
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:
openModalPopupin 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:
closePopupin 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:
openModelessPopupin 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:
onBeforeRenderingin interfaceIPageBean
-
getStamp
public long getStamp()Description copied from interface:IPageBeanEach 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.
-