Package com.portal.app.cc.comp
Interface PAccountViewContext
- All Known Implementing Classes:
PAccountView
public interface PAccountViewContext
A context which can be used if you need to navigate within the
PAccountView component. This context contains methods for making
various pages visible, and for adding additional pages as drill downs.
Note that you typically get an instance of this context that refers to
the currently active account.
- Version:
- %version: 9 % %date_modified: Wed Oct 17 14:51:52 2001 %
- Author:
- kapono
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method should be used to add a page to this account view as a tab.Retrieves the class that manages the navigation stack (back button)Retrieves the class through which pages register for Refresh notification.Retrieves the encompassing template for the currently visible top-level page.boolean
Determines if the given page is a visible tab or notvoid
This method will locate the tab containing this top-level page and remove that tab.void
switchToPage
(String tag, PAccountViewPage page) This method searches through the set of drill downs previously added to the current top-level page looking for the given page.boolean
switchToPage
(String tag, PAccountViewPage page, String parentName) This method allows you to simulate drilling down from a different parent.switchToPage
(String tag, Class pageClass) This method searches through the set of drill downs previously added to the current top-level page looking for the given class type.switchToPage
(String tag, Class pageClass, String parentName) This method allows you to simulate drilling down from a different parent.void
switchToPreviousPage
(int index, Enumeration tags, PAccountViewPage page) This method should be used if you are trying to navigate to the last visited page (assumed to be local to the given page).
-
Method Details
-
switchToPage
This method searches through the set of drill downs previously added to the current top-level page looking for the given page. If the given page is found, it is made visible and the breadcrumb trail is updated accordingly. If it is not found then the page is added as a new drill down.
If the 'tag' parameter is null,getLabel()
is called on 'page' to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to name the current drill down- Parameters:
tag
- The label to display in the breadcrumb trailpage
- The new screen to display
-
switchToPage
This method searches through the set of drill downs previously added to the current top-level page looking for the given class type. If the given type is found, it is made visible and the breadcrumb trail is updated accordingly. Otherwise the Class is instantiated, added as a drill down, and that instance returned to the caller. This means you can call this API over and over and only one instance of the page will be created and added to the view.
If the 'tag' parameter is null,getLabel()
is used to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to name the current drill down- Parameters:
tag
- The label to display in the breadcrumb trailpage
- The page Class to display- Returns:
- The PAccountViewPage that was located or instantiated
-
switchToPage
This method allows you to simulate drilling down from a different parent. In most cases, you want to drill down from the current page directly. However, there are cases when you need to drill down into an entirely different data area. For instance, you may be on the summary screen and need to drill down into detailed billing data.
This method will atempt to locate the named parent and add the PAccountViewPage as a drill down to it. It will not be added if it was previously added as a drill down - in that case it is simply made visible. If for some reason the parent is not found this method returns false and does not modify the display
If the 'tag' parameter is null,getLabel()
is called on 'page' to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to indicate the current page.- Parameters:
tag
- The label to display in the breadcrumb trail for this pagepage
- The page to display as a drill downparentName
- Names the parent component you are drilling down- Returns:
- true if the parent was found and the page successfully displayed as a drill down; false otherwise
-
switchToPage
This method allows you to simulate drilling down from a different parent. In most cases, you want to drill down from the current page directly. However, there are cases when you need to drill down into an entirely different data area. For instance, you may be on the General summary screen and need to drill down into detailed billing data.
This method will atempt to locate the named parent and locate an existing drill down of the given Class type. If the Class type exists, that instance is made the current drill down and returned to the caller. Otherwise the Class is instantiated and added as a drill down. This means you can call this method over and over and only one instance of the page will be created and added to the view. If for some reason the parent is not found this method returns false and does not modify the display.
If the 'tag' parameter is null,getLabel()
is used to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to indicate the current page.- Parameters:
tag
- The label to display in the breadcrumb trail for this pagepageClass
- The page Class display as a drill downparentName
- Names the parent component you are drilling down- Returns:
- The PAccountViewPage that was located or instantiated
-
switchToPreviousPage
This method should be used if you are trying to navigate to the last visited page (assumed to be local to the given page). If the tag/page passed in refer to the page one level up in the breadcrumb trail it will be made visible. However, if it does not then this method drills down the the given tag/page (as if you had calledswitchToPage()
. This is mostly used by the "back button" infrastructure.- Parameters:
index
-tags
-page
-
-
getVisibleTemplate
PPageTemplate getVisibleTemplate()Retrieves the encompassing template for the currently visible top-level page.- Returns:
- The encompassing template
-
getPageTracker
PPageTracker getPageTracker()Retrieves the class that manages the navigation stack (back button)- Returns:
- The navigation stack for the currently active account
-
getRefreshManager
PRefreshManager getRefreshManager()Retrieves the class through which pages register for Refresh notification. Note that each active account view contains its own refresh manager instance, so an entity (Action) sitting outside the view (i.e. in a toolbar) will need to register each time an account is opened. At the same time, be sure not to register multiple times for the same view.- Returns:
- The RefreshManager instance for the open account
-
addToView
This method should be used to add a page to this account view as a tab. The page being added must have been defined in the configuration file specification for this view or it will be ignored.
This is typically used in conjunction with a page that may or may not be valid for a given account context. A page that may have been omitted from the view by returning false in itsisValidContext()
method should use this method to add itself back.- Parameters:
sp
- The page to add as a tab
-
removeFromView
This method will locate the tab containing this top-level page and remove that tab. This is typically used in conjunction with a page that may or may not be valid for a given account context. If your page suddenly goes out of context due to some event in the account, use this to remove the tab associated with this page. Note that the specified page must be the top-level page on a tab.- Parameters:
sp
- The page to remove
-
isPartOfView
Determines if the given page is a visible tab or not- Parameters:
sp
- The page in question- Returns:
- true if the page is currently a visible tab; false otherwise
-